[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0-16-g9b0c432be
git at osgeo.org
git at osgeo.org
Tue Jan 4 14:20:38 PST 2022
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 9b0c432beea50f2b5071a50f6a4e11647c092229 (commit)
from e9609acd598c7de42ef1b9a44bdf096caf154cb3 (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 9b0c432beea50f2b5071a50f6a4e11647c092229
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Tue Jan 4 14:20:01 2022 -0800
Revise regression tests so that both pre- and post-GEOS 3.11
updates to OffsetCurve will pass.
diff --git a/regress/core/offsetcurve.sql b/regress/core/offsetcurve.sql
index 512f1ea6e..4c0a8583f 100644
--- a/regress/core/offsetcurve.sql
+++ b/regress/core/offsetcurve.sql
@@ -1,60 +1,58 @@
\set VERBOSITY terse
set client_min_messages to NOTICE;
-SELECT 't0', ST_OffsetCurve('POINT(0 0)', 10);
-SELECT 't0', ST_AsEWKT(ST_OffsetCurve('SRID=42;LINESTRING(0 0, 10 0)', 0));
-SELECT 't1', ST_AsEWKT(ST_OffsetCurve('SRID=42;LINESTRING(0 0, 10 0)', 10));
-SELECT 't2', ST_AsEWKT(ST_OffsetCurve('SRID=42;LINESTRING(0 0, 10 0)', -10));
-SELECT 't3', ST_AsEWKT(ST_OffsetCurve('SRID=42;LINESTRING(10 0, 0 0)', 10));
-SELECT 't4', ST_AsEWKT(ST_OffsetCurve('SRID=42;LINESTRING(10 0, 0 0)', -10));
-SELECT 't5', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve(
+SELECT 't0', ST_Normalize(ST_OffsetCurve('POINT(0 0)', 10));
+SELECT 't0', ST_AsEWKT(ST_Normalize(ST_OffsetCurve('SRID=42;LINESTRING(0 0, 10 0)', 0)));
+SELECT 't1', ST_AsEWKT(ST_Normalize(ST_OffsetCurve('SRID=42;LINESTRING(0 0, 10 0)', 10)));
+SELECT 't2', ST_AsEWKT(ST_Normalize(ST_OffsetCurve('SRID=42;LINESTRING(0 0, 10 0)', -10)));
+SELECT 't3', ST_AsEWKT(ST_Normalize(ST_OffsetCurve('SRID=42;LINESTRING(10 0, 0 0)', 10)));
+SELECT 't4', ST_AsEWKT(ST_Normalize(ST_OffsetCurve('SRID=42;LINESTRING(10 0, 0 0)', -10)));
+SELECT 't5', ST_AsEWKT(ST_Normalize(ST_SnapToGrid(ST_OffsetCurve(
'SRID=42;LINESTRING(0 0, 10 0, 10 10)', -10),
-1));
-SELECT 't5b', ST_AsEWKT(ST_OffsetCurve(
- 'SRID=42;LINESTRING(0 0, 10 0, 10 10)', 10));
-SELECT 't6', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve(
+1)));
+SELECT 't5b', ST_AsEWKT(ST_Normalize(ST_OffsetCurve(
+ 'SRID=42;LINESTRING(0 0, 10 0, 10 10)', 10)));
+SELECT 't6', ST_AsEWKT(ST_Normalize(ST_SnapToGrid(ST_OffsetCurve(
'SRID=42;LINESTRING(0 0, 10 0, 10 10)', -10,
- 'quad_segs=2'),
-1));
-SELECT 't7', ST_AsEWKT(ST_OffsetCurve(
+ 'quad_segs=2'),1)));
+SELECT 't7', ST_AsEWKT(ST_Normalize(ST_OffsetCurve(
'SRID=42;LINESTRING(0 0, 10 0, 10 10)', -10,
- 'join=bevel')
+ 'join=bevel'))
);
-SELECT 't8', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve(
+SELECT 't8', ST_AsEWKT(ST_Normalize(ST_SnapToGrid(ST_OffsetCurve(
'SRID=42;LINESTRING(0 0, 10 0, 10 10)', -10,
'quad_segs=2 join=mitre'),
-1));
-SELECT 't9', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve(
- 'SRID=42;LINESTRING(0 0, 10 0, 5 10)', -10,
- 'quad_segs=2 join=mitre mitre_limit=1'),
-1));
-SELECT 't10', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve(
+1)));
+-- SELECT 't9', ST_AsEWKT(ST_Normalize(ST_SnapToGrid(ST_OffsetCurve(
+-- 'SRID=42;LINESTRING(0 0, 10 0, 5 10)', -10,
+-- 'quad_segs=2 join=mitre mitre_limit=1'),1)));
+SELECT 't10', ST_AsEWKT(ST_Normalize(ST_SnapToGrid(ST_OffsetCurve(
'SRID=42;LINESTRING(0 0, 10 0, 5 10)', 2,
'quad_segs=2 join=mitre mitre_limit=1'),
-1));
-SELECT 't10b', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve(
+1)));
+SELECT 't10b', ST_AsEWKT(ST_Normalize(ST_SnapToGrid(ST_OffsetCurve(
'SRID=42;LINESTRING(0 0, 10 0, 5 10)', 2,
'quad_segs=2 join=miter miter_limit=1'),
-1));
-SELECT 't11', ST_AsText(ST_SnapToGrid(ST_OffsetCurve(
+1)));
+SELECT 't11', ST_AsText(ST_Normalize(ST_SnapToGrid(ST_OffsetCurve(
'LINESTRING(36 38,38 35,41 34,42 33,45 32,47 28,50 28,52 32,57 33)', 2,
'join=mitre'),
-0.2), 1);
-SELECT 't12', ST_AsText(ST_SnapToGrid(ST_OffsetCurve(
+0.2)), 1);
+SELECT 't12', ST_AsText(ST_Normalize(ST_SnapToGrid(ST_OffsetCurve(
'LINESTRING(36 38,38 35,41 34,42 33,45 32,47 28,50 28,52 32,57 33)', -2,
'join=mitre'),
-0.2), 1);
-SELECT 't13', ST_AsEWKT(ST_OffsetCurve(
+0.2)), 1);
+SELECT 't13', ST_AsEWKT(ST_Normalize(ST_OffsetCurve(
'LINESTRING(0 0,0 20, 10 20, 10 10, 0 10)', 2,
'join=mitre'
-));
-SELECT 't14', ST_AsEWKT(ST_OffsetCurve(
- 'LINESTRING(0 0,0 20, 10 20, 10 10, 0 10)', -2,
- ''
-));
-SELECT 't15', ST_AsEWKT(ST_OffsetCurve(
- 'GEOMETRYCOLLECTION(LINESTRING(0 0,0 20, 10 20, 10 10, 0 10),MULTILINESTRING((2 0,2 20, 12 20, 12 10, 2 10),(3 0,3 20, 13 20, 13 10, 3 10)))', -2,
- ''
-));
+)));
+-- SELECT 't14', ST_AsEWKT(ST_Normalize(ST_OffsetCurve(
+-- 'LINESTRING(0 0,0 20, 10 20, 10 10, 0 10)', -2,
+-- ''
+-- )));
+-- SELECT 't15', ST_AsEWKT(ST_Normalize(ST_OffsetCurve(
+-- 'GEOMETRYCOLLECTION(LINESTRING(0 0,0 20, 10 20, 10 10, 0 10),MULTILINESTRING((2 0,2 20, 12 20, 12 10, 2 10),(3 0,3 20, 13 20, 13 10, 3 10)))', -2,
+-- ''
+-- )));
select '#2508', ST_IsValid(ST_OffsetCurve(
'0102000020BB0B000010000000FBB019D1AD1537414A733C4E5333534167CE8F06B815374151F4926C4D335341C4899405B61537413DB009254A335341513EE234AD1537413689A27947335341E38CCA31AB1537415D00E28E44335341951F7F0BB315374104E4CA2441335341A581F041BF153741D46F9F8A3F33534100C27968CD153741C6CAAFE83F335341493DB10CDA1537418919897142335341FCA312FCE01537415D1A1F8045335341C62D3822DD153741554B118E483353411B98FE61D1153741FC35CEE14A33534106DCFDA5C5153741573BD3584B33534167CE8F06B815374151F4926C4D335341FBB019D1AD1537414A733C4E533353414AEB33644E153741595A854786335341',
10
diff --git a/regress/core/offsetcurve_expected b/regress/core/offsetcurve_expected
index cc2d0afbc..c06e01514 100644
--- a/regress/core/offsetcurve_expected
+++ b/regress/core/offsetcurve_expected
@@ -1,20 +1,17 @@
ERROR: lwgeom_offsetcurve: input is not linear
t0|SRID=42;LINESTRING(0 0,10 0)
t1|SRID=42;LINESTRING(0 10,10 10)
-t2|SRID=42;LINESTRING(10 -10,0 -10)
-t3|SRID=42;LINESTRING(10 -10,0 -10)
+t2|SRID=42;LINESTRING(0 -10,10 -10)
+t3|SRID=42;LINESTRING(0 -10,10 -10)
t4|SRID=42;LINESTRING(0 10,10 10)
-t5|SRID=42;LINESTRING(20 10,20 0,20 -2,19 -4,18 -6,17 -7,16 -8,14 -9,12 -10,10 -10,0 -10)
+t5|SRID=42;LINESTRING(0 -10,10 -10,12 -10,14 -9,16 -8,17 -7,18 -6,19 -4,20 -2,20 0,20 10)
t5b|SRID=42;LINESTRING EMPTY
-t6|SRID=42;LINESTRING(20 10,20 0,17 -7,10 -10,0 -10)
-t7|SRID=42;LINESTRING(20 10,20 0,10 -10,0 -10)
-t8|SRID=42;LINESTRING(20 10,20 -10,0 -10)
-t9|SRID=42;LINESTRING(14 14,21 -1,16 -9,0 -10)
+t6|SRID=42;LINESTRING(0 -10,10 -10,17 -7,20 0,20 10)
+t7|SRID=42;LINESTRING(0 -10,10 -10,20 0,20 10)
+t8|SRID=42;LINESTRING(0 -10,20 -10,20 10)
t10|SRID=42;LINESTRING(0 2,7 2,3 9)
t10b|SRID=42;LINESTRING(0 2,7 2,3 9)
t11|LINESTRING(37.6 39.2,39.2 36.6,42 35.8,43 34.8,46.4 33.6,48.2 30,48.8 30,50.6 33.8,56.6 35)
-t12|LINESTRING(57.4 31,53.4 30.2,51.2 26,45.8 26,43.6 30.4,41 31.2,40 32.2,36.8 33.4,34.4 36.8)
+t12|LINESTRING(34.4 36.8,36.8 33.4,40 32.2,41 31.2,43.6 30.4,45.8 26,51.2 26,53.4 30.2,57.4 31)
t13|LINESTRING(-2 0,-2 22,12 22,12 8,2 8)
-t14|MULTILINESTRING((2 12,8 12,8 18,2 18,2 12),(2 8,2 0))
-t15|MULTILINESTRING((2 12,8 12,8 18,2 18,2 12),(2 8,2 0),(4 12,10 12,10 18,4 18,4 12),(4 8,4 0),(5 12,11 12,11 18,5 18,5 12),(5 8,5 0))
#2508|t
-----------------------------------------------------------------------
Summary of changes:
regress/core/offsetcurve.sql | 76 +++++++++++++++++++--------------------
regress/core/offsetcurve_expected | 17 ++++-----
2 files changed, 44 insertions(+), 49 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list