[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.1-18-g9b78c9c
git at osgeo.org
git at osgeo.org
Thu Feb 18 10:16:31 PST 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.1 has been updated
via 9b78c9c4209126e371751da17277813ebda83f09 (commit)
via 4845b918c3d36d591cd55dd583cbcd28c65e52b1 (commit)
via 4ba2883a45efee98b0ae9aec3c8868856a478ac1 (commit)
from 517e07fb99e7a2b2c1849256f8fa950ab3295b02 (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 9b78c9c4209126e371751da17277813ebda83f09
Merge: 4845b91 517e07f
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Feb 18 10:16:24 2021 -0800
Merge branch 'stable-3.1' of https://git.osgeo.org/gitea/postgis/postgis into stable-3.1
diff --cc NEWS
index e303908,799458f..67a4bd4
--- a/NEWS
+++ b/NEWS
@@@ -9,7 -9,7 +9,8 @@@ PostGIS 3.1.
- #4842, Only do axis flips on CRS that have a "Lat" as the first column (Paul Ramsey)
- Support recent Proj versions that have removed pj_get_release (Paul Ramsey)
- #4835, Adjust tolerance for geodetic calculations (Paul Ramsey)
+ - #4840, Improper conversion of negative geographic azimuth to positive (Paul Ramsey)
+ - #4853, DBSCAN cluster not formed when recordset length equal to minPoints (Dan Baston)
PostGIS 3.1.1
diff --cc regress/core/tickets.sql
index e1b5686,a9b357b..14bb61b
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@@ -1319,24 -1319,5 +1319,26 @@@ SELECT '#4796', st_astext(st_snaptogrid
SELECT '#4812', st_srid('SRID=999999;POINT(1 1)'::geometry);
+SELECT
+'#4840',
+round(degrees(ST_azimuth(C,N))) AS az_n,
+round(degrees(ST_azimuth(C,NE))) AS az_ne,
+round(degrees(ST_azimuth(C,E))) AS az_e,
+round(degrees(ST_azimuth(C,SE))) AS az_se,
+round(degrees(ST_azimuth(C,S))) AS az_s,
+round(degrees(ST_azimuth(C,SW))) AS az_sw,
+round(degrees(ST_azimuth(C,W))) AS az_w,
+round(degrees(ST_azimuth(C,NW))) AS az_nw
+FROM (SELECT
+'POINT(5 55)'::geography AS C,
+'POINT(5 56)'::geography AS N,
+'POINT(6 56)'::geography AS NE,
+'POINT(6 55)'::geography AS E,
+'POINT(6 54)'::geography AS SE,
+'POINT(5 54)'::geography AS S,
+'POINT(4 54)'::geography AS SW,
+'POINT(4 55)'::geography AS W,
+'POINT(4 56)'::geography AS NW ) points;
+
+ SELECT '#4853', ST_ClusterDBSCAN(geom, eps := 0.000906495804256269, minpoints := 4) OVER() AS cid FROM (VALUES ('0101000020E6100000E4141DC9E5934B40D235936FB6193940'::geometry), ('0101000020E6100000C746205ED7934B40191C25AFCE193940'::geometry), ('0101000020E6100000C780ECF5EE934B40B6BE4868CB193940'::geometry), ('0101000020E6100000ABB2EF8AE0934B404451A04FE4193940'::geometry)) AS t(geom);
+
diff --cc regress/core/tickets_expected
index 7acf4e9,f35829f..08b46aa
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@@ -440,4 -440,7 +440,8 @@@ ERROR: LWGEOM_addpoint: Invalid offse
#4727|0
#4796|POLYGON((178632 397744,178738 397769,178745 397741,178749 397742,178752 397727,178748 397726,178759 397684,178699 397669,178694 397691,178646 397680,178632 397744))
#4812|999999
+#4840|0|29|90|149|180|211|270|331
+ #4853|0
+ #4853|0
+ #4853|0
+ #4853|0
commit 4845b918c3d36d591cd55dd583cbcd28c65e52b1
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Feb 18 10:15:15 2021 -0800
Add NEWS entry for #4840
diff --git a/NEWS b/NEWS
index 44d0283..e303908 100644
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,8 @@ PostGIS 3.1.2
- #4817, handle more complex compound coordinate dystems (Paul Ramsey)
- #4842, Only do axis flips on CRS that have a "Lat" as the first column (Paul Ramsey)
- Support recent Proj versions that have removed pj_get_release (Paul Ramsey)
- - $4835, Adjust tolerance for geodetic calculations (Paul Ramsey)
+ - #4835, Adjust tolerance for geodetic calculations (Paul Ramsey)
+ - #4840, Improper conversion of negative geographic azimuth to positive (Paul Ramsey)
PostGIS 3.1.1
commit 4ba2883a45efee98b0ae9aec3c8868856a478ac1
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Feb 18 09:46:52 2021 -0800
Mistake in converting negative azimuth values to positive
results in incorrect azimuths in geography.
Closes #4840
diff --git a/liblwgeom/lwgeodetic.c b/liblwgeom/lwgeodetic.c
index cac4310..f847bb4 100644
--- a/liblwgeom/lwgeodetic.c
+++ b/liblwgeom/lwgeodetic.c
@@ -2177,7 +2177,8 @@ double lwgeom_azumith_spheroid(const LWPOINT *r, const LWPOINT *s, const SPHEROI
/* Do the direction calculation */
az = spheroid_direction(&g1, &g2, spheroid);
/* Ensure result is positive */
- return az > 0 ? az : M_PI - az;
+ return az < -0 ? 2*M_PI + az : az;
+ // return az;
}
/**
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index da3ea27..e1b5686 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1318,3 +1318,25 @@ SELECT '#4727', _ST_DistanceTree('SRID=4326;POLYGON((-179.9 -85.05112877980659,
SELECT '#4796', st_astext(st_snaptogrid(st_normalize(st_simplifypreservetopology('MULTISURFACE(((178632.044 397744.007,178631.118 397743.786,178646.399 397679.574,178693.864 397690.889,178698.958 397669.487,178700.206 397669.784,178758.532 397683.689,178748.351 397726.468,178752.199 397727.384,178748.782 397741.904,178744.897 397740.98,178738.157 397769.303,178632.044 397744.007)))'::geometry,1)),1));
SELECT '#4812', st_srid('SRID=999999;POINT(1 1)'::geometry);
+
+SELECT
+'#4840',
+round(degrees(ST_azimuth(C,N))) AS az_n,
+round(degrees(ST_azimuth(C,NE))) AS az_ne,
+round(degrees(ST_azimuth(C,E))) AS az_e,
+round(degrees(ST_azimuth(C,SE))) AS az_se,
+round(degrees(ST_azimuth(C,S))) AS az_s,
+round(degrees(ST_azimuth(C,SW))) AS az_sw,
+round(degrees(ST_azimuth(C,W))) AS az_w,
+round(degrees(ST_azimuth(C,NW))) AS az_nw
+FROM (SELECT
+'POINT(5 55)'::geography AS C,
+'POINT(5 56)'::geography AS N,
+'POINT(6 56)'::geography AS NE,
+'POINT(6 55)'::geography AS E,
+'POINT(6 54)'::geography AS SE,
+'POINT(5 54)'::geography AS S,
+'POINT(4 54)'::geography AS SW,
+'POINT(4 55)'::geography AS W,
+'POINT(4 56)'::geography AS NW ) points;
+
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index 181f22f..7acf4e9 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -440,3 +440,4 @@ ERROR: LWGEOM_addpoint: Invalid offset
#4727|0
#4796|POLYGON((178632 397744,178738 397769,178745 397741,178749 397742,178752 397727,178748 397726,178759 397684,178699 397669,178694 397691,178646 397680,178632 397744))
#4812|999999
+#4840|0|29|90|149|180|211|270|331
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
liblwgeom/lwgeodetic.c | 3 ++-
regress/core/tickets.sql | 21 +++++++++++++++++++++
regress/core/tickets_expected | 1 +
4 files changed, 25 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list