[SCM] PostGIS branch master updated. 3.4.0rc1-997-g7bd482a69

git at osgeo.org git at osgeo.org
Fri Mar 8 11:06:44 PST 2024


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  7bd482a696fd4ac419bf76f4483143112b0396d5 (commit)
      from  0d0461b431256ee0f949bcfd0064acea18deab84 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7bd482a696fd4ac419bf76f4483143112b0396d5
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Mar 8 11:06:35 2024 -0800

    Revert "Calculate sphere area using the spheroid code, but with a spherical initialization. References #5671"
    
    This reverts commit 0d0461b431256ee0f949bcfd0064acea18deab84.

diff --git a/postgis/geography_measurement.c b/postgis/geography_measurement.c
index 8419d7aa7..dc8bde060 100644
--- a/postgis/geography_measurement.c
+++ b/postgis/geography_measurement.c
@@ -538,8 +538,11 @@ Datum geography_area(PG_FUNCTION_ARGS)
 	if ( ! use_spheroid )
 		s.a = s.b = s.radius;
 
-	/* Calculate the area, using the given spheroid. */
-	area = lwgeom_area_spheroid(lwgeom, &s);
+	/* Calculate the area */
+	if ( use_spheroid )
+		area = lwgeom_area_spheroid(lwgeom, &s);
+	else
+		area = lwgeom_area_sphere(lwgeom, &s);
 
 	/* Clean up */
 	lwgeom_free(lwgeom);

-----------------------------------------------------------------------

Summary of changes:
 postgis/geography_measurement.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list