<p></p>
<p dir="auto">There are some issues with this approach:</p>
<ul dir="auto">
<li>Performance: It is unclear whether all of this processing and jumping between C++ and Lua is fast enough. This needs more testing.</li>
<li>Projections: Currently you can set the projection only in the table definition and it will be done automatically when a geometry is set. This is probably not enough, for instance when calculating an area in a different projection, we need to be able to project first, then calculate the area. So something like this would probably need adding: <code>geom:as_polygon():transform(3857):area()</code>.</li>
<li>Backwards compatibility and "magic" geometry processing: The old way of handling geometries was somewhat magic, for instance long lines could be split and then <code>add_row()</code> would add multiple rows with those split geometries. The "new" way doesn't do that any more. We'd have a <code>split_linestrings()</code> function in Lua and then need to write a loop in Lua to add several rows. This makes certain types of processing harder to write in the config file and (probably) slower to process. But it allows more flexibility, for instance now multiple geometry columns are easily done, because the new geometry column types behave just like any other column type. It is difficult to wrap your head around all this, especially when old and new geometry types are mixed.</li>
</ul>

<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/pull/1636#issuecomment-1030150616">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353X5ISUN66FL4J4W5GDUZP5WXANCNFSM5NSEM7JA">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/AA6353T6F447SABWWG27VC3UZP5WXA5CNFSM5NSEM7JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHVTNTWA.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/pull/1636/c1030150616</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/pull/1636#issuecomment-1030150616",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1636#issuecomment-1030150616",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>