[Tile-serving] [osm2pgsql-dev/osm2pgsql] Add grouped-linemerge generalization (PR #2482)

leijurv notifications at github.com
Tue Jun 23 17:44:49 UTC 2026


leijurv left a comment (osm2pgsql-dev/osm2pgsql#2482)

Great to hear!

I am not familiar with relations but if I'm understanding right, you want to attach some data (admin_level) to each linestring, and after merging, you want to know the lowest admin_level that went into each? I am not sure if I'm understanding right, but in my opinion I would add admin_level to the list of columns that we are grouping by, so they each get independently linemerged.

I do think that the Lua code could reasonably support multiple different global LineMerges at once, with different conditions and different grouping columns, such as indeed waterways, railway lines, admin boundaries. If you suggest some conditions and grouping columns I can prototype it in such a generic way?

Do you have any thoughts on the issues imagico raised here? https://github.com/openstreetmap-carto/openstreetmap-carto/issues/5244#issuecomment-4778677289

For example, would this be susceptible to DOS attacks?

My perspective is that I think this approach does not actually inflate the number of expired tiles. If you were to edit one way in the middle of a long linestring, it would indeed alter the entire linestring, but it would still only expire the actually edited area. This could cause temporary label / shield ripping at metatile boundaries until those other tiles also rerender. I wonder if this is fine? Or do you think this approach needs to somehow expire ALL affected tiles, including the additional that the recursive walk reached into?

Do you think there is a downside to the current approach making an arbitrarily long linestring, possibly thousands of km long? Should I think about trying to `segmentize` the final merged output?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2482#issuecomment-4781915216
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/pull/2482/c4781915216 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20260623/5ad3879e/attachment.htm>


More information about the Tile-serving mailing list