[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.4-8-gf42489b4a
git at osgeo.org
git at osgeo.org
Mon Nov 1 07:01:52 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.1 has been updated
via f42489b4ad4131097b71a4e8a67b8a21df228513 (commit)
via 4686579f6c442898a26ed988ade18d4784318411 (commit)
via 97565e7a82ebbe3ae0f8b61c32ce8045bedd9247 (commit)
from ec7f996bc9537919ea900f2517ab6ceae78c2b70 (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 f42489b4ad4131097b71a4e8a67b8a21df228513
Author: Regina Obe <lr at pcorp.us>
Date: Mon Nov 1 10:00:47 2021 -0400
Doc clarifications for ST_ShiftLongitude
from Lauri Kajan
Closes #5010
diff --git a/doc/reference_editor.xml b/doc/reference_editor.xml
index 671235bac..65ad55f51 100644
--- a/doc/reference_editor.xml
+++ b/doc/reference_editor.xml
@@ -1682,14 +1682,14 @@ LINESTRING(0 0,1 1,0 0,3 3,4 4)
<refnamediv>
<refname>ST_ShiftLongitude</refname>
- <refpurpose>Shifts a geometry with geographic coordinates between -180..180 and 0..360.</refpurpose>
+ <refpurpose>Shifts the longitude coordinates of a geometry between -180..180 and 0..360.</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
<funcdef>geometry <function>ST_ShiftLongitude</function></funcdef>
- <paramdef><type>geometry </type> <parameter>geomA</parameter></paramdef>
+ <paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -1697,9 +1697,9 @@ LINESTRING(0 0,1 1,0 0,3 3,4 4)
<refsection>
<title>Description</title>
- <para>Reads every point/vertex in a geometry, and if the longitude coordinate is <0, adds 360
- to it. The result is a 0-360 version of the data to be
- plotted in a 180 centric map</para>
+ <para>Reads every point/vertex in a geometry, and shifts its longitude coordinate from -180..0 to 180..360 and vice versa if between these ranges.
+ This function is symmetrical so the result is a 0..360 representation of a -180..180 data and a -180..180 representation of a 0..360 data.
+ </para>
<note><para>This is only useful for data with coordinates in
longitude/latitude; e.g. SRID 4326 (WGS 84 geographic)</para></note>
@@ -1718,19 +1718,28 @@ LINESTRING(0 0,1 1,0 0,3 3,4 4)
<refsection>
<title>Examples</title>
- <programlisting>--3d points
-SELECT ST_AsEWKT(ST_ShiftLongitude(ST_GeomFromEWKT('SRID=4326;POINT(-118.58 38.38 10)'))) As geomA,
- ST_AsEWKT(ST_ShiftLongitude(ST_GeomFromEWKT('SRID=4326;POINT(241.42 38.38 10)'))) As geomb
-geomA geomB
----------- -----------
-SRID=4326;POINT(241.42 38.38 10) SRID=4326;POINT(-118.58 38.38 10)
+ <programlisting>--single point forward transformation
+SELECT ST_AsText(ST_ShiftLongitude('SRID=4326;POINT(270 0)'::geometry))
+
+st_astext
+----------
+POINT(-90 0)
+
+
+--single point reverse transformation
+SELECT ST_AsText(ST_ShiftLongitude('SRID=4326;POINT(-90 0)'::geometry))
+
+st_astext
+----------
+POINT(270 0)
+
---regular line string
-SELECT ST_AsText(ST_ShiftLongitude(ST_GeomFromText('LINESTRING(-118.58 38.38, -118.20 38.45)')))
+--for linestrings the functions affects only to the sufficient coordinates
+SELECT ST_AsText(ST_ShiftLongitude('SRID=4326;LINESTRING(174 12, 182 13)'::geometry))
st_astext
----------
-LINESTRING(241.42 38.38,241.8 38.45)
+LINESTRING(174 12,-178 13)
</programlisting>
</refsection>
commit 4686579f6c442898a26ed988ade18d4784318411
Merge: 97565e7a8 ec7f996bc
Author: Regina Obe <lr at pcorp.us>
Date: Mon Nov 1 10:00:19 2021 -0400
Merge branch 'stable-3.1' of https://git.osgeo.org/gitea/postgis/postgis into stable-3.1
commit 97565e7a82ebbe3ae0f8b61c32ce8045bedd9247
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Oct 14 11:53:30 2021 -0700
Round off some regression results to avoid spurious regression test failures under the latest GEOS release.
diff --git a/regress/core/regress_buffer_params.sql b/regress/core/regress_buffer_params.sql
index 2e05a7f08..21a7e76c9 100644
--- a/regress/core/regress_buffer_params.sql
+++ b/regress/core/regress_buffer_params.sql
@@ -5,7 +5,7 @@
-- Ouput is snapped to grid to account for small floating numbers
-- differences between architectures
-SELECT 'point quadsegs=2', ST_AsText(st_buffer('POINT(0 0)', 1, 'quad_segs=2'), 4);
+SELECT 'point quadsegs=2', ST_AsText(ST_SnapToGrid(st_buffer('POINT(0 0)', 1, 'quad_segs=2'),0.0001), 4);
SELECT 'line quadsegs=2', ST_AsText(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2'), 3);
SELECT 'line quadsegs=2 endcap=flat', ST_AsText(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2 endcap=flat'), 5);
SELECT 'line quadsegs=2 endcap=butt', ST_AsText(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2 endcap=butt'), 5);
diff --git a/regress/core/regress_buffer_params_expected b/regress/core/regress_buffer_params_expected
index 6bd9d4f0e..28847444e 100644
--- a/regress/core/regress_buffer_params_expected
+++ b/regress/core/regress_buffer_params_expected
@@ -1,4 +1,4 @@
-point quadsegs=2|POLYGON((1 0,0.7071 -0.7071,1.6155e-15 -1,-0.7071 -0.7071,-1 -3.2311e-15,-0.7071 0.7071,-4.6246e-15 1,0.7071 0.7071,1 0))
+point quadsegs=2|POLYGON((1 0,0.7071 -0.7071,0 -1,-0.7071 -0.7071,-1 0,-0.7071 0.7071,0 1,0.7071 0.7071,1 0))
line quadsegs=2|POLYGON((10 2,11.414 1.414,12 0,11.414 -1.414,10 -2,0 -2,-1.414 -1.414,-2 2.449e-16,-1.414 1.414,0 2,10 2))
line quadsegs=2 endcap=flat|POLYGON((10 2,10 -2,0 -2,0 2,10 2))
line quadsegs=2 endcap=butt|POLYGON((10 2,10 -2,0 -2,0 2,10 2))
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index dd4d36511..e07b50c7e 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -311,7 +311,7 @@ SELECT '#650', ST_AsText(ST_Collect(ARRAY[ST_MakePoint(0,0), ST_MakePoint(1,1),
--SELECT '#662', ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_SetSRID(ST_MakePointM(i+m,j,m),4326),ST_SetSRID(ST_MakePointM(j+m,i-m,m),4326)),ST_SetSRID(ST_MakePointM(i,j,m),4326)),ST_SetSRID(ST_MakePointM(i+m,j,m),4326))) As the_geom FROM generate_series(-10,50,20) As i CROSS JOIN generate_series(50,70, 20) As j CROSS JOIN generate_series(1,2) As m ORDER BY i, j, m, i*j*m LIMIT 1;
-- #667 --
-SELECT '#667', ST_AsEWKT(ST_LineToCurve(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j))) As the_geom FROM generate_series(-10,50,10) As i CROSS JOIN generate_series(40,70, 20) As j ORDER BY i, j, i*j LIMIT 1;
+SELECT '#667', ST_AsText(ST_LineToCurve(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j)),4) As geom FROM generate_series(-10,50,10) As i CROSS JOIN generate_series(40,70, 20) As j ORDER BY i, j, i*j LIMIT 1;
-- #677 --
SELECT '#677.deprecated',round(ST_DistanceSpheroid(ST_GeomFromEWKT('MULTIPOLYGON(((-10 40,-10 55,-10 70,5 40,-10 40)))'), ST_GeomFromEWKT('MULTIPOINT(20 40,20 55,20 70,35 40,35 55,35 70,50 40,50 55,50 70)'), 'SPHEROID["GRS_1980",6378137,298.257222101]')) As result;
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index f8dfdd934..91b8e7cc6 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -93,7 +93,7 @@ NOTICE: IllegalArgumentException: Invalid number of points in LinearRing found
#835.11|MULTILINESTRING EMPTY
#835.12|MULTIPOLYGON EMPTY
#650|MULTIPOINT(0 0,1 1,2 2)
-#667|SRID=4326;CURVEPOLYGON(CIRCULARSTRING(30 40,-50 39.99999999999987,30 40))
+#667|CURVEPOLYGON(CIRCULARSTRING(30 40,-50 40,30 40))
#677.deprecated|1121395
#677|1121395
#680|01d107000000000000000024c000000000000049400000000000000040
-----------------------------------------------------------------------
Summary of changes:
doc/reference_editor.xml | 37 +++++++++++++++++++++++--------------
1 file changed, 23 insertions(+), 14 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list