From bc678db2c0c6f015af3a3f25087c3b24d169bfd8 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 4 Jun 2015 21:03:53 +0000 Subject: [PATCH] Move ST_ClosestPointOfApproach tests under temporal.sql git-svn-id: http://svn.osgeo.org/postgis/trunk@13622 b70326c6-7e19-0410-871a-916f4a2858ee --- regress/regress_lrs.sql | 23 ----------------------- regress/regress_lrs_expected | 4 ---- regress/temporal.sql | 32 ++++++++++++++++++++++++++++++++ regress/temporal_expected | 4 ++++ 4 files changed, 36 insertions(+), 27 deletions(-) diff --git a/regress/regress_lrs.sql b/regress/regress_lrs.sql index 05c044d88..ca78b4f66 100644 --- a/regress/regress_lrs.sql +++ b/regress/regress_lrs.sql @@ -63,29 +63,6 @@ select 'line_substring_12', ST_AsText(ST_LineSubstring('LINESTRING(0 0 10, 1 1 5 select 'line_interpolate_point', ST_AsText(ST_LineInterpolatePoint('LINESTRING(0 0, 1 1)', 0)); select 'line_interpolate_point', ST_AsText(ST_LineInterpolatePoint('LINESTRING(0 0 10, 1 1 5)', 0.5)); --- ---- ST_PointOfClosestApproach --- - --- Converging -select 'pca1', ST_ClosestPointOfApproach( - 'LINESTRINGZM(0 0 0 0, 10 10 10 10)', - 'LINESTRINGZM(0 0 0 1, 10 10 10 10)'); --- Following -select 'pca2', ST_ClosestPointOfApproach( - 'LINESTRINGZM(0 0 0 0, 10 10 10 10)', - 'LINESTRINGZM(0 0 0 5, 10 10 10 15)'); --- Crossing -select 'pca3', ST_ClosestPointOfApproach( - 'LINESTRINGZM(0 0 0 0, 0 0 0 10)', - 'LINESTRINGZM(-30 0 5 4, 10 0 5 6)'); --- Ticket #3136 -WITH inp as ( SELECT - 'LINESTRING M (0 0 80000002,1 0 80000003)'::geometry g1, - 'LINESTRING M (2 2 80000000,1 1 80000001,0 0 80000002)'::geometry g2 ) -SELECT 'pca#3136', -ST_ClosestPointOfApproach(g2,g1), ST_ClosestPointOfApproach(g1,g2) -FROM inp; -- -- ST_AddMeasure diff --git a/regress/regress_lrs_expected b/regress/regress_lrs_expected index 59ebf4bdb..54ae3ff7f 100644 --- a/regress/regress_lrs_expected +++ b/regress/regress_lrs_expected @@ -34,10 +34,6 @@ line_substring_11|POINT(0 0) line_substring_12|POINT Z (0.5 0.5 7.5) line_interpolate_point|POINT(0 0) line_interpolate_point|POINT Z (0.5 0.5 7.5) -pca1|10 -pca2|5 -pca3|5.5 -pca#3136|80000002|80000002 addMeasure1|LINESTRING M (0 0 10,2 0 15,4 0 20) addMeasure2|LINESTRING M (0 0 10,9 0 19,10 0 20) interpolatePoint1|2 diff --git a/regress/temporal.sql b/regress/temporal.sql index 07549bdf2..b61642716 100644 --- a/regress/temporal.sql +++ b/regress/temporal.sql @@ -1,3 +1,9 @@ +---------------------------------------- +-- +-- ST_IsValidTrajectory +-- +---------------------------------------- + SELECT 'invalidTrajectory1', ST_IsValidTrajectory('POINTM(0 0 0)'::geometry); SELECT 'invalidTrajectory2', ST_IsValidTrajectory('LINESTRINGZ(0 0 0,1 1 1)'::geometry); SELECT 'invalidTrajectory3', ST_IsValidTrajectory('LINESTRINGM(0 0 0,1 1 0)'::geometry); @@ -7,3 +13,29 @@ SELECT 'invalidTrajectory8', ST_IsValidTrajectory('LINESTRINGM(0 0 0,1 1 1,1 1 2 SELECT 'validTrajectory1', ST_IsValidTrajectory('LINESTRINGM(0 0 0,1 1 1)'::geometry); SELECT 'validTrajectory2', ST_IsValidTrajectory('LINESTRINGM EMPTY'::geometry); SELECT 'validTrajectory3', ST_IsValidTrajectory('LINESTRINGM(0 0 0,1 1 1,1 1 2)'::geometry); + +---------------------------------------- +-- +-- ST_PointOfClosestApproach +-- +---------------------------------------- + +-- Converging +select 'pca1', ST_ClosestPointOfApproach( + 'LINESTRINGZM(0 0 0 0, 10 10 10 10)', + 'LINESTRINGZM(0 0 0 1, 10 10 10 10)'); +-- Following +select 'pca2', ST_ClosestPointOfApproach( + 'LINESTRINGZM(0 0 0 0, 10 10 10 10)', + 'LINESTRINGZM(0 0 0 5, 10 10 10 15)'); +-- Crossing +select 'pca3', ST_ClosestPointOfApproach( + 'LINESTRINGZM(0 0 0 0, 0 0 0 10)', + 'LINESTRINGZM(-30 0 5 4, 10 0 5 6)'); +-- Ticket #3136 +WITH inp as ( SELECT + 'LINESTRING M (0 0 80000002,1 0 80000003)'::geometry g1, + 'LINESTRING M (2 2 80000000,1 1 80000001,0 0 80000002)'::geometry g2 ) +SELECT 'pca#3136', +ST_ClosestPointOfApproach(g2,g1), ST_ClosestPointOfApproach(g1,g2) +FROM inp; diff --git a/regress/temporal_expected b/regress/temporal_expected index acb418b9d..03036cf48 100644 --- a/regress/temporal_expected +++ b/regress/temporal_expected @@ -11,3 +11,7 @@ invalidTrajectory8|f validTrajectory1|t validTrajectory2|t validTrajectory3|t +pca1|10 +pca2|5 +pca3|5.5 +pca#3136|80000002|80000002 -- 2.40.0