You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# packages
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
Import Greater London road network considering only primary, secondary, and tertiary highways
greater_london<- oe_get(
place="Greater London",
vectortranslate_options= c(
"-f", "GPKG",
"-overwrite",
"-where", "highway IN ('primary', 'secondary', 'tertiary')",
"lines"
)
)
#> The input place was matched with: Greater London#> 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_greater-london-latest.gpkg' using driver `GPKG'#> Simple feature collection with 27950 features and 9 fields#> Geometry type: LINESTRING#> Dimension: XY#> Bounding box: xmin: -0.5102405 ymin: 51.28324 xmax: 0.3308773 ymax: 51.69751#> Geodetic CRS: WGS 84
Then, after a few weeks, I forget about the vectortranslate query and import Greater London data again:
oe_get("Greater London")
#> The input place was matched with: Greater London#> The chosen file was already detected in the download directory. Skip downloading.#> The corresponding gpkg file was already detected. Skip vectortranslate operations.#> Reading layer `lines' from data source `C:\Users\Utente\Documents\osm-data\geofabrik_greater-london-latest.gpkg' using driver `GPKG'#> Simple feature collection with 27950 features and 9 fields#> Geometry type: LINESTRING#> Dimension: XY#> Bounding box: xmin: -0.5102405 ymin: 51.28324 xmax: 0.3308773 ymax: 51.69751#> Geodetic CRS: WGS 84
The vectortranslate conversion is skipped, and oe_get imports the OSM data that were filtered during the previous call to oe_get().
I think that we can implement the following solution. Create a hidden folder within the download_directory with several .txt files that flag if a particular OSM extract was converted using ad-hoc vectortranslate options.
The text was updated successfully, but these errors were encountered:
Consider the following example.
Import Greater London road network considering only primary, secondary, and tertiary highways
Then, after a few weeks, I forget about the vectortranslate query and import Greater London data again:
The vectortranslate conversion is skipped, and
oe_get
imports the OSM data that were filtered during the previous call tooe_get()
.I think that we can implement the following solution. Create a hidden folder within the
download_directory
with several.txt
files that flag if a particular OSM extract was converted using ad-hoc vectortranslate options.The text was updated successfully, but these errors were encountered: