From: Mark Cave-Ayland Date: Tue, 30 Sep 2008 13:29:49 +0000 (+0000) Subject: Update regression tests to include test cases for GBT#21. X-Git-Tag: 1.4.0b1~682 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b89b5c5e82df4a78de1d3f1731ac4aab71dc80d;p=postgis Update regression tests to include test cases for GBT#21. git-svn-id: http://svn.osgeo.org/postgis/trunk@3032 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/regress_lrs.sql b/regress/regress_lrs.sql index e72e2aeb1..169035835 100644 --- a/regress/regress_lrs.sql +++ b/regress/regress_lrs.sql @@ -23,6 +23,26 @@ select 'LINEZM_4', asewkt(locate_between_measures('LINESTRING(0 10 100 0, 0 0 0 select 'LINEZM_5', asewkt(locate_between_measures('LINESTRING(0 10 100 0, 0 0 0 20, 0 10 10 40, 10 0 0 0)', 2, 18)); select 'LINEZM_6', asewkt(locate_between_measures('LINESTRING(0 10 10 40, 10 0 0 0)', 2, 2)); + + +-- Linestring, locating point, border cases +select 'LINEZM_7', asewkt(locate_between_measures('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 4 5 6)', 1, 2)); +select 'LINEZM_8', asewkt(locate_between_measures('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 4 5 6)', 1.1, 2.1)); +select 'LINEZM_9', asewkt(locate_between_measures('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 4 5 6)', 2, 2)); + + +select 'LINEPZM_1', asewkt(locate_along_measure('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 4 5 6)', 0)); +select 'LINEPZM_2', asewkt(locate_along_measure('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 4 5 6)', 1)); +select 'LINEPZM_3', asewkt(locate_along_measure('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 4 5 6)', 1.5)); +select 'LINEPZM_4', asewkt(locate_along_measure('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 4 5 6)', 2)); +select 'LINEPZM_5', asewkt(locate_along_measure('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 4 5 6)', -1)); +select 'LINEPZM_6', asewkt(locate_along_measure('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 4 5 6)', 6.1)); + + + + + + --- line_locate_point SELECT 'line_locate_point', line_locate_point('LINESTRING(709243.393033887 163969.752725768,708943.240904444 163974.593889146,708675.634380651 163981.832927298)', 'POINT(705780 15883)'); diff --git a/regress/regress_lrs_expected b/regress/regress_lrs_expected index 5d81254df..43916871c 100644 --- a/regress/regress_lrs_expected +++ b/regress/regress_lrs_expected @@ -15,6 +15,15 @@ LINEZM_3|LINESTRING(0 8 80 2,0 0 0 10,8 0 0 2) LINEZM_4|GEOMETRYCOLLECTION(LINESTRING(0 9 90 2,0 1 10 18),LINESTRING(1 0 0 18,9 0 0 2)) LINEZM_5|GEOMETRYCOLLECTION(LINESTRING(0 9 90 2,0 1 10 18),LINESTRING(5.5 4.5 4.5 18,9.5 0.5 0.5 2)) LINEZM_6|POINT(9.5 0.5 0.5 2) +LINEZM_7|LINESTRING(1 1 1 1,2 2 2 2) +LINEZM_8|LINESTRING(1.1 1.1 1.1 1.1,2 2 2 2,2.025 2.05 2.075 2.1) +LINEZM_9|POINT(2 2 2 2) +LINEPZM_1|POINT(0 0 0 0) +LINEPZM_2|POINT(1 1 1 1) +LINEPZM_3|POINT(1.5 1.5 1.5 1.5) +LINEPZM_4|POINT(2 2 2 2) +LINEPZM_5|GEOMETRYCOLLECTION EMPTY +LINEPZM_6|GEOMETRYCOLLECTION EMPTY line_locate_point|0.528602749909894 line_locate_point|1 line_locate_point|0