Commit graph

2 commits

Author SHA1 Message Date
248f4bded4 Fix wiki lookup to match on name+state+country instead of osm_key/osm_value
- Remove osm_key/osm_value from wiki_places lookup query
- Add fallback matching: try state first, then country only
- Parse state/country from wikipedia extratag when address is empty
- Add US states and Canadian provinces parsing for wikipedia titles
- Apply wiki enrichment to cached results (was missing)

Fixes wiki_summary and wiki_url not appearing for boundary/administrative
places like Joliet, IL where OSM returns boundary/administrative but
wiki_places has place/city.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-03 00:17:49 +00:00
Ubuntu
2d1dcbf70c feat(place): add wiki location index lookup
Add wiki summary, URLs, and population data from wiki_index.db to
place detail and reverse geocode responses.

- Add lib/wiki_index.py: SQLite read-only lookup module
- Enrich /api/place responses via _enrich_with_wiki_index()
- Enrich /api/reverse responses via _enrich_reverse_result_with_wiki()
- Gate on has_kiwix_wiki feature flag (default false in home.yaml)
- Direct match only on place_name + osm_key + osm_value + state + country_code
- Additive fields: wiki_summary, wiki_url, wikivoyage_url, wiki_population

DB path: /opt/recon/data/wiki_index.db

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-29 17:07:31 +00:00