[Tile-serving] [openstreetmap/osm2pgsql] Can stage 2 flex processing dissolve line geometries? (Discussion #1595)
mboeringa
notifications at github.com
Sat Dec 18 11:06:26 UTC 2021
Hi,
I have recently been exploring the possibilities of the new flex output based on Paul's development work for creating a "flex version" of 'openstreetmap-carto' (https://github.com/gravitystorm/openstreetmap-carto/pull/4431).
As one nice enhancement to the original 'openstreetmap-carto' style that Paul created, the new "flex version" of that style uses a Lua script that creates a new 'planet-osm-admin' table containing **_de-duplicated_** line geometries for OpenStreetMap admin_level boundaries, where the geometries of the lines always represent the highest rank admin_level that is present on a border line.
E.g. an "admin_level=2 " boundary line that is also an "admin_level=4" and "admin_level=8" boundary, will end up in the 'planet-osm-admin' table as "admin_level=2".
This allows symbolizing the lines in a more cartographically advanced way, e.g. by using open stippled lines like in true topographic maps, instead of having to properly stack solid lines for different admin_levels to "hide" less important border lines as is needed with polygon outline symbology.
While nice, the current implementation of the Lua style has one issue: common boundaries of the same admin_level between e.g. two bordering countries, are not being dissolved into a single line. E.g. see the attached image, where the boundary between Liechtenstein and Austria consists of multiple segments, as highlighted by a selected light blue segment. This may subsequently cause symbolization discontinuities between individual segments of a single border, a problem which is hardly noticeable at large scales (e.g. > 1:50k), but gets worse with smaller scales (e.g. 1:1M).
**This raises a question for me:**
Would it potentially be technically possible to use osm2pgsql's stage 1/2 flex processing to merge all the segments of a single boundary line, where the segments are all of the same admin_level (e.g. "admin_level=2"), and the "admin_level=x" relations associated with them are the same?
Or is this outside of the capabilities of current flex processing?

--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/discussions/1595
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/repo-discussions/1595 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20211218/9fe2bb86/attachment.htm>
More information about the Tile-serving
mailing list