[postgis-tickets] [SCM] PostGIS branch main updated. 3.1.0rc1-358-gccf1cae

git at osgeo.org git at osgeo.org
Fri Jul 16 14:03:02 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, main has been updated
       via  ccf1cae72a34d4ad383f8463d06332185327ac8e (commit)
       via  150b346457f1b7d42cf5f8d88d6d3e569037cbbb (commit)
      from  8ed39fe907fedd88758020d49a0357aff6afefbb (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 ccf1cae72a34d4ad383f8463d06332185327ac8e
Merge: 8ed39fe 150b346
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Jul 16 14:02:34 2021 -0700

    Merge branch 'invmindist-fix' of https://github.com/cffk/postgis into main


commit 150b346457f1b7d42cf5f8d88d6d3e569037cbbb
Author: Charles Karney <charles at karney.com>
Date:   Fri Jun 11 14:53:46 2021 -0400

    Fix typo in setting of INVMINDIST.
    
    This fixes an obvious typo since 100nm = 100e-9 m = 1/1.0e7 m.  This
    only affects !defined(PROJ_GEODESIC) code which may not be active any
    more.
    
    However, to go back to the ticket #2168 that generated this INVMINDIST
    hack...
    
    defined(PROJ_GEODESIC) code for geodesics is guaranteed to be symmetric
    in the calculation of distances, i.e., dist(A,B) = dist(B,A).  So it
    would be better to avoid quantizing the distance calculation to fix a
    non-existent problem.
    
    Of course the length of a line string make change if it's reversed (just
    from the properties of floating point addition).  However the hack is
    still ill-advised.  If covers up the problem it most cases, but would
    exacerbate it in a small fraction of cases.
    
    I'm not making this change myself, because I'm not a direct user of
    PostGIS.

diff --git a/postgis/geography_measurement.c b/postgis/geography_measurement.c
index 0d1d388..bea5d9e 100644
--- a/postgis/geography_measurement.c
+++ b/postgis/geography_measurement.c
@@ -45,7 +45,7 @@
 #define INVMINDIST 1.0e8
 #else
 /* round to 100 nm precision */
-#define INVMINDIST 1.0e9
+#define INVMINDIST 1.0e7
 #endif
 
 Datum geography_distance(PG_FUNCTION_ARGS);

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

Summary of changes:
 postgis/geography_measurement.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list