Repository navigation
OSM discovery: tourism and hospitality categories, in English and French - #261
Open
niumanatini wants to merge 1 commit into
Open
niumanatini wants to merge 1 commit into
niumanatini wants to merge 1 commit into
Conversation
The free OpenStreetMap source only mapped home-services trades, so an ICP of hotels, guesthouses, restaurants, dive centres, rentals, estate agents or wedding planners raised "no category" on every query and the run exited non-zero. Those businesses are premises, which is exactly what OSM maps well. Add the tags that carry them (tourism=hotel, tourism=guest_house, amenity=restaurant, shop=scuba_diving, amenity=car_rental, office=estate_agent, shop=wedding and so on), keyed by English and French stems, and keep a found business's tourism/amenity/leisure/sport tag as its category. Short stems like "bar" and "spa" are left out on purpose: they would match "barber" and "spare parts". No catch-all: an unmapped term still says so. Tests cover the new mappings, the refusal of an unknown term, and a hotel mapped as a way with a website. Live check: one category around one island returned 42 businesses, 9 with a website. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TXFEdszfwSRzoRoj9Nbbe2 Signed-off-by: niumanatini <356551963+niumanatini@users.noreply.github.com>
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.
What this changes
The free OpenStreetMap source only mapped home-services trades (roofers, plumbers, dentists, a few Spanish retail terms). An ICP of hotels, guesthouses, restaurants, dive centres, rentals, estate agents or wedding planners raised
OpenStreetMap has no category for …on every query and the run exited non-zero. Those businesses are premises, which is exactly what OSM maps well.TAG_MAPgains tourism and hospitality entries, keyed by English and French stems: hotels, motels, guesthouses and pensions, chambres d'hôtes, vacation rentals, bungalows, campsites, restaurants, cafés, snacks, dive and surf centres, boat and car rentals, travel agencies and excursions, estate agents, wedding and event planners, massage.tourism/amenity/leisure/sporttag as its category.barandspaare left out on purpose: they would match "barber" and "spare parts".CHANGELOG.mdupdated.How it was tested
tests/test_discover.py: ten term-to-tag cases, the refusal of an unknown term, and a hotel mapped as an OSM way with a website (category and domain kept).Checklist
pytestpasses.git commit -s).CHANGELOG.mdupdated if behaviour changed.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXFEdszfwSRzoRoj9Nbbe2