Changeset 2055

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

Added a few regression tests for LRS functions

Location:
trunk/regress
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/regress/regress_expected

    r2053 r2055  
    149149147|POINT(1 2 3 0) 
    150150144|LINESTRING(-5 -5,0 0,1 1,4 4) 
     1512d| 
     1523dz| 
     153PNTM_1|GEOMETRYCOLLECTIONM EMPTY 
     154PNTM_2|POINTM(1 2 3) 
     155PNTM_3|POINTM(1 2 3) 
     156PNTM_4|POINTM(1 2 3) 
     157PNTM_5|GEOMETRYCOLLECTIONM EMPTY 
     158MPNT_1|GEOMETRYCOLLECTIONM(POINT(1 2 2)) 
     159MPNT_2|GEOMETRYCOLLECTIONM(POINT(2 2 5)) 
     160MPNT_3|GEOMETRYCOLLECTIONM EMPTY 
     161MPNT_4|GEOMETRYCOLLECTIONM(POINT(1 2 8),POINT(2 2 5)) 
     162COLL_1| 
     163LINEZM_1|GEOMETRYCOLLECTION(LINESTRING(0 8 80 2,0 0 0 10)) 
     164LINEZM_2|GEOMETRYCOLLECTION(LINESTRING(0 8 20 2,0 0 100 10)) 
     165LINEZM_3|GEOMETRYCOLLECTION(LINESTRING(0 8 80 2,0 0 0 10,8 0 0 2)) 
     166LINEZM_4|GEOMETRYCOLLECTION(LINESTRING(0 9 90 2,0 1 10 18),LINESTRING(1 0 0 18,9 0 0 2)) 
     167LINEZM_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)) 
  • 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));