Skip to content

Add new types to oe_get_network#224

Draft
agila5 wants to merge 3 commits intomasterfrom
new-types
Draft

Add new types to oe_get_network#224
agila5 wants to merge 3 commits intomasterfrom
new-types

Conversation

@agila5
Copy link
Contributor

@agila5 agila5 commented Aug 24, 2021

New definitions are taken from osminfra package. For example:

library(osmextract)
#> Data (c) OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright.
#> Check the package website, https://docs.ropensci.org/osmextract/, for more details.
library(sf)
#> Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1

iow <- oe_get_network("isle of wight", "cycle_infrastructure")
#> The input place was matched with: Isle of Wight
#> The chosen file was already detected in the download directory. Skip downloading.
#> Start with the vectortranslate operations on the input file!
#> 0...10...20...30...40...50...60...70...80...90...100 - done.
#> Finished the vectortranslate operations on the input file!
#> Reading layer `lines' from data source 
#>   `C:\Users\Utente\Documents\osm-data\geofabrik_isle-of-wight-latest.gpkg' 
#>   using driver `GPKG'
#> Simple feature collection with 6345 features and 17 fields
#> Geometry type: LINESTRING
#> Dimension:     XY
#> Bounding box:  xmin: -1.584214 ymin: 50.57523 xmax: -1.069921 ymax: 50.76732
#> Geodetic CRS:  WGS 84
plot(iow["highway"], key.length = 1, main = "", key.pos = 1)

Created on 2021-08-24 by the reprex package (v2.0.0)

I'm not sure about all details behind those definitions, but, if you want, I can complete the PR and add all new types.

cc @Robinlovelace and @joeytalbot

agila5 and others added 2 commits August 24, 2021 16:33
@Robinlovelace
Copy link
Member

This looks good to me, I think it makes sense to have it in there. Note, we'll probably need to change the function, specifically, the inclusion of footway was not right. That will be fixed in this small change: #225

@Robinlovelace
Copy link
Member

Note the updated definitions here, there are many different ways to define a cycleway!

https://github.com/Robinlovelace/osminfra/blob/main/R/get.R

@agila5
Copy link
Contributor Author

agila5 commented Aug 24, 2021

This looks good to me, I think it makes sense to have it in there. Note, we'll probably need to change the function, specifically, the inclusion of footway was not right. That will be fixed in this small change: #225

👍

Note the updated definitions here, there are many different ways to define a cycleway!

I think it should be pretty easy to copy those definitions here and adjust the docs (with links maybe) documenting the new types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants