Skip to content

category_map: clean mappings for fuel, charging_station, stadium, attraction#600

Open
bwakefield-ta wants to merge 1 commit into
pelias:masterfrom
ThinAirTelematics:thinair/s20-category-map-v1
Open

category_map: clean mappings for fuel, charging_station, stadium, attraction#600
bwakefield-ta wants to merge 1 commit into
pelias:masterfrom
ThinAirTelematics:thinair/s20-category-map-v1

Conversation

@bwakefield-ta

Copy link
Copy Markdown

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.

OSM tag Before After
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

  • Fuel / charging: Gas stations and EV charging stations are routing-relevant categories on their own. Lumping them under transport+professional mixes them with car_rental, taxi stands, and unrelated services. The before-state forces every consumer to re-derive the distinction from raw OSM tags.
  • Stadium: A stadium is a venue with sports semantics. The previous single entertainment tag 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.
  • Attraction: Tourist attractions and landmarks (Statue of Liberty, Eiffel Tower, etc.) deserve their own categories. landmark and venue enable landmark-recall queries that currently miss entirely.

Backward compatibility

This is additive at the semantic layer — existing callers that filter on transport or entertainment already have other paths to reach these features (e.g., aeroway:*transport, tourism:theme_parkentertainment is unchanged). The new categories are net-new searchable values; nothing existing depends on fuel returning transport.

For consumers who relied on amenity=fueltransport, 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 test passes (only the affected mappings change; structure is unchanged)
  • Verify a fuel POI ends up tagged category: fuel in the imported document
  • Verify a stadium POI is searchable via category: stadium or category: venue
  • Verify a tourist attraction is searchable via category: landmark

Context

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.

…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
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

Successfully merging this pull request may close these issues.

1 participant