]> granicus.if.org Git - postgis/commitdiff
Add missing tests for ST_AddMeasure and ST_InterpolatePoint
authorSandro Santilli <strk@keybit.net>
Tue, 26 May 2015 15:38:29 +0000 (15:38 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 26 May 2015 15:38:29 +0000 (15:38 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13561 b70326c6-7e19-0410-871a-916f4a2858ee

regress/regress_lrs.sql
regress/regress_lrs_expected

index 9e6b42d72fd7e5c280616036d1a4aa8d54d30ac4..54678b0c502b67371c5a081038e54806dab04676 100644 (file)
@@ -56,12 +56,16 @@ select 'line_substring_10', ST_AsText(ST_LineSubstring('LINESTRING(0 0 4, 4 4 0)
 select 'line_substring_11', ST_AsText(ST_LineSubstring('LINESTRING(0 0, 1 1)', 0, 0));
 select 'line_substring_12', ST_AsText(ST_LineSubstring('LINESTRING(0 0 10, 1 1 5)', 0.5, .5));
 
---- line_interpolate_point
+--
+--- ST_LineInterpolatePoint
+--
 
 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(
@@ -76,4 +80,16 @@ select 'pca3', ST_ClosestPointOfApproach(
   'LINESTRINGZM(0 0 0 0, 0 0 0 10)',
   'LINESTRINGZM(-30 0 5 4, 10 0 5 6)');
 
--- TODO: test ST_AddMeasures 
+--
+-- ST_AddMeasure
+--
+
+select 'addMeasure1', ST_AsText(ST_AddMeasure('LINESTRING(0 0, 2 0, 4 0)', 10, 20));
+select 'addMeasure2', ST_AsText(ST_AddMeasure('LINESTRING(0 0, 9 0, 10 0)', 10, 20));
+
+--
+-- ST_InterpolatePoint
+--
+
+select 'interpolatePoint1', ST_InterpolatePoint('LINESTRINGM(0 0 0, 10 0 4)', 'POINT(5 0)');
+select 'interpolatePoint2', ST_InterpolatePoint('LINESTRINGM(0 0 0, 10 0 4)', 'POINT(7.5 0)');
index 5814422823aa80afc68f6dd9461eb671cefb3eb0..f3c5696a5cb790728217d173f1e4d26176d2662a 100644 (file)
@@ -37,3 +37,7 @@ line_interpolate_point|POINT Z (0.5 0.5 7.5)
 pca1|10
 pca2|5
 pca3|5.5
+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
+interpolatePoint2|3