[Proj4j] Proj4 area is incorrect?

Isak B. gisboy at protonmail.com
Wed Dec 4 05:46:17 PST 2019


Hi Proj4 developers and users,

I have a polygon in kml file (epsg 4326).
I wanted to calculate its area in sq. km.
I used the following code

poly = transform(partial(pyproj.transform,  pyproj.Proj(init='epsg:4326'),pyproj.Proj(init='epsg:3857')), poly)
print (poly.area/1000000)

However, this result is more than 100 sq.km. larger than the area shown in google earth.
So, what's wrong with transferring into epsg 3857 and calculating area in shapely (the first code)?

Thanks for your ideas.

Isak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj4j/attachments/20191204/26611404/attachment.html>


More information about the Proj4j mailing list