<p></p>
<p dir="auto">Hi,</p>
<p dir="auto">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' (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="930739751" data-permission-text="Title is private" data-url="https://github.com/gravitystorm/openstreetmap-carto/issues/4431" data-hovercard-type="pull_request" data-hovercard-url="/gravitystorm/openstreetmap-carto/pull/4431/hovercard" href="https://github.com/gravitystorm/openstreetmap-carto/pull/4431">gravitystorm/openstreetmap-carto#4431</a>).</p>
<p dir="auto">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 <strong><em>de-duplicated</em></strong> 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.</p>
<p dir="auto">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".</p>
<p dir="auto">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.</p>
<p dir="auto">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).</p>
<p dir="auto"><strong>This raises a question for me:</strong></p>
<p dir="auto">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?</p>
<p dir="auto">Or is this outside of the capabilities of current flex processing?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/7635726/146638302-fc02f8cb-7edf-4a56-b681-b1028bc65d56.png"><img src="https://user-images.githubusercontent.com/7635726/146638302-fc02f8cb-7edf-4a56-b681-b1028bc65d56.png" alt="afbeelding" style="max-width: 100%;"></a></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/discussions/1595">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353R4B7DB24UZVUFYU4LURRTLFANCNFSM5KKQ4F3Q">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AA6353XIJSIH5CM3DZ2PO2LURRTLFA5CNFSM5KKQ4F32YY3PNVWWK3TUL52HS4DFVJCGS43DOVZXG2LPN2VGG33NNVSW45C7NFSM4ABZJFDQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/osm2pgsql/repo-discussions/1595</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/discussions/1595",
"url": "https://github.com/openstreetmap/osm2pgsql/discussions/1595",
"name": "View Discussion"
},
"description": "View this Discussion on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>