<p></p>
<p><b>@lonvia</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/osm2pgsql/pull/1277#discussion_r500088350">src/output-flex.cpp</a>:</p>
<pre style='color:#555'>>                  double const area =
-                    get_options()->reproject_area
-                        ? ewkb::parser_t(geom).get_area<reprojection>(
-                              get_options()->projection.get())
-                        : ewkb::parser_t(geom)
-                              .get_area<osmium::geom::IdentityProjection>();
+                    column.srid() == srid
+                        ? ewkb::parser_t(geom)
+                              .get_area<osmium::geom::IdentityProjection>()
+                        : ewkb::parser_t(geom).get_area<reprojection>(
+                              reprojection::create_projection(srid).get());
</pre>
<p>I disagree that geometry generation will automatically fix that. The problem at hand here is that this PR switches from having one global projection object to instantiating them locally with potentially different projections. This is orthogonal to having multiple geometries (which would still all use the same global projection if it wasn't for this PR). Fixing this requires to reconsider how the projection code is called, possibly getting rid of the shared object and having something lightweight that can be instantiated on the fly.</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/pull/1277#discussion_r500088350">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353XS2POQXS6PP7CQMJLSJLG4DANCNFSM4SADFGBQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353WRLMIGZGNY56H7MNDSJLG4DA5CNFSM4SADFGB2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODX3HB3A.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/pull/1277#discussion_r500088350",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1277#discussion_r500088350",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>