[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.3-35-gc07bff3

git at osgeo.org git at osgeo.org
Thu Jul 29 15:47:15 PDT 2021


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, stable-3.0 has been updated
       via  c07bff365eb5081032b05a76800283939ed9e249 (commit)
      from  f29da5d55f579b09710206550a5744164caef487 (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 c07bff365eb5081032b05a76800283939ed9e249
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Jul 29 15:47:11 2021 -0700

    Match tree to brute force return in geography distance, closes #4740

diff --git a/NEWS b/NEWS
index 0c17446..638bbca 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@ PostGIS 3.0.4dev
   - #4917, Fix crasher with '-' regclass (Paul Ramsey)
   - #4919, Rare crash in selectivity calculation (Paul Ramsey)
   - #4926, Preserve SRID on unions of empty geometry (Paul Ramsey)
+  - #4740, Round values in geography_distance_tree
+           as we do on geography_distance (Raúl Marín, Paul Ramsey, Regina Obe)
 
 
 PostGIS 3.0.3
diff --git a/postgis/geography_measurement.c b/postgis/geography_measurement.c
index aa66929..95c9019 100644
--- a/postgis/geography_measurement.c
+++ b/postgis/geography_measurement.c
@@ -379,6 +379,9 @@ Datum geography_distance_tree(PG_FUNCTION_ARGS)
 		PG_RETURN_NULL();
 	}
 
+	/* Knock off any funny business at the nanometer level, ticket #2168 */
+ 	distance = round(distance * INVMINDIST) / INVMINDIST;
+
 	PG_RETURN_FLOAT8(distance);
 }
 

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

Summary of changes:
 NEWS                            | 2 ++
 postgis/geography_measurement.c | 3 +++
 2 files changed, 5 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list