Why are these results different? The only difference is the coordinate. Seem like the area should be the same.

   st_area(st_buffer(st_setsrid(st_point(-70, 40), 4326)::geography, 10)) AS ex1,
   st_area(st_buffer(st_setsrid(st_point(-71, 40), 4326)::geography, 10)) AS ex2;
       ex1        |       ex2
 312.338323043769 | 312.17021877505
(1 row)
  • 4326 is not a coordinate system that should be used for area, distance, length, or generally any calculation beyond location. Try using a projected coordinate system - preferably one that maintains area - and test this out. – DPSSpatial Aug 27 '15 at 17:12
  • This answer provides a nice illustration of why you can't use 4326 for things like that. – Evil Genius Aug 27 '15 at 17:59
  • 1
    Read the question closer, there is a cast to geography. I do not know why area differs. By reading postgis.net/docs/ST_Area.html you are doing the right thing. – user30184 Aug 27 '15 at 18:00

From http://www.postgis.org/docs/ST_Buffer.html:

Geography: For geography this is really a thin wrapper around the geometry implementation. It first determines the best SRID that fits the bounding box of the geography object (favoring UTM, Lambert Azimuthal Equal Area (LAEA) north/south pole, and falling back on mercator in worst case scenario) and then buffers in that planar spatial ref and retransforms back to WGS84 geography.

So a small difference because of different projection can be expected.

  • 1
    Would Anita's answer in this thread overcome the warped circles? gis.stackexchange.com/questions/13258/… – DPSSpatial Aug 27 '15 at 18:34
  • 1
    @mapBaker Using geography instead of geometry "overcomes the warped circles". This is not topic of ralphe's question, note that he requested 10 m buffers, not 10 degrees. Even in 4326, "circles" on the same latitude would have the same area, as you can see in Anita's graphic. – Redoute Aug 27 '15 at 18:52

More specific to the answer by Redoute is that the two points are projected to EPSG:32619 (WGS 84 / UTM zone 19N), determined by the utility _ST_BestSRID(geog), which have transformed coordinates:

  • ex1: SRID=-32619;POINT(414639.538157217 4428236.06463343)
  • ex2: SRID=-32619;POINT(329274.505728464 4429672.97311587)

These points are buffered by 10.0 m (in Cartesian space), and projected back to geographic coordinates, where a geodesic area is finally calculated. The differences are due to distortions of UTM Zones on an ellipsoid of revolution (aka spheroid). The calculations are generally better when they are near the middle of the UTM zones, and worse when they are near the boundary of two zones (e.g. Calgary).

A very good calculation for the buffered point is 312.3 m².

And the area for a perfect circle with radius 10 m in Cartesian space is π10² = 314.159265358979323846264338327950288419716939937510... m².

The area of a perfect circle will always be bigger than the area from ST_Buffer, since ST_Buffer makes a polygon with the curved edges cut off.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.