Show
Ignore:
Timestamp:
06/04/07 16:06:28 (5 years ago)
Author:
mleslie
Message:

Added versions of functions with standard ST (Spatial Type) prefixes to any functions that were lacking them. Updated the regression tests to include the new functions.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/regress/sql-mm-compoundcurve.sql

    r2609 r2616  
    4949                0 0))')); 
    5050SELECT 'geometrytype04', geometrytype(geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( 
     51                0 0,  
     52                0.26794919243112270647255365849413 1,  
     53                0.5857864376269049511983112757903 1.4142135623730950488016887242097), 
     54                (0.5857864376269049511983112757903 1.4142135623730950488016887242097, 
     55                2 0, 
     56                0 0))')); 
     57 
     58-- Repeat tests with new function names. 
     59SELECT 'ndims01', ST_ndims(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( 
     60                0 0 0 0,  
     61                0.26794919243112270647255365849413 1 3 -2,  
     62                0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), 
     63                (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, 
     64                2 0 0 0, 
     65                0 0 0 0))')); 
     66SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( 
     67                0 0 0 0,  
     68                0.26794919243112270647255365849413 1 3 -2,  
     69                0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), 
     70                (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, 
     71                2 0 0 0, 
     72                0 0 0 0))')); 
     73SELECT 'ndims02', ST_ndims(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( 
     74                0 0 0,  
     75                0.26794919243112270647255365849413 1 3,  
     76                0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), 
     77                (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, 
     78                2 0 0, 
     79                0 0 0))')); 
     80SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( 
     81                0 0 0,  
     82                0.26794919243112270647255365849413 1 3,  
     83                0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), 
     84                (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, 
     85                2 0 0, 
     86                0 0 0))')); 
     87SELECT 'ndims03', ST_ndims(ST_geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( 
     88                0 0 0,  
     89                0.26794919243112270647255365849413 1 -2,  
     90                0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), 
     91                (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, 
     92                2 0 0, 
     93                0 0 0))')); 
     94SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( 
     95                0 0 0,  
     96                0.26794919243112270647255365849413 1 -2,  
     97                0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), 
     98                (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, 
     99                2 0 0, 
     100                0 0 0))')); 
     101SELECT 'ndims04', ST_ndims(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( 
     102                0 0,  
     103                0.26794919243112270647255365849413 1,  
     104                0.5857864376269049511983112757903 1.4142135623730950488016887242097), 
     105                (0.5857864376269049511983112757903 1.4142135623730950488016887242097, 
     106                2 0, 
     107                0 0))')); 
     108SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( 
    51109                0 0,  
    52110                0.26794919243112270647255365849413 1,  
     
    177235SELECT 'ST_LineToCurve', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.compoundcurve; 
    178236 
     237-- Repeat tests on new function names. 
     238SELECT 'astext01', ST_astext(the_geom_2d) FROM public.compoundcurve; 
     239SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.compoundcurve; 
     240SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.compoundcurve; 
     241SELECT 'astext04', ST_astext(the_geom_4d) FROM public.compoundcurve; 
     242 
     243SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.compoundcurve; 
     244SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.compoundcurve; 
     245SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.compoundcurve; 
     246SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.compoundcurve; 
     247 
     248SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.compoundcurve; 
     249SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.compoundcurve; 
     250SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.compoundcurve; 
     251SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.compoundcurve; 
     252 
     253SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.compoundcurve; 
     254SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.compoundcurve; 
     255SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.compoundcurve; 
     256SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.compoundcurve; 
     257 
     258-- Removed due to discrepencies between hardware 
     259--SELECT 'box2d01', ST_box2d(the_geom_2d) FROM public.compoundcurve; 
     260--SELECT 'box2d02', ST_box2d(the_geom_3dm) FROM public.compoundcurve; 
     261--SELECT 'box2d03', ST_box2d(the_geom_3dz) FROM public.compoundcurve; 
     262--SELECT 'box2d04', ST_box2d(the_geom_4d) FROM public.compoundcurve; 
     263 
     264--SELECT 'box3d01', ST_box3d(the_geom_2d) FROM public.compoundcurve; 
     265--SELECT 'box3d02', ST_box3d(the_geom_3dm) FROM public.compoundcurve; 
     266--SELECT 'box3d03', ST_box3d(the_geom_3dz) FROM public.compoundcurve; 
     267--SELECT 'box3d04', ST_box3d(the_geom_4d) FROM public.compoundcurve; 
     268 
     269SELECT 'isValid01', ST_isValid(the_geom_2d) FROM public.compoundcurve; 
     270SELECT 'isValid02', ST_isValid(the_geom_3dm) FROM public.compoundcurve; 
     271SELECT 'isValid03', ST_isValid(the_geom_3dz) FROM public.compoundcurve; 
     272SELECT 'isValid04', ST_isValid(the_geom_4d) FROM public.compoundcurve; 
     273 
     274SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.compoundcurve; 
     275SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.compoundcurve; 
     276SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.compoundcurve; 
     277SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.compoundcurve; 
     278 
     279SELECT 'SRID01', ST_SRID(the_geom_2d) FROM public.compoundcurve; 
     280SELECT 'SRID02', ST_SRID(the_geom_3dm) FROM public.compoundcurve; 
     281SELECT 'SRID03', ST_SRID(the_geom_3dz) FROM public.compoundcurve; 
     282SELECT 'SRID04', ST_SRID(the_geom_4d) FROM public.compoundcurve; 
     283 
     284SELECT 'accessor01', ST_isEmpty(the_geom_2d), ST_isSimple(the_geom_2d), ST_isClosed(the_geom_2d), ST_isRing(the_geom_2d) FROM public.compoundcurve; 
     285SELECT 'accessor02', ST_isEmpty(the_geom_3dm), ST_isSimple(the_geom_3dm), ST_isClosed(the_geom_3dm), ST_isRing(the_geom_3dm) FROM public.compoundcurve; 
     286SELECT 'accessor03', ST_isEmpty(the_geom_3dz), ST_isSimple(the_geom_3dz), ST_isClosed(the_geom_3dz), ST_isRing(the_geom_3dz) FROM public.compoundcurve; 
     287SELECT 'accessor04', ST_isEmpty(the_geom_4d), ST_isSimple(the_geom_4d), ST_isClosed(the_geom_4d), ST_isRing(the_geom_4d) FROM public.compoundcurve; 
     288 
     289SELECT 'envelope01', ST_asText(ST_snapToGrid(ST_envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; 
     290SELECT 'envelope02', ST_asText(ST_snapToGrid(ST_envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; 
     291SELECT 'envelope03', ST_asText(ST_snapToGrid(ST_envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; 
     292SELECT 'envelope04', ST_asText(ST_snapToGrid(ST_envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; 
     293 
    179294SELECT DropGeometryColumn('public', 'compoundcurve', 'the_geom_4d'); 
    180295SELECT DropGeometryColumn('public', 'compoundcurve', 'the_geom_3dz');