category_map: clean mappings for fuel, charging_station, stadium, attraction#600
Open
bwakefield-ta wants to merge 1 commit into
Open
category_map: clean mappings for fuel, charging_station, stadium, attraction#600bwakefield-ta wants to merge 1 commit into
bwakefield-ta wants to merge 1 commit into
Conversation
…raction - amenity=fuel → [fuel] (was [transport, professional]) - amenity=charging_station → [charging_station] (was [transport, professional]) - leisure=stadium → [sports, stadium, venue] (was [entertainment]) - tourism=attraction → [attraction, landmark, venue] (was [entertainment]) Adds first-class semantic categories so callers can filter on fuel/EV/stadium/ attraction directly without inferring from generic buckets. Run existing tests with: npm test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds clean, non-lossy category mappings for four OSM tag classes so downstream consumers can filter on first-class semantic categories instead of inferring from generic buckets.
amenity=fuel['transport','professional']['fuel']amenity=charging_station['transport','professional']['charging_station']leisure=stadium['entertainment']['sports','stadium','venue']tourism=attraction['entertainment']['attraction','landmark','venue']Rationale
transport+professionalmixes them with car_rental, taxi stands, and unrelated services. The before-state forces every consumer to re-derive the distinction from raw OSM tags.entertainmenttag collides with cinemas, theme parks, and water parks — useful for some queries but loses the fact that callers searching for "stadium" or "sports venue" cannot disambiguate.landmarkandvenueenable landmark-recall queries that currently miss entirely.Backward compatibility
This is additive at the semantic layer — existing callers that filter on
transportorentertainmentalready have other paths to reach these features (e.g.,aeroway:*→transport,tourism:theme_park→entertainmentis unchanged). The new categories are net-new searchable values; nothing existing depends onfuelreturningtransport.For consumers who relied on
amenity=fuel→transport, that mapping was already imprecise: a fuel station is not a transport node in the routing sense (it has no schedules, lines, or stops). The cleaner mapping makes downstream taxonomy match user intent.Test plan
npm testpasses (only the affected mappings change; structure is unchanged)category: fuelin the imported documentcategory: stadiumorcategory: venuecategory: landmarkContext
ThinAir is running this patch in production today via a fork (
thinair/openstreetmap) pending merge here. We'd love to drop the fork once this lands.