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] oe_match does not properly match the correct OSM extract #286

Open
eugene100hickey opened this issue Aug 21, 2023 · 2 comments
Open
Labels
help wanted Extra attention is needed

Comments

@eugene100hickey
Copy link

oe_match("Ireland") defaults to "https://download.geofabrik.de/europe/iceland-latest.osm.pbf" (note the iceland part) as opposed to "https://download.geofabrik.de/europe/ireland-and-northern-ireland-latest.osm.pbf".

oe_match("Ireland and Northern Ireland") gives the correct behaviour.

@agila5
Copy link
Collaborator

agila5 commented Aug 21, 2023

Hi @eugene100hickey. Unfortunately, this is a known issue (see the relevant section in the introductory vignette) and I'm not sure how to fix it. My suggestion for these cases is to run oe_match_pattern() at the beginning of the code to see all the possible matches and then run oe_match() or oe_get() providing the exact string. 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.
oe_match_pattern("Ireland")
#> $geofabrik
#> [1] "Britain and Ireland"          "Ireland and Northern Ireland"
#> 
#> $openstreetmap_fr
#> [1] "Ireland"          "Northern Ireland"

Created on 2023-08-21 with reprex v2.0.2

I would happily read/review a PR that fixes these ambiguous situations.

@agila5 agila5 changed the title [BUG] [BUG] oe_match does not properly match the proper OSM extract Aug 21, 2023
@agila5 agila5 changed the title [BUG] oe_match does not properly match the proper OSM extract [BUG] oe_match does not properly match the correct OSM extract Aug 21, 2023
@eugene100hickey
Copy link
Author

eugene100hickey commented Aug 21, 2023 via email

@agila5 agila5 added the help wanted Extra attention is needed label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants