[postgis-tickets] [SCM] PostGIS branch main updated. 3.2.0alpha1-42-gf075d02
git at osgeo.org
git at osgeo.org
Wed Sep 29 07:05:43 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 f075d028c0988a9f7b000211901a099618bae537 (commit)
from 066e0de515337a503fe848c18cb928b77c96964f (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 f075d028c0988a9f7b000211901a099618bae537
Author: Sandro Santilli <strk at kbt.io>
Date: Wed Sep 29 16:05:22 2021 +0200
Add documentation for ST_Scroll
diff --git a/doc/reference_editor.xml b/doc/reference_editor.xml
index 96f37c8..719b46e 100644
--- a/doc/reference_editor.xml
+++ b/doc/reference_editor.xml
@@ -425,6 +425,52 @@ st_astext
</refsection>
</refentry>
+ <refentry id="ST_Scroll">
+ <refnamediv>
+ <refname>ST_Scroll</refname>
+ <refpurpose>Change start point of a closed LineString.</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>geometry <function>ST_Scroll</function></funcdef>
+ <paramdef><type>geometry</type> <parameter>linestring</parameter></paramdef>
+ <paramdef><type>geometry</type> <parameter>point</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsection>
+ <title>Description</title>
+
+ <para>
+Changes the start/end point of a closed LineString to
+the given vertex <parameter>point</parameter>.
+ </para>
+ <para>Availability: 3.2.0</para>
+ <para>&Z_support;</para>
+ <para>&M_support;</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+
+ <para>Make e closed line start at its 3rd vertex</para>
+<programlisting>
+SELECT ST_AsEWKT(ST_Scroll('SRID=4326;LINESTRING(0 0 0 1, 10 0 2 0, 5 5 4 2,0 0 0 1)', 'POINT(5 5 4 2)'));
+
+st_asewkt
+----------
+SRID=4326;LINESTRING(5 5 4 2,0 0 0 1,10 0 2 0,5 5 4 2)
+</programlisting>
+
+ </refsection>
+ <refsection>
+ <title>See Also</title>
+ <para><xref linkend="ST_Normalize"/>, <xref linkend="ST_Normalize" /></para>
+ </refsection>
+</refentry>
+
<refentry id="ST_FlipCoordinates">
<refnamediv>
<refname>ST_FlipCoordinates</refname>
diff --git a/regress/core/scroll.sql b/regress/core/scroll.sql
index 113054c..1de9165 100644
--- a/regress/core/scroll.sql
+++ b/regress/core/scroll.sql
@@ -5,3 +5,9 @@ SELECT ST_Scroll('LINESTRING(0 0, 10 0, 5 5)', 'POINT(0 0)');
SELECT ST_AsEWKT(ST_Scroll('SRID=4326;LINESTRING(0 0, 10 0, 5 5,0 0)', 'POINT(0 0)'));
SELECT ST_AsEWKT(ST_Scroll('SRID=4326;LINESTRING(0 0, 10 0, 5 5,0 0)', 'POINT(5 5)'));
SELECT ST_AsEWKT(ST_Scroll('SRID=4326;LINESTRING(0 0, 10 0, 5 5,0 0)', 'POINT(10 0)'));
+
+SELECT ST_AsEWKT(ST_Scroll('SRID=4326;LINESTRINGM(0 0 0, 10 0 2, 5 5 4,0 0 0)', 'POINT(10 0 2)'));
+
+SELECT ST_AsEWKT(ST_Scroll('SRID=4326;LINESTRINGZ(0 0 0, 10 0 2, 5 5 4,0 0 0)', 'POINT(5 5 4)'));
+
+SELECT ST_AsEWKT(ST_Scroll('SRID=4326;LINESTRING(0 0 0 1, 10 0 2 0, 5 5 4 2,0 0 0 1)', 'POINT(5 5 4 2)'));
diff --git a/regress/core/scroll_expected b/regress/core/scroll_expected
index 7a0d0e8..de0043b 100644
--- a/regress/core/scroll_expected
+++ b/regress/core/scroll_expected
@@ -4,3 +4,6 @@ ERROR: ptarray_scroll_in_place: input POINTARRAY is not closed
SRID=4326;LINESTRING(0 0,10 0,5 5,0 0)
SRID=4326;LINESTRING(5 5,0 0,10 0,5 5)
SRID=4326;LINESTRING(10 0,5 5,0 0,10 0)
+SRID=4326;LINESTRINGM(10 0 2,5 5 4,0 0 0,10 0 2)
+SRID=4326;LINESTRING(5 5 4,0 0 0,10 0 2,5 5 4)
+SRID=4326;LINESTRING(5 5 4 2,0 0 0 1,10 0 2 0,5 5 4 2)
-----------------------------------------------------------------------
Summary of changes:
doc/reference_editor.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++
regress/core/scroll.sql | 6 ++++++
regress/core/scroll_expected | 3 +++
3 files changed, 55 insertions(+)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list