Commit 2d7e0aa5 authored by Regina Obe's avatar Regina Obe

Get rid of more deprecated calls

git-svn-id: http://svn.osgeo.org/postgis/trunk@6531 b70326c6-7e19-0410-871a-916f4a2858ee
parent 1545b8e8
-- Tests for affine transformations
-- ST_Translate
select 'ST_Translate', asewkt(ST_Translate('POINT(0 0)'::geometry, 5, 12));
select 'ST_Translate', asewkt(ST_Translate('POINT(0 0 0)'::geometry, -3, -7, 3));
-- ST_Scale
select 'ST_Scale', asewkt(ST_Scale('POINT(1 1)'::geometry, 5, 5));
select 'ST_Scale', asewkt(ST_Scale('POINT(1 1)'::geometry, 3, 2));
select 'ST_Scale', asewkt(ST_Scale('POINT(10 20 -5)'::geometry, 4, 2, -8));
-- ST_RotateZ
select 'ST_RotateZ', asewkt(SnapToGrid(ST_RotateZ('POINT(1 1)'::geometry, pi()), 0.1));
select 'ST_RotateZ', asewkt(SnapToGrid(ST_RotateZ('POINT(1 1)'::geometry, pi()/2), 0.1));
select 'ST_RotateZ', asewkt(SnapToGrid(ST_RotateZ('POINT(1 1)'::geometry, pi()+pi()/2), 0.1));
select 'ST_RotateZ', asewkt(SnapToGrid(ST_RotateZ('POINT(1 1)'::geometry, 2*pi()), 0.1));
-- ST_RotateY
select 'ST_RotateY', asewkt(SnapToGrid(ST_RotateY('POINT(1 1 1)'::geometry, pi()), 0.1));
select 'ST_RotateY', asewkt(SnapToGrid(ST_RotateY('POINT(1 1 1)'::geometry, pi()/2), 0.1));
select 'ST_RotateY', asewkt(SnapToGrid(ST_RotateY('POINT(1 1 1)'::geometry, pi()+pi()/2), 0.1));
select 'ST_RotateY', asewkt(SnapToGrid(ST_RotateY('POINT(1 1 1)'::geometry, 2*pi()), 0.1));
-- ST_RotateX
select 'ST_RotateX', asewkt(SnapToGrid(ST_RotateX('POINT(1 1 1)'::geometry, pi()), 0.1));
select 'ST_RotateX', asewkt(SnapToGrid(ST_RotateX('POINT(1 1 1)'::geometry, pi()/2), 0.1));
select 'ST_RotateX', asewkt(SnapToGrid(ST_RotateX('POINT(1 1 1)'::geometry, pi()+pi()/2), 0.1));
select 'ST_RotateX', asewkt(SnapToGrid(ST_RotateX('POINT(1 1 1)'::geometry, 2*pi()), 0.1));
-- ST_TransScale
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 1, 1, 1), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(2 2)'::geometry,1, 1, 1, 1), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,-1, -1, -1, -1), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,0, 1, 1, 1), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 0, 1, 1), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 1, 0, 1), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 1, 1, 0), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,2, 1, 1, 1), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 2, 1, 1), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 1, 2, 1), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 1, 1, 2), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1)'::geometry,2, 3, 5, 7), 0.1));
select 'ST_TransScale', asewkt(snapToGrid(ST_TransScale('POINT(1 1 1)'::geometry,2, 3, 5, 7), 0.1));
-- postgis-users/2006-May/012119.html
select 'transl_bbox', box2d(ST_Translate('LINESTRING(0 0, 1 1)'::geometry, 1, 0, 0));
select 'ST_Scale_bbox', box2d(ST_Scale('LINESTRING(1 0, 2 1)'::geometry, 2, 0));
select 'ST_Scale_bbox', box2d(ST_TransScale('LINESTRING(1 0, 2 1)'::geometry, 2, 1, 1, 1));
select 'ST_RotZ_bbox', box2d(SnapToGrid(ST_RotateZ('LINESTRING(0 0, 1 0)'::geometry, pi()), 0.1));
select 'ST_RotY_bbox', box2d(SnapToGrid(ST_RotateY('LINESTRING(0 0, 1 0)'::geometry, pi()), 0.1));
-- Repeat all tests with the new function names.
-- ST_Translate
select 'ST_Translate', ST_asewkt(ST_Translate('POINT(0 0)'::geometry, 5, 12));
......
......@@ -33,38 +33,3 @@ ST_Scale_bbox|BOX(2 0,4 0)
ST_Scale_bbox|BOX(3 1,4 2)
ST_RotZ_bbox|BOX(-1 0,0 0)
ST_RotY_bbox|BOX(-1 0,0 0)
ST_Translate|POINT(5 12)
ST_Translate|POINT(-3 -7 3)
ST_Scale|POINT(5 5)
ST_Scale|POINT(3 2)
ST_Scale|POINT(40 40 40)
ST_RotateZ|POINT(-1 -1)
ST_RotateZ|POINT(-1 1)
ST_RotateZ|POINT(1 -1)
ST_RotateZ|POINT(1 1)
ST_RotateY|POINT(-1 1 -1)
ST_RotateY|POINT(1 1 -1)
ST_RotateY|POINT(-1 1 1)
ST_RotateY|POINT(1 1 1)
ST_RotateX|POINT(1 -1 -1)
ST_RotateX|POINT(1 -1 1)
ST_RotateX|POINT(1 1 -1)
ST_RotateX|POINT(1 1 1)
ST_TransScale|POINT(2 2)
ST_TransScale|POINT(3 3)
ST_TransScale|POINT(0 0)
ST_TransScale|POINT(1 2)
ST_TransScale|POINT(2 1)
ST_TransScale|POINT(0 2)
ST_TransScale|POINT(2 0)
ST_TransScale|POINT(3 2)
ST_TransScale|POINT(2 3)
ST_TransScale|POINT(4 2)
ST_TransScale|POINT(2 4)
ST_TransScale|POINT(15 28)
ST_TransScale|POINT(15 28 1)
transl_bbox|BOX(1 0,2 1)
ST_Scale_bbox|BOX(2 0,4 0)
ST_Scale_bbox|BOX(3 1,4 2)
ST_RotZ_bbox|BOX(-1 0,0 0)
ST_RotY_bbox|BOX(-1 0,0 0)
-- postgis-users/2006-July/012764.html
SELECT SRID(collect('SRID=32749;POINT(0 0)', 'SRID=32749;POINT(1 1)'));
SELECT collect('SRID=32749;POINT(0 0)', 'SRID=32740;POINT(1 1)');
select asewkt(makeline('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)'));
select makeline('POINT(0 0)', 'SRID=3;POINT(1 1)');
-- postgis-users/2006-July/012788.html
select makebox2d('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)');
select makebox2d('POINT(0 0)', 'SRID=3;POINT(1 1)');
select makebox3d('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)');
select makebox3d('POINT(0 0)', 'SRID=3;POINT(1 1)');
-- Repeat all tests with the new function names.
-- postgis-users/2006-July/012764.html
SELECT ST_SRID(collect('SRID=32749;POINT(0 0)', 'SRID=32749;POINT(1 1)'));
......
......@@ -6,11 +6,3 @@ BOX(0 0,1 1)
ERROR: Operation on mixed SRID geometries
BOX3D(0 0 0,1 1 0)
ERROR: Operation on mixed SRID geometries
32749
ERROR: Operation on mixed SRID geometries
SRID=3;LINESTRING(0 0,1 1)
ERROR: Operation on mixed SRID geometries
BOX(0 0,1 1)
ERROR: Operation on mixed SRID geometries
BOX3D(0 0 0,1 1 0)
ERROR: Operation on mixed SRID geometries
This diff is collapsed.
buffer|POLYGON((1 0,0.707107 -0.707107,0 -1,-0.707107 -0.707107,-1 0,-0.707107 0.707107,0 1,0.707107 0.707107,1 0))
buffer|POLYGON((1 0,0.707107 -0.707107,0 -1,-0.707107 -0.707107,-1 0,-0.707107 0.707107,0 1,0.707107 0.707107,1 0))
buffer|POLYGON((1 0,0.866025 -0.5,0.5 -0.866025,0 -1,-0.5 -0.866025,-0.866025 -0.5,-1 0,-0.866025 0.5,-0.5 0.866025,0 1,0.5 0.866025,0.866025 0.5,1 0))
geomunion|MULTIPOINT(0 0,1 1)
convexhull|POLYGON((0 0,0 10,10 10,10 0,0 0))
relate|F0FFFF102
relate|t
relate|f
disjoint|f
touches|t
intersects|t
crosses|f
crosses|t
within100|t
within101|f
within102|f
within103|f
within104|f
within105|t
within106|t
disjoint100|f
disjoint101|f
disjoint102|t
disjoint103|f
disjoint104|t
disjoint105|f
disjoint106|t
disjoint150|f
disjoint151|f
disjoint152|t
disjoint153|f
disjoint154|t
disjoint155|f
disjoint156|t
intersects100|t
intersects101|t
intersects102|f
intersects103|t
intersects104|f
intersects105|t
intersects106|f
intersects150|t
intersects151|t
intersects152|f
intersects153|t
intersects154|f
intersects155|t
intersects156|f
contains100|t
contains101|f
contains102|f
contains103|f
contains104|f
contains105|t
contains106|t
within119|f
within120|f
overlaps|f
isvalid|t
NOTICE: Self-intersection
isvalid|f
isvalid|t
intersection|POINT(0 0)
difference|MULTILINESTRING((0 10,0 2),(0 -2,0 -10))
boundary|MULTILINESTRING((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2))
symdifference|GEOMETRYCOLLECTION(LINESTRING(2 2,4 4),LINESTRING(10 10,20 20),POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,2 4,2 2,4 2,4 4)))
issimple|t
equals|t
pointonsurface|POINT(5 5)
centroid|POINT(5.08333333333333 5.08333333333333)
exteriorring|LINESTRING(52 18,66 23,73 9,48 6,52 18)
polygonize_garray|GEOMETRYCOLLECTION EMPTY
polygonize_garray|POLYGON((10 0,0 0,0 10,10 10,10 0))
linemerge149|LINESTRING(-5 -5,0 0,1 1,4 4)
intersects|f
buffer|POLYGON((1 0,0.707107 -0.707107,0 -1,-0.707107 -0.707107,-1 0,-0.707107 0.707107,0 1,0.707107 0.707107,1 0))
geomunion|MULTIPOINT(0 0,1 1)
convexhull|POLYGON((0 0,0 10,10 10,10 0,0 0))
relate|F0FFFF102
......
-- Can't remove points from a 2-point linestring
SELECT removepoint('LINESTRING(0 0, 1 1)', 0);
-- Out of range indexes
SELECT removepoint('LINESTRING(0 0, 1 1, 2 2)', 3);
SELECT removepoint('LINESTRING(0 0, 1 1, 2 2)', -1);
-- Removing first/last points
SELECT asewkt(removepoint('LINESTRING(0 0, 1 1, 2 2)', 0));
SELECT asewkt(removepoint('LINESTRING(0 0, 1 1, 2 2)', 2));
-- Removing first/last points with higher dimension
SELECT asewkt(removepoint('LINESTRING(0 0 0, 1 1 1, 2 2 2)', 0));
SELECT asewkt(removepoint('LINESTRING(0 0 0, 1 1 1, 2 2 2)', 2));
SELECT asewkt(removepoint('LINESTRINGM(0 0 0, 1 1 1, 2 2 2)', 0));
SELECT asewkt(removepoint('LINESTRINGM(0 0 0, 1 1 1, 2 2 2)', 2));
SELECT asewkt(removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2)', 0));
SELECT asewkt(removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2)', 2));
-- Removing intermediate points with higher dimension
SELECT asewkt(removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 3 3 3, 4 4 4 4, 5 5 5 5, 6 6 6 6, 7 7 7 7)', 2));
SELECT asewkt(removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 3 3 3, 4 4 4 4, 5 5 5 5, 6 6 6 6, 7 7 7 7)', 4));
-- Repeat tests for new function names.
-- Can't remove points from a 2-point linestring
SELECT ST_removepoint('LINESTRING(0 0, 1 1)', 0);
......
......@@ -11,16 +11,3 @@ LINESTRING(1 1 1 1,2 2 2 2)
LINESTRING(0 0 0 0,1 1 1 1)
LINESTRING(0 0 0 0,1 1 1 1,3 3 3 3,4 4 4 4,5 5 5 5,6 6 6 6,7 7 7 7)
LINESTRING(0 0 0 0,1 1 1 1,2 2 2 2,3 3 3 3,5 5 5 5,6 6 6 6,7 7 7 7)
ERROR: Can't remove points from a single segment line
ERROR: Point index out of range (0..2)
ERROR: Point index out of range (0..2)
LINESTRING(1 1,2 2)
LINESTRING(0 0,1 1)
LINESTRING(1 1 1,2 2 2)
LINESTRING(0 0 0,1 1 1)
LINESTRINGM(1 1 1,2 2 2)
LINESTRINGM(0 0 0,1 1 1)
LINESTRING(1 1 1 1,2 2 2 2)
LINESTRING(0 0 0 0,1 1 1 1)
LINESTRING(0 0 0 0,1 1 1 1,3 3 3 3,4 4 4 4,5 5 5 5,6 6 6 6,7 7 7 7)
LINESTRING(0 0 0 0,1 1 1 1,2 2 2 2,3 3 3 3,5 5 5 5,6 6 6 6,7 7 7 7)
-- Out of range indexes
SELECT SetPoint('LINESTRING(0 0, 1 1, 2 2)', 3, 'POINT(9 9)');
SELECT SetPoint('LINESTRING(0 0, 1 1, 2 2)', -1, 'POINT(9 9)');
-- Invalid inputs
SELECT SetPoint('MULTIPOINT(0 0, 1 1, 2 2)', 3, 'POINT(9 9)');
SELECT SetPoint('LINESTRING(0 0, 1 1, 2 2)', -1, 'MULTIPOINT(9 9, 0 0)');
-- Replacing 3dz line with 3dm point
SELECT asewkt(SetPoint('LINESTRING(-1 -1 -1, 1 1 1, 2 2 2)', 0, 'POINT(90 91 92)'));
-- Replacing 3dm line with 3dz point
SELECT asewkt(SetPoint('LINESTRINGM(0 0 0, 1 1 1, 2 2 2)', 1, 'POINTM(90 91 92)'));
-- Replacing 3dm line with 4d point
SELECT asewkt(SetPoint('LINESTRINGM(0 0 0, 1 1 1, 2 2 2)', 2, 'POINT(90 91 92 93)'));
-- Replacing 3dz line with 4d point
SELECT asewkt(SetPoint('LINESTRING(0 0 0, 1 1 1, 2 2 2)', 1, 'POINT(90 91 92 93)'));
-- Replacing 4d line with 2d/3dm/3dz/4d point
SELECT asewkt(SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 3, 'POINT(90 91)'));
SELECT asewkt(SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 2, 'POINT(90 91 92)'));
SELECT asewkt(SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 1, 'POINTM(90 91 92)'));
SELECT asewkt(SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 0, 'POINT(90 91 92 93)'));
-- Repeat all tests with new function names.
-- Out of range indexes
SELECT ST_SetPoint('LINESTRING(0 0, 1 1, 2 2)', 3, 'POINT(9 9)');
......
......@@ -10,15 +10,3 @@ LINESTRING(0 0 0 0,1 1 1 1,2 2 2 2,90 91 0 0)
LINESTRING(0 0 0 0,1 1 1 1,90 91 92 0,4 4 4 4)
LINESTRING(0 0 0 0,90 91 0 92,2 2 2 2,4 4 4 4)
LINESTRING(90 91 92 93,1 1 1 1,2 2 2 2,4 4 4 4)
ERROR: Point index out of range (0..2)
ERROR: Point index out of range (0..2)
ERROR: First argument must be a LINESTRING
ERROR: Third argument must be a POINT
LINESTRING(90 91 92,1 1 1,2 2 2)
LINESTRINGM(0 0 0,90 91 92,2 2 2)
LINESTRINGM(0 0 0,1 1 1,90 91 93)
LINESTRING(0 0 0,90 91 92,2 2 2)
LINESTRING(0 0 0 0,1 1 1 1,2 2 2 2,90 91 0 0)
LINESTRING(0 0 0 0,1 1 1 1,90 91 92 0,4 4 4 4)
LINESTRING(0 0 0 0,90 91 0 92,2 2 2 2,4 4 4 4)
LINESTRING(90 91 92 93,1 1 1 1,2 2 2 2,4 4 4 4)
This diff is collapsed.
......@@ -12,20 +12,6 @@ ERROR: isring() should only be called on a LINE
isClosed02|t
ERROR: Exception in LWGEOM2GEOS: curved geometry not supported.
ERROR: isring() should only be called on a LINE
ndims01|4
geometrytype01|CIRCULARSTRING
ndims02|3
geometrytype02|CIRCULARSTRING
ndims03|3
geometrytype03|CIRCULARSTRINGM
ndims04|2
geometrytype04|CIRCULARSTRING
isClosed01|t
ERROR: Exception in LWGEOM2GEOS: curved geometry not supported.
ERROR: isring() should only be called on a LINE
isClosed02|t
ERROR: Exception in LWGEOM2GEOS: curved geometry not supported.
ERROR: isring() should only be called on a LINE
public.circularstring.the_geom_2d SRID:-1 TYPE:CIRCULARSTRING DIMS:2
public.circularstring.the_geom_3dm SRID:-1 TYPE:CIRCULARSTRINGM DIMS:3
public.circularstring.the_geom_3dz SRID:-1 TYPE:CIRCULARSTRING DIMS:3
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment