We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d4bb81 commit 32a0ef4Copy full SHA for 32a0ef4
src/output-pgsql.cpp
@@ -48,11 +48,11 @@ static double calculate_area(bool reproject_area,
48
geom::geometry_t const &geom4326,
49
geom::geometry_t const &geom)
50
{
51
+ static thread_local auto const proj3857 =
52
+ reprojection::create_projection(3857);
53
+
54
if (reproject_area) {
- // XXX there is some overhead here always dynamically
- // creating the same projection object. Needs refactoring.
- auto const ogeom =
55
- geom::transform(geom4326, *reprojection::create_projection(3857));
+ auto const ogeom = geom::transform(geom4326, *proj3857);
56
return geom::area(ogeom);
57
}
58
return geom::area(geom);
0 commit comments