Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The character : should be converted to _ when checking for extra fields #260

Closed
agila5 opened this issue Aug 17, 2022 · 1 comment
Closed
Assignees

Comments

@agila5
Copy link
Contributor

agila5 commented Aug 17, 2022

The character : gets converted to _ when translating the .pbf file into .gpkg format, i.e.

colnames(osmextract::oe_get(
  "Andorra", layer = "multipolygons", extra_tags = c("power", "plant:source"), quiet = TRUE
))
#>  [1] "osm_id"       "osm_way_id"   "name"         "type"         "aeroway"     
#>  [6] "amenity"      "admin_level"  "barrier"      "boundary"     "building"    
#> [11] "craft"        "geological"   "historic"     "land_area"    "landuse"     
#> [16] "leisure"      "man_made"     "military"     "natural"      "office"      
#> [21] "place"        "shop"         "sport"        "tourism"      "power"       
#> [26] "plant_source" "other_tags"   "geometry"

Created on 2022-08-17 by the reprex package (v2.0.1)

Therefore, we need to convert the character ":" into "_" when checking the "extra_tags" otherwise the vectortranslate operations are always triggered:

osmextract::oe_get(
  "Andorra", layer = "multipolygons", extra_tags = c("power", "plant:source"), download_only = TRUE
)
#> The input place was matched with: Andorra
#> The chosen file was already detected in the download directory. Skip downloading.
#> Starting 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!
#> [1] "D:/osm-data/geofabrik_andorra-latest.gpkg"
osmextract::oe_get(
  "Andorra", layer = "multipolygons", extra_tags = c("power", "plant:source"), download_only = TRUE
)
#> The input place was matched with: Andorra
#> The chosen file was already detected in the download directory. Skip downloading.
#> Starting 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!
#> [1] "D:/osm-data/geofabrik_andorra-latest.gpkg"

Created on 2022-08-17 by the reprex package (v2.0.1)

@agila5 agila5 self-assigned this Aug 17, 2022
@agila5
Copy link
Contributor Author

agila5 commented Aug 17, 2022

@agila5 agila5 closed this as completed in b2820ce Aug 17, 2022
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

No branches or pull requests

1 participant