[Tile-serving] [osm2pgsql] Add area reprojection facility (#454)
Sarah Hoffmann
notifications at github.com
Sun Oct 25 07:53:02 UTC 2015
> + (*projectedHoles)[i] = reproject_linearring(hole);
> + }
> + const auto *projectedPoly = poly->getFactory()->createPolygon(projectedExt, projectedHoles);
> +
> + auto area = projectedPoly->getArea();
> + delete projectedPoly;
> + return area;
> +}
> +
> +/**
> + * Reprojects given Linear Ring from target projection to spherical mercator.
> + * Caller takes ownership of return value.
> + */
> +geos::geom::LinearRing* geometry_builder::reproject_linearring(const geos::geom::LineString *ls) const
> +{
> + std::vector<geos::geom::Coordinate> *projectedCoords = new std::vector<geos::geom::Coordinate>();
Dito, use unique_ptr.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/454/files#r42942336
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20151025/c7493911/attachment.html>
More information about the Tile-serving
mailing list