ropensci / osmextract

Download and import OpenStreetMap data from Geofabrik and other providers
https://docs.ropensci.org/osmextract
GNU General Public License v3.0
167 stars 12 forks source link

[BUG] oe_match does not properly match the correct OSM extract #286

Open eugene100hickey opened 1 year ago

eugene100hickey commented 1 year ago

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 commented 1 year ago

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.

eugene100hickey commented 1 year ago

Grand, I understand the problem and thanks for getting back to me.

I guess I'll use "Ireland and Northern Ireland" for the moment. If I can think of a fix for this I'll get back to you.

Thanks, Eugene


From: Andrea Gilardi @.> Sent: Monday, August 21, 2023 4:56 PM To: ropensci/osmextract @.> Cc: Eugene Hickey @.>; Mention @.> Subject: Re: [ropensci/osmextract] [BUG] (Issue #286)

[R.PHOST SEACHTRACH] NÁ CLICEÁIL AR naisc nó ceangaltáin ach amháin má aithníonn tú an seoltóir agus go bhfuil a fhios agat gur ábhar sábháilte é

[EXTERNAL EMAIL] DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.

Hi @eugene100hickeyhttps://github.com/eugene100hickey. Unfortunately, this is a known issue (see the relevanthttps://docs.ropensci.org/osmextract/articles/osmextract.html#oe_match-match-an-input-place-with-an-osm-extract 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.2https://reprex.tidyverse.org/

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

— Reply to this email directly, view it on GitHubhttps://github.com/ropensci/osmextract/issues/286#issuecomment-1686595074, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCNXCJ7HBMVLVYXIVRHDZDXWOAK7ANCNFSM6AAAAAA3YJKZFE. You are receiving this because you were mentioned.Message ID: @.***>

This email originated from TU Dublin. If you received this email in error, please delete it from your system. Please note that if you are not the named addressee, disclosing, copying, distributing or taking any action based on the contents of this email or attachments is prohibited.

Is ó OT Baile Átha Cliath a tháinig an ríomhphost seo. Má fuair tú an ríomhphost seo trí earráid, scrios de do chóras é le do thoil. Tabhair ar aird, mura tú an seolaí ainmnithe, go bhfuil dianchosc ar aon nochtadh, aon chóipeáil, aon dáileadh nó ar aon ghníomh a dhéanfar bunaithe ar an ábhar atá sa ríomhphost nó sna hiatáin seo.

Is carthanas cláraithe í OT Baile Átha Cliath TU Dublin is a registered charity RCN 20204754