[Tile-serving] [openstreetmap/osm2pgsql] Set projection in flex output in column config (#1277)

Sarah Hoffmann notifications at github.com
Tue Oct 6 08:16:01 UTC 2020


@lonvia commented on this pull request.



>                  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());

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.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1277#discussion_r500088350
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20201006/1dcba251/attachment.htm>


More information about the Tile-serving mailing list