<p>That indeed does not work. As I said, osm2pgsql does not take any membership order into account. It just assembles the geometries of the members to longest possible lines. The order is determined by internals of the algorithm.</p>
<p>We don't have any immediate plans to add such a feature but we are discussing options to add more configurability in that regard with the new Lua API (<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="400030727" data-permission-text="Issue title is private" data-url="https://github.com/openstreetmap/osm2pgsql/issues/901" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/osm2pgsql/issues/901/hovercard" href="https://github.com/openstreetmap/osm2pgsql/issues/901">#901</a>). I've modified the title of the ticket and leave it open as something to look at for the next major version.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/issues/984?email_source=notifications&email_token=AA6353VDZIWZW7Y4EHKBX3DQUTXRXA5CNFSM4JPF2XC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEREDOQ#issuecomment-555893178">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353XJYQGPIWQIPN2DZZDQUTXRXANCNFSM4JPF2XCQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353VGACDZVHK2AUR64UDQUTXRXA5CNFSM4JPF2XC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEREDOQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/issues/984?email_source=notifications\u0026email_token=AA6353VDZIWZW7Y4EHKBX3DQUTXRXA5CNFSM4JPF2XC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEREDOQ#issuecomment-555893178",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/984?email_source=notifications\u0026email_token=AA6353VDZIWZW7Y4EHKBX3DQUTXRXA5CNFSM4JPF2XC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEREDOQ#issuecomment-555893178",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>