Open peternewman opened 1 year ago
This would require to change the interface of the API, as currently not a geo location is supplied, but a country code.
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.
To be clear, the above was just a note after a cursory look, this ticket remains a valid feature request.
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.