Skip to main content
edited tags
Link
RyanKDalton
  • 23.2k
  • 17
  • 112
  • 180
Source Link
Reid
  • 582
  • 4
  • 15

How to compute geodesic area in GeoDjango?

I have some polygons which can be anywhere in the world. I would like to compute their areas.

The GeoDjango docs for GEOSGeometry.area don't specify whether it is geometric or geodesic area, but given that GEOSGeometry.distance() says that "GEOS does not perform a spherical calculation even if the SRID specifies a geographic coordinate system", I suspect that it is a simple geometric area.

I'm willing to write a little code, but the shorter the better, of course.

We do have a working geodesic distance function already.