Skip to content

OSM discovery: tourism and hospitality categories, in English and French - #261

Open
niumanatini wants to merge 1 commit into
ethanplusai:mainfrom
niumanatini:feat/osm-tourism-categories
Open

niumanatini wants to merge 1 commit into
ethanplusai:mainfrom
niumanatini:feat/osm-tourism-categories

Conversation

@niumanatini

Copy link
Copy Markdown

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_MAP gains 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.
  • A found business keeps its 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, as before: a term OSM has no category for still says so.
  • Docs (sources table, troubleshooting) and CHANGELOG.md updated.

How it was tested

  • New tests in 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).
  • Full suite: 3,712 passed, 29 skipped.
  • Live check against Overpass: one category around one island returned 42 businesses, 9 with a website. The other live queries hit throttled mirrors, which the existing mirror walk reported as expected.

Checklist

  • No real person's or business's name, email, phone, address or domain anywhere in the code, tests, docs or this description (CONTRIBUTING.md).
  • pytest passes.
  • Commits are signed off (git commit -s).
  • Docs and CHANGELOG.md updated if behaviour changed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TXFEdszfwSRzoRoj9Nbbe2

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