osmextract
osmextract copied to clipboard
[FEATURE] Automatic detection of extra_tags
Is your feature request related to a problem? Please describe. I would like the following query to work "out of the box":
library(sf)
#> Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1; sf_use_s2() is TRUE
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("Isle of Wight", layer = "points", vectortranslate_options = c("-where", "amenity = 'hospital'"))
#> The input place was matched with: Isle of Wight
#> Downloading the OSM extract:
#> File downloaded!
#> Start with the vectortranslate operations on the input file!
#> Warning in CPL_gdalvectortranslate(source, destination, options, oo, doo, : GDAL
#> Error 1: "amenity" not recognised as an available field.
#> Warning in CPL_gdalvectortranslate(source, destination, options, oo, doo, : GDAL
#> Error 1: SetAttributeFilter(amenity = 'hospital') on layer 'points' failed.
#> Error in sf::gdal_utils(util = "vectortranslate", source = normalizePath(file_path), : gdal_utils vectortranslate: an error occured
Created on 2022-07-04 by the reprex package (v2.0.1)
Describe the solution you'd like Automatic detection of extra_tags and no need to manually set them.
Describe alternatives you've considered Current approach.
Additional context I'm a lazy guy....