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

Add support for lat, lon pairs with optional radius #21

Open
peternewman opened this issue Aug 8, 2023 · 3 comments
Open

Add support for lat, lon pairs with optional radius #21

peternewman opened this issue Aug 8, 2023 · 3 comments

Comments

@peternewman
Copy link
Contributor

Most notably as an exclude for Burger King:
https://nsi.guide/index.html?t=brands&k=amenity&v=fast_food&tt=burger%20king#burgerking-890dec

Which is due to:
https://en.wikipedia.org/wiki/Burger_King_(Mattoon,_Illinois)

Here's where it's skipped:
https://github.com/westnordost/osmfeatures/blob/6cc75f51544613657e9a1489f54d05dfb711eaf1/library/src/main/java/de/westnordost/osmfeatures/IDPresetsJsonParser.java#L107-

There seems to be around 300 includes and 5 excludes (these give the total numeric rows so divide by about three, and assumes only one per preset):
jq ".presets[].locationSet.include | arrays" nsi-id-presets.json | grep -v geojson | grep -v "\"" | grep -v "\[" | grep -v "\]" | wc -l
jq ".presets[].locationSet.exclude | arrays" nsi-id-presets.json | grep -v geojson | grep -v "\"" | grep -v "\[" | grep -v "\]" | wc -l

SC could possibly just drop the exclude ones in the same way as as it drops the subdivisions of lots of ISO 3166-2 countries already which would fix the Burger King case at least. Maybe it could also find out which country the lat/lon was in and convert an include to the entire country as an interim measure.

@westnordost westnordost added the enhancement New feature or request label Aug 9, 2023
@westnordost westnordost changed the title Add support for lat, lon pairs with optional raidius Add support for lat, lon pairs with optional radius Aug 9, 2023
@westnordost westnordost removed the enhancement New feature or request label Aug 9, 2023
@westnordost
Copy link
Owner

This would require to change the interface of the API, as currently not a geo location is supplied, but a country code.

@peternewman
Copy link
Contributor Author

This would require to change the interface of the API, as currently not a geo location is supplied, but a country code.

Ah, in which case as a temporary measure, could SC not tweak it's pre-processing?

SC could possibly just drop the exclude ones in the same way as as it drops the subdivisions of lots of ISO 3166-2 countries already which would fix the Burger King case at least. Maybe it could also find out which country the lat/lon was in and convert an include to the entire country as an interim measure.

Showing Burger King either in everywhere but the US, or ALL of the US including Mattoon would probably be a better situation than not at all in the short term. Given similar stuff already happens when simplifying subdivisions.

@westnordost
Copy link
Owner

To be clear, the above was just a note after a cursory look, this ticket remains a valid feature request.

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

2 participants