[SCM] PostGIS branch master updated. 3.4.0rc1-996-g0d0461b43

git at osgeo.org git at osgeo.org
Fri Mar 8 11:03:25 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  0d0461b431256ee0f949bcfd0064acea18deab84 (commit)
      from  6a6d7dadd98e79daa4abec3ae2d8dfc3f58618f9 (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 0d0461b431256ee0f949bcfd0064acea18deab84
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Mar 8 11:03:15 2024 -0800

    Calculate sphere area using the spheroid code, but with a spherical initialization. References #5671

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

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

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


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list