Category Support in Nominatim
Nominatim currently classifies places using a single OSM class/type pair, which causes duplicate database entries for multi-tagged objects, fragile handling of administrative boundaries, and insufficient granularity for modern search queries. This project adds native category support to Nominatim's PostgreSQL backend by introducing a categories column across the place, placex, and search_name tables using PostgreSQL's ltree[] type for hierarchical querying. Categories are assigned in the Lua import scripts following Photon's osm.<class>.<type> approach, replacing the place_classtype_* tables currently used for POI filtering. Deliverables include: schema changes with migration support for existing installations, Lua-based category assignment, replacement of classtype table lookups with category-based queries in search_name, and as stretch goals, API include/exclude filtering parameters and a flexible YAML-driven CategoryGenerator for enriched categories like cuisine.italian or access.wheelchair.yes.
Project details
Technologies
Not listed in the archive