[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-418-g7a4f76d
git at osgeo.org
git at osgeo.org
Sun Aug 22 10:53:05 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, master has been updated
via 7a4f76ddfc74e9f9af468a710103e1ce08a6cda9 (commit)
from 89e3ce9ac5f9832aa24e19ac687b3f8a993d1119 (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 7a4f76ddfc74e9f9af468a710103e1ce08a6cda9
Author: Martin Davis <mtnclimb at gmail.com>
Date: Sun Aug 22 10:52:59 2021 -0700
Minor fix to doc ST_LIneSubstring example
diff --git a/doc/reference_lrs.xml b/doc/reference_lrs.xml
index b9755cc..a499d65 100644
--- a/doc/reference_lrs.xml
+++ b/doc/reference_lrs.xml
@@ -416,14 +416,17 @@ WITH data(id, geom) AS (VALUES
( 'B', 'LINESTRING( 0 100, 350 100)'::geometry ),
( 'C', 'LINESTRING( 0 200, 50 200)'::geometry )
)
-SELECT id, i, ST_AsText( ST_LineSubstring( d.geom, startfrac, LEAST( endfrac, 1 )) ) AS geom
-FROM (SELECT id, geom, ST_Length(geom) len, 100 sublen FROM data) AS d
+SELECT id, i,
+ ST_AsText( ST_LineSubstring( geom, startfrac, LEAST( endfrac, 1 )) ) AS geom
+FROM (
+ SELECT id, geom, ST_Length(geom) len, 100 sublen FROM data
+ ) AS d
CROSS JOIN LATERAL (
SELECT i, (sublen * i) / len AS startfrac,
(sublen * (i+1)) / len AS endfrac
- FROM generate_series(0, floor( d.len / sublen )::integer ) AS t(i)
- -- skip last i if line length is exact multiple of sublen
- WHERE (sublen * i)/len <> 1.0
+ FROM generate_series(0, floor( len / sublen )::integer ) AS t(i)
+ -- skip last i if line length is exact multiple of sublen
+ WHERE (sublen * i) / len <> 1.0
) AS d2;
id | i | geom
-----------------------------------------------------------------------
Summary of changes:
doc/reference_lrs.xml | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list