[Tile-serving] [openstreetmap/osm2pgsql] Set projection in flex output in column config (#1277)
Jochen Topf
notifications at github.com
Mon Oct 5 13:34:57 UTC 2020
@joto 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());
Yes, this is expensive. But this code is hopefully soon going to be revised anyway when we clean up the geometry generation with a cache holding already created geometries. I opted to leave this in for the time being. In most cases where this is used the projection for the `area` column will be the same as for the geometry column anyway, in which case the first option with the hard-coded `IdentityProjection` is used. So the expensive path here will only be taken if you use a non-mercator projection and use an area column.
--
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_r499602504
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20201005/52305fb9/attachment-0001.htm>
More information about the Tile-serving
mailing list