Commit fceec809 authored by Sandro Santilli's avatar Sandro Santilli

Moved GEOS/JTS function from regress to ogc test


git-svn-id: http://svn.osgeo.org/postgis/trunk@2195 b70326c6-7e19-0410-871a-916f4a2858ee
parent ba7dc207
......@@ -194,8 +194,6 @@ select '118', length3d('MULTILINESTRING((0 0 0, 1 1 1),(0 0 0, 1 1 1, 2 2 2) )':
---selection
select '119', within('LINESTRING(-1 -1, -1 101, 101 101, 101 -1)'::GEOMETRY,'BOX3D(0 0, 100 100)'::BOX3D);
select '120', within('LINESTRING(-1 -1, -1 100, 101 100, 101 -1)'::GEOMETRY,'BOX3D(0 0, 100 100)'::BOX3D);
--- TOAST testing
......@@ -220,8 +218,6 @@ select '128',a ~ b from TEST;
select '129', mem_size(dropBBOX(a)), mem_size(dropBBOX(b)) from TEST;
select '130', geosnoop('POLYGON((0 0, 1 1, 0 0))');
select '131', X('POINT(1 2)');
select '132', Y('POINT(1 2)');
select '133', Z('POINT(1 2)');
......@@ -252,7 +248,6 @@ select '147', asewkt(force_4d('POINT(1 2 3)'));
select '148', astext(segmentize('LINESTRING(0 0, 10 0)', 5));
select '149', asewkt(linemerge('GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), LINESTRING(4 4, 1 1), LINESTRING(-5 -5, 0 0))'::geometry));
select '150', asewkt(force_collection(setsrid('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry, 6)));
......
......@@ -116,8 +116,6 @@ ERROR: parse error - invalid geometry
116|4.24264068711929
117|4.24264068711929
118|5.19615242270663
119|f
120|f
121|BOX3D(1.19894826 1.20265412 0,999.932129 999.692932 0)|BOX3D(1.40486765 1.3484304 0,999.857666 999.936401 0)
122|f
123|f
......@@ -127,8 +125,6 @@ ERROR: parse error - invalid geometry
127|f
128|f
129|34009|34009
NOTICE: IllegalArgumentException: Number of points must be 0 or >3
ERROR: POSTGIS2GEOS conversion failed
131|1
132|2
133|
......@@ -152,6 +148,5 @@ ERROR: POSTGIS2GEOS conversion failed
146|POINT(1 2 0 3)
147|POINT(1 2 3 0)
148|LINESTRING(0 0,5 0,10 0)
149|LINESTRING(-5 -5,0 0,1 1,4 4)
150|SRID=6;GEOMETRYCOLLECTION(POLYGON((0 0,1 0,1 1,0 1,0 0)))
151|
---
--- Tests for GEOS/JTS implemented functions
---
---
-- Ouput is snapped to grid to account for small floating numbers
-- differences between architectures
SELECT 'buffer', astext(SnapToGrid(buffer('POINT(0 0)', 1, 2), 1.0e-14));
......@@ -16,6 +21,9 @@ SELECT 'crosses', crosses('LINESTRING(0 10, 0 -10)', 'LINESTRING(-4 0, 1 1)');
SELECT 'within', within('POINT(5 5)', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))');
SELECT 'within', within('POINT(0 0)', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))');
SELECT 'within', within('POINT(-1 0)', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))');
-- moved here from regress.sql
select 'within119', within('LINESTRING(-1 -1, -1 101, 101 101, 101 -1)'::GEOMETRY,'BOX3D(0 0, 100 100)'::BOX3D);
select 'within120', within('LINESTRING(-1 -1, -1 100, 101 100, 101 -1)'::GEOMETRY,'BOX3D(0 0, 100 100)'::BOX3D);
SELECT 'contains', contains('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))','POINT(-1 0)');
SELECT 'contains', contains('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))','POINT(0 0)');
SELECT 'contains', contains('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))','POINT(5 5)');
......@@ -36,10 +44,13 @@ SELECT 'polygonize_garray', astext(polygonize_garray('{0102000000020000000000000
SELECT 'polygonize_garray', astext(geometryn(polygonize_garray('{LINESTRING(0 0, 10 0):LINESTRING(10 0, 10 10):LINESTRING(10 10, 0 10):LINESTRING(0 10, 0 0)}'), 1));
select 'linemerge149', asewkt(linemerge('GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), LINESTRING(4 4, 1 1), LINESTRING(-5 -5, 0 0))'::geometry));
--- postgis-devel/2005-December/001784.html
select 'intersects', intersects(
polygonfromtext('POLYGON((0.0 0.0,1.0 0.0,1.0 1.0,1.0 0.0,0.0 0.0))'),
polygonfromtext('POLYGON((0.0 2.0,1.0 2.0,1.0 3.0,0.0 3.0,0.0 2.0))')
);
select '130', geosnoop('POLYGON((0 0, 1 1, 0 0))');
......@@ -13,6 +13,8 @@ crosses|t
within|t
within|f
within|f
within119|f
within120|f
contains|f
contains|f
contains|t
......@@ -32,4 +34,7 @@ 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
NOTICE: IllegalArgumentException: Number of points must be 0 or >3
ERROR: POSTGIS2GEOS conversion failed
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