From: Sandro Santilli Date: Tue, 26 May 2015 15:38:29 +0000 (+0000) Subject: Add missing tests for ST_AddMeasure and ST_InterpolatePoint X-Git-Tag: 2.2.0rc1~454 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=475911e937959117573811ceb8868085a9c946e4;p=postgis Add missing tests for ST_AddMeasure and ST_InterpolatePoint git-svn-id: http://svn.osgeo.org/postgis/trunk@13561 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/regress_lrs.sql b/regress/regress_lrs.sql index 9e6b42d72..54678b0c5 100644 --- a/regress/regress_lrs.sql +++ b/regress/regress_lrs.sql @@ -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)'); diff --git a/regress/regress_lrs_expected b/regress/regress_lrs_expected index 581442282..f3c5696a5 100644 --- a/regress/regress_lrs_expected +++ b/regress/regress_lrs_expected @@ -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