Closed agila5 closed 2 years ago
Fix #251. The result of the following commit is summarised below:
1) Informative error when the selected layer does not exist:
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. oe_get("ITS Leeds", download_only = TRUE, quiet = TRUE, download_directory = tempdir()) oe_get_keys("ITS Leeds", layer = "points", download_directory = tempdir()) #> Error: The matched file does not contain the selected layer. Check the examples in the docs to see how to add it. oe_get("ITS Leeds", layer = "points", download_only = TRUE, quiet = TRUE, download_directory = tempdir()) oe_get_keys("ITS Leeds", layer = "points", download_directory = tempdir()) #> [1] "amenity" "addr:postcode" #> [3] "addr:street" "addr:city" #> [5] "fhrs:id" "capacity" #> ...
Created on 2022-05-06 by the reprex package (v2.0.1)
other-tags
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. oe_get( "ITS Leeds", download_only = TRUE, quiet = TRUE, download_directory = tempdir(), extra_tags = c("foot", "lanes") ) #> [1] "C:\\Users\\gilardi\\AppData\\Local\\Temp\\Rtmpi2s2FD\\test_its-example.gpkg" oe_get_keys("ITS Leeds", download_directory = tempdir()) #> [1] "surface" "bicycle" "lit" #> [4] "access" "oneway" "maxspeed" #> ... #> Warning: The following keys were already extracted from the other_tags field: #> foot - lanes
I will write the tests after we merge #255
These look like really nice changes.
Thanks, done!
Fix #251. The result of the following commit is summarised below:
1) Informative error when the selected layer does not exist:
Created on 2022-05-06 by the reprex package (v2.0.1)
other-tags
fieldCreated on 2022-05-06 by the reprex package (v2.0.1)
I will write the tests after we merge #255