Show
Ignore:
Timestamp:
11/23/05 05:46:35 (7 years ago)
Author:
strk
Message:

Added a few regression tests for LRS functions

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/regress/regress.sql

    r2053 r2055  
    245245 
    246246select '144', asewkt(linemerge('GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), LINESTRING(4 4, 1 1), LINESTRING(-5 -5, 0 0))'::geometry)); 
     247 
     248-------------------------------- 
     249-- LRS functions 
     250-------------------------------- 
     251 
     252-- No M value 
     253select '2d',asewkt(locate_along_measure('POINT(1 2)', 1)); 
     254select '3dz',asewkt(locate_along_measure('POINT(1 2 3)', 1)); 
     255 
     256-- Points 
     257select 'PNTM_1',asewkt(locate_along_measure('POINTM(1 2 3)', 1)); 
     258select 'PNTM_2',asewkt(locate_along_measure('POINTM(1 2 3)', 3)); 
     259select 'PNTM_3',asewkt(locate_between_measures('POINTM(1 2 3)', 2, 3)); 
     260select 'PNTM_4',asewkt(locate_between_measures('POINTM(1 2 3)', 3, 4)); 
     261select 'PNTM_5',asewkt(locate_between_measures('POINTM(1 2 4.00001)', 3, 4)); 
     262 
     263-- Multipoints 
     264select 'MPNT_1',asewkt(locate_between_measures('MULTIPOINTM(1 2 2)', 2, 5)); 
     265select 'MPNT_2', asewkt(locate_between_measures('MULTIPOINTM(1 2 8, 2 2 5, 2 1 0)', 2, 5)); 
     266select 'MPNT_3', asewkt(locate_between_measures('MULTIPOINTM(1 2 8, 2 2 5.1, 2 1 0)', 2, 5)); 
     267select 'MPNT_4', asewkt(locate_between_measures('MULTIPOINTM(1 2 8, 2 2 5, 2 1 0)', 4, 8)); 
     268 
     269 
     270-- Collections 
     271select 'COLL_1', asewkt(locate_between_measures('GEOMETRYCOLLECTION(MULTIPOINTM(1 2 8, 2 2 5.0, 2 1 0),MULTIPOINT(0 0 1))', 2, 5)); 
     272 
     273-- Linestrings 
     274select 'LINEZM_1', asewkt(locate_between_measures('LINESTRING(0 10 100 0, 0 0 0 10)', 2, 18)); 
     275select 'LINEZM_2', asewkt(locate_between_measures('LINESTRING(0 10 0 0, 0 0 100 10)', 2, 18)); 
     276select 'LINEZM_3', asewkt(locate_between_measures('LINESTRING(0 10 100 0, 0 0 0 10, 10 0 0 0)', 2, 18)); 
     277select 'LINEZM_4', asewkt(locate_between_measures('LINESTRING(0 10 100 0, 0 0 0 20, 10 0 0 0)', 2, 18)); 
     278select '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));