[Tile-serving] [osm2pgsql] Add area reprojection facility (#454)
Frederik Ramm
notifications at github.com
Fri Oct 9 10:19:08 UTC 2015
> + reprojection = r;
> +}
> +
> +/**
> + * Computes area of given polygonal geometry.
> + * \return the area in projected units, or in EPSG 3857 if area reprojection is enabled
> + */
> +double geometry_builder::getArea(const geos::geom::Geometry *geom) const
> +{
> + // reprojection is not necessary, or has not been asked for.
> + if (!reprojection) {
> + return geom->getArea();
> + }
> +
> + // MultiPolygon - return sum of individual areas
> + if (const geos::geom::MultiPolygon* multi = dynamic_cast<const geos::geom::MultiPolygon *>(geom)) {
The "if !reprojection" path is tested in https://github.com/openstreetmap/osm2pgsql/pull/454/files#diff-d5b71a720f93c25bd9295e207018acdcR101 and https://github.com/openstreetmap/osm2pgsql/pull/454/files#diff-d5b71a720f93c25bd9295e207018acdcR105 - is it not?
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/454/files#r41616407
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20151009/e99ca3c8/attachment.html>
More information about the Tile-serving
mailing list