OpenStreetMap logo OpenStreetMap

Agasta07's Diary

Recent diary entries

Midterm is here, so this is a proper writeup of what’s landed so far, how the pieces fit together, and what the second half looks like. If you just want the code: everything described here merged in #4106.

Quick context for new readers: Nominatim identifies every place with a single class/type pair derived from OSM tags. An object tagged both tourism=hotel and amenity=restaurant becomes two rows in the database. Admin boundaries need admin_level special-casing everywhere. And there’s no way to express “wheelchair accessible cafe” at all. This project adds a proper category system to fix that at the database level.

Here’s the state of things at the halfway mark.

the data model: ltree[]

Categories are stored as an ltree[] column on place and placex, indexed with GiST. Each category is a dot-separated hierarchical path:

{osm.amenity.restaurant, osm.tourism.hotel}

I benchmarked this against TEXT[] with GIN during community bonding on a full planet import (~3 days to set up, worth it). The TEXT[] approach is what Photon effectively does at the OpenSearch level: pre-expand every prefix at index time (osm.amenity.restaurant also stores osm.amenity) and match with array overlap. It works, but you pay storage for every prefix of every category on every row, and the expansion logic lives in application code.

ltree understands hierarchy natively:


-- all amenities: restaurants, cafes, bars, everything below
WHERE categories @> 'osm.amenity'::ltree

-- exact match
WHERE 'osm.amenity.restaurant'::ltree = ANY(categories)

-- multi-value alternation (waterway checks)
WHERE categories ~ 'osm.waterway.river|stream|canal|drain|ditch'::lquery

Less storage, less code, and the query planner gets a real index to work with.

See full entry

Location: Action Area III, New Town, Kolkata Metropolitan Area, Rajarhat, North 24 Parganas, West Bengal, 700156, India

Hey there!! I’m Rupam Golui.. though most people online know me as Agasta and I honestly prefer that. I’m a 2nd year CS undergrad from Kolkata, India. Most of my time these days goes into open source and projects (GitHub: Itz-Agasta). I mostly work in Rust, Python, and TypeScript. Outside of code - I cook. Genuinely, not just survival cooking lol. I used to game a lot but somewhere along the way work took over and tbh I haven’t looked back. Also I love linux, currently running Arch (btw) and have been distro hopping since I was a kid… tried basically most of them, maybe move to nix next year. I rice my setup way more than I probably should, even participate in Reddit competitions for it. Could genuinely yap about this for hours. Yaa that’s mostly me, maybe someday I want to build a cool project people actually love enough that I can keep maintaining it full-time for years (hopefully).

Honestly I got here through a side project. Was building something with ocean data, needed maps, used Leaflet & Mapbox. But I got too curious about how all of it actually works behind the scenes - the data, the tools, the geocoding side of things. One thing led to another and I ended up deep in Nominatim’s codebase somehow. A few PRs later and here we are :)


Ok so - I got into GSoC 2026!

I’ll be working on native category support in OSM’s search engine Nominatim this summer, and I’m really excited about it.

Right now Nominatim classifies every place using a single OSM class/type pair - like amenity=restaurant. It’s simple and it works, but it has some real limitations:

See full entry

Location: Jadavpur, Kolkata, Kolkata Metropolitan Area, Kolkata, West Bengal, 700032, India