<p dir="auto">This is intended to show how geometry processing in Lua could work. Only some example functions are implemented and not for all geometry types, error detection is limited etc.</p>
<p dir="auto">Geometry creation functions:</p>
<ul dir="auto">
<li>as_point() (for nodes)</li>
<li>as_linestring() (for ways)</li>
<li>as_polygon() (for ways)</li>
<li>as_multipolygon() (for relations)</li>
</ul>
<p dir="auto">Geometry functions:</p>
<ul dir="auto">
<li>area() (for polygons)</li>
<li>centroid() (for polygons)</li>
<li>simplify() (for linestrings)</li>
</ul>
<p dir="auto">See the file flex-config/custom-geometries.lua for an example that shows how to use these.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/osm2pgsql/pull/1636'>https://github.com/openstreetmap/osm2pgsql/pull/1636</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/commits/b5e1afffff45d0f4bf911bd47642949201f4129b" class="commit-link">b5e1aff</a>  Add adaptor making boost::geometry work with our geometry classes</li>
  <li><a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/commits/387d07a22b629626ebc0b368b601def73c2d5f70" class="commit-link">387d07a</a>  Work-in-progress: Add geometry functions in Lua</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files">11 files</a>)</p>
<ul>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-8b46efa1bb3e00c88db7b0f0917215a2cfddfcad3a8e3834ad60b0af8ed58fea">flex-config/custom-geometries.lua</a>
    (165)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-3becd6b99dba95a24ed8729d09b75a88064969ff88f781253936e0c271100817">src/flex-table-column.cpp</a>
    (23)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-4e7da7a4e257b2ad8f82435912c16f4470cc0b6697d54ca50c91e2aa8950d462">src/flex-table-column.hpp</a>
    (14)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-2a8ae1addbb4bf63595b2192b6a1f616448f86abae7d36b09138034018737f9f">src/geom-boost-adaptor.hpp</a>
    (84)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-eeac6509ffecc9e550350952fc431da09d7cd40c0d69ec9978b84fe20ce5ca32">src/geom-from-osm.cpp</a>
    (19)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-fa260a6b13bffcbbe5ac5807ec39f55aee170148d99c918ea11da8fa3018c548">src/geom-from-osm.hpp</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-8e516e3a075df67c9ff04b84cc4c11486e7811b1b1326eb1f6ef93867e1aa5fa">src/geom-functions.cpp</a>
    (45)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-c4360a478d6b2f8a59148d27de7598d79579ac8e68f4405dc5b0f5be7c6a765a">src/geom-functions.hpp</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-a9a99be0ba45d4d8da3becc16047e212b8c236764107727fd08da4a8b7751d5c">src/init.lua</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-becb223d44aa5a6bb197bf494c1e7e66308350843d927aed3363ce76a1945004">src/output-flex.cpp</a>
    (284)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1636/files#diff-785c8da946a79954c6089076f7bf9a585dc6822f989220fa918499e415dd5e46">src/output-flex.hpp</a>
    (11)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/osm2pgsql/pull/1636.patch'>https://github.com/openstreetmap/osm2pgsql/pull/1636.patch</a></li>
  <li><a href='https://github.com/openstreetmap/osm2pgsql/pull/1636.diff'>https://github.com/openstreetmap/osm2pgsql/pull/1636.diff</a></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">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353TXQAOZ5GY7Y243W3DUZPYYNANCNFSM5NSEM7JA">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/AA6353VUCEOSWXNZJI4W5O3UZPYYNA5CNFSM5NSEM7JKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4QYEHDUA.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</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",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1636",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>