[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-70-g3bcbbee

git at osgeo.org git at osgeo.org
Sat Sep 26 09:27:23 PDT 2020


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  3bcbbee1324e0efe574481a59a603b4be85f962a (commit)
      from  f50dcaaaa7a0c77e84076d0543c3c48b3a4d9ad4 (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 3bcbbee1324e0efe574481a59a603b4be85f962a
Author: Regina Obe <lr at pcorp.us>
Date:   Sat Sep 26 12:27:08 2020 -0400

    References #4740 Round off geography_distance_tree

diff --git a/NEWS b/NEWS
index f07ba2e..fb8ff3f 100644
--- a/NEWS
+++ b/NEWS
@@ -36,6 +36,9 @@ Only tickets not included in 3.1.0alpha2
   - #4691, Fix segfault during gist index creation with empty geometries (Raúl Marín)
   - Fix handling of bad WKB inputs (Oracle types) and unit tests for
     malformed WKB. Remove memory leaks in malformed WKB cases. (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.1.0alpha2
diff --git a/postgis/geography_measurement.c b/postgis/geography_measurement.c
index 771ebb6..a975f2f 100644
--- a/postgis/geography_measurement.c
+++ b/postgis/geography_measurement.c
@@ -371,6 +371,8 @@ Datum geography_distance_tree(PG_FUNCTION_ARGS)
 		elog(ERROR, "geography_distance_tree failed!");
 		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                            | 3 +++
 postgis/geography_measurement.c | 2 ++
 2 files changed, 5 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list