--- basic datatypes (correct)
-select 'POINT( 1 2 )'::GEOMETRY as geom;
-select 'POINT( 1 2 3)'::GEOMETRY as geom;
-
-select 'LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4)'::GEOMETRY as geom;
-select 'LINESTRING( 0 0 0 , 1 1 1 , 2 2 2 , 3 3 3, 4 4 4)'::GEOMETRY as geom;
-select 'LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15)'::GEOMETRY as geom;
-
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0) )'::GEOMETRY as geom;
-select 'POLYGON( (0 0 1 , 10 0 1, 10 10 1, 0 10 1, 0 0 1) )'::GEOMETRY as geom;
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) )'::GEOMETRY as geom;
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) )'::GEOMETRY as geom;
-select 'POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1 , 5 7 1, 5 5 1) )'::GEOMETRY as geom;
-select 'POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) )'::GEOMETRY as geom;
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1 , 5 7 1, 5 5 1) ))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3) )'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4),POINT( 1 2 3) )'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4) )'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) )'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0) ) )'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY as geom;
-
-select 'MULTIPOINT( 1 2)'::GEOMETRY as geom;
-select 'MULTIPOINT( 1 2 3)'::GEOMETRY as geom;
-select 'MULTIPOINT( 1 2, 3 4, 5 6)'::GEOMETRY as geom;
-select 'MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13)'::GEOMETRY as geom;
-select 'MULTIPOINT( 1 2, 1 2 3, 4 5, 6 7 8)'::GEOMETRY as geom;
-select 'MULTIPOINT( 1 2 3,4 5)'::GEOMETRY as geom;
-
-select 'MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) )'::GEOMETRY as geom;
-select 'MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY as geom;
-select 'MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4),(1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) )'::GEOMETRY as geom;
-select 'MULTILINESTRING( (1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),(0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY as geom;
-
-select 'MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)) )'::GEOMETRY as geom;
-select 'MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) )'::GEOMETRY as geom;
-select 'MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY as geom;
-
-
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(MULTILINESTRING( (1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),(0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4)))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),MULTIPOINT( 1 2 3))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2, 3 4, 5 6),POINT( 1 2 3))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3),MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ),POINT( 1 2 3))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3), MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ))'::GEOMETRY as geom;
-select 'GEOMETRYCOLLECTION(MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ),MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4),(1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) ),MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY as geom;
-
-select 'MULTIPOINT( -1 -2 -3, 5.4 6.6 7.77, -5.4 -6.6 -7.77, 1e6 1e-6 -1e6, -1.3e-6 -1.4e-5)'::GEOMETRY as geom;
-
+select astext('POINT( 1 2 )'::GEOMETRY) as geom;
+select astext('POINT( 1 2 3)'::GEOMETRY) as geom;
+
+select astext('LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4)'::GEOMETRY) as geom;
+select astext('LINESTRING( 0 0 0 , 1 1 1 , 2 2 2 , 3 3 3, 4 4 4)'::GEOMETRY) as geom;
+select astext('LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15)'::GEOMETRY) as geom;
+
+select astext('POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0) )'::GEOMETRY) as geom;
+select astext('POLYGON( (0 0 1 , 10 0 1, 10 10 1, 0 10 1, 0 0 1) )'::GEOMETRY) as geom;
+select astext('POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) )'::GEOMETRY) as geom;
+select astext('POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) )'::GEOMETRY) as geom;
+select astext('POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1 , 5 7 1, 5 5 1) )'::GEOMETRY) as geom;
+select astext('POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) )'::GEOMETRY) as geom;
+
+select astext('GEOMETRYCOLLECTION(POINT( 1 2 ))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(POINT( 1 2 3))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1 , 5 7 1, 5 5 1) ))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3) )'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4),POINT( 1 2 3) )'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(POINT( 1 2 ),LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4) )'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) )'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0) ) )'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY);
+
+select astext('MULTIPOINT( 1 2)'::GEOMETRY) as geom;
+select astext('MULTIPOINT( 1 2 3)'::GEOMETRY) as geom;
+select astext('MULTIPOINT( 1 2, 3 4, 5 6)'::GEOMETRY) as geom;
+select astext('MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13)'::GEOMETRY) as geom;
+select astext('MULTIPOINT( 1 2, 1 2 3, 4 5, 6 7 8)'::GEOMETRY) as geom;
+select astext('MULTIPOINT( 1 2 3,4 5)'::GEOMETRY) as geom;
+
+select astext('MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) )'::GEOMETRY) as geom;
+select astext('MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY) as geom;
+select astext('MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4),(1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) )'::GEOMETRY) as geom;
+select astext('MULTILINESTRING( (1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),(0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY) as geom;
+
+select astext('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)) )'::GEOMETRY) as geom;
+select astext('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) )'::GEOMETRY) as geom;
+select astext('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as geom;
+
+
+select astext('GEOMETRYCOLLECTION(MULTIPOINT( 1 2))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(MULTILINESTRING( (1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),(0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4)))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(POINT( 1 2 ),MULTIPOINT( 1 2 3))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(MULTIPOINT( 1 2, 3 4, 5 6),POINT( 1 2 3))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(POINT( 1 2 3),MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ),POINT( 1 2 3))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(POINT( 1 2 3), MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ))'::GEOMETRY);
+select astext('GEOMETRYCOLLECTION(MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ),MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4),(1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) ),MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY);
+
+select astext('MULTIPOINT( -1 -2 -3, 5.4 6.6 7.77, -5.4 -6.6 -7.77, 1e6 1e-6 -1e6, -1.3e-6 -1.4e-5)'::GEOMETRY) as geom;
+
+select astext('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1) ))'::GEOMETRY) as geom;
--- basic datatype (incorrect)
-begin;
select 'POINT()'::GEOMETRY as geom;
-rollback;
-begin;
select 'POINT(1)'::GEOMETRY as geom;
-rollback;
-begin;
select 'POINT(,)'::GEOMETRY as geom;
-rollback;
-begin;
select 'MULTIPOINT(,)'::GEOMETRY as geom;
-rollback;
-begin;
select 'POINT(a b)'::GEOMETRY as geom;
-rollback;
-begin;
select 'MULTIPOINT()'::GEOMETRY as geom;
-rollback;
-begin;
-select 'GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1) ))'::GEOMETRY as geom;
-rollback;
-begin;
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10) )'::GEOMETRY as geom;
-rollback;
-begin;
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7) )'::GEOMETRY as geom;
-rollback;
-begin;
-select 'MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2,) )'::GEOMETRY as geom;
-rollback;
+select astext('POLYGON( (0 0, 10 0, 10 10, 0 10) )'::GEOMETRY);
+select astext('POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7) )'::GEOMETRY);
+select astext('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2,) )'::GEOMETRY);
--- funny results
-select 'POINT(1 2 3, 4 5 6)'::GEOMETRY as geom;
-select 'POINT(1 2 3 4 5 6 7)'::GEOMETRY as geom;
-
-select 'LINESTRING(1 1)'::GEOMETRY as geom;
-select 'POINT( 1e700 0)'::GEOMETRY as geom;
-select 'POINT( -1e700 0)'::GEOMETRY as geom;
-
-select 'MULTIPOINT(1 1, 2 2'::GEOMETRY as geom;
+select astext('POINT(1 2 3, 4 5 6)'::GEOMETRY);
+select astext('POINT(1 2 3 4 5 6 7)'::GEOMETRY);
+select astext('LINESTRING(1 1)'::GEOMETRY);
+select astext('POINT( 1e700 0)'::GEOMETRY);
+select astext('POINT( -1e700 0)'::GEOMETRY);
+select astext('MULTIPOINT(1 1, 2 2'::GEOMETRY);
--- is_same() testing
select mem_size(a), mem_size(b) from TEST;
drop table TEST;
-
-select 'POINT( 1 2 )'::GEOMETRY as geom;
- geom
-------------
- POINT(1 2)
-(1 row)
-
-select 'POINT( 1 2 3)'::GEOMETRY as geom;
- geom
---------------
- POINT(1 2 3)
-(1 row)
-
-select 'LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4)'::GEOMETRY as geom;
- geom
----------------------------------
- LINESTRING(0 0,1 1,2 2,3 3,4 4)
-(1 row)
-
-select 'LINESTRING( 0 0 0 , 1 1 1 , 2 2 2 , 3 3 3, 4 4 4)'::GEOMETRY as geom;
- geom
--------------------------------------------
- LINESTRING(0 0 0,1 1 1,2 2 2,3 3 3,4 4 4)
-(1 row)
-
-select 'LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15)'::GEOMETRY as geom;
- geom
--------------------------------------------------
- LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15)
-(1 row)
-
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0) )'::GEOMETRY as geom;
- geom
-------------------------------------
- POLYGON((0 0,10 0,10 10,0 10,0 0))
-(1 row)
-
-select 'POLYGON( (0 0 1 , 10 0 1, 10 10 1, 0 10 1, 0 0 1) )'::GEOMETRY as geom;
- geom
-----------------------------------------------
- POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1))
-(1 row)
-
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) )'::GEOMETRY as geom;
- geom
-----------------------------------------------------------
- POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5))
-(1 row)
-
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) )'::GEOMETRY as geom;
- geom
---------------------------------------------------------------------------------
- POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5),(1 1,2 1,2 2,1 2,1 1))
-(1 row)
-
-select 'POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1 , 5 7 1, 5 5 1) )'::GEOMETRY as geom;
- geom
-------------------------------------------------------------------------------
- POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1))
-(1 row)
-
-select 'POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) )'::GEOMETRY as geom;
- geom
---------------------------------------------------------------------------------------------------------------
- POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ))'::GEOMETRY as geom;
- geom
---------------------------------
- GEOMETRYCOLLECTION(POINT(1 2))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3))'::GEOMETRY as geom;
- geom
-----------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY as geom;
- geom
------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(0 0,1 1,2 2,3 3,4 4))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15))'::GEOMETRY as geom;
- geom
----------------------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1 , 5 7 1, 5 5 1) ))'::GEOMETRY as geom;
- geom
---------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1)))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3) )'::GEOMETRY as geom;
- geom
------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4),POINT( 1 2 3) )'::GEOMETRY as geom;
- geom
-----------------------------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4) )'::GEOMETRY as geom;
- geom
-----------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(0 0,1 1,2 2,3 3,4 4))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) )'::GEOMETRY as geom;
- geom
------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0) ) )'::GEOMETRY as geom;
- geom
---------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY as geom;
- geom
-------------------------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
-(1 row)
-
-select 'MULTIPOINT( 1 2)'::GEOMETRY as geom;
- geom
------------------
- MULTIPOINT(1 2)
-(1 row)
-
-select 'MULTIPOINT( 1 2 3)'::GEOMETRY as geom;
- geom
--------------------
- MULTIPOINT(1 2 3)
-(1 row)
-
-select 'MULTIPOINT( 1 2, 3 4, 5 6)'::GEOMETRY as geom;
- geom
--------------------------
- MULTIPOINT(1 2,3 4,5 6)
-(1 row)
-
-select 'MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13)'::GEOMETRY as geom;
- geom
------------------------------------------
- MULTIPOINT(1 2 3,5 6 7,8 9 10,11 12 13)
-(1 row)
-
-select 'MULTIPOINT( 1 2, 1 2 3, 4 5, 6 7 8)'::GEOMETRY as geom;
- geom
--------------------------------------
- MULTIPOINT(1 2 0,1 2 3,4 5 0,6 7 8)
-(1 row)
-
-select 'MULTIPOINT( 1 2 3,4 5)'::GEOMETRY as geom;
- geom
--------------------------
- MULTIPOINT(1 2 3,4 5 0)
-(1 row)
-
-select 'MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) )'::GEOMETRY as geom;
- geom
-----------------------------------------
- MULTILINESTRING((0 0,1 1,2 2,3 3,4 4))
-(1 row)
-
-select 'MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY as geom;
- geom
---------------------------------------------------------------
- MULTILINESTRING((0 0,1 1,2 2,3 3,4 4),(0 0,1 1,2 2,3 3,4 4))
-(1 row)
-
-select 'MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4),(1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) )'::GEOMETRY as geom;
- geom
-------------------------------------------------------------------------------------------------------------------------
- MULTILINESTRING((0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15))
-(1 row)
-
-select 'MULTILINESTRING( (1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),(0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY as geom;
- geom
-------------------------------------------------------------------------------------------------------------------------
- MULTILINESTRING((1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))
-(1 row)
-
-select 'MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)) )'::GEOMETRY as geom;
- geom
--------------------------------------------
- MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))
-(1 row)
-
-select 'MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) )'::GEOMETRY as geom;
- geom
----------------------------------------------------------------------------------------------
- MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5)))
-(1 row)
-
-select 'MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY as geom;
- geom
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- MULTIPOLYGON(((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2))'::GEOMETRY as geom;
- geom
---------------------------------
- GEOMETRYCOLLECTION(POINT(1 2))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3))'::GEOMETRY as geom;
- geom
-----------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY as geom;
- geom
------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 3),POINT(5 6 7),POINT(8 9 10),POINT(11 12 13))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ))'::GEOMETRY as geom;
- geom
------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(0 0,1 1,2 2,3 3,4 4))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTILINESTRING( (1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),(0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4)))'::GEOMETRY as geom;
- geom
----------------------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ))'::GEOMETRY as geom;
- geom
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),MULTIPOINT( 1 2 3))'::GEOMETRY as geom;
- geom
------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2, 3 4, 5 6),POINT( 1 2 3))'::GEOMETRY as geom;
- geom
--------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(3 4 0),POINT(5 6 0),POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3),MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ))'::GEOMETRY as geom;
- geom
-----------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 3),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ),POINT( 1 2 3))'::GEOMETRY as geom;
- geom
-----------------------------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3), MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ))'::GEOMETRY as geom;
- geom
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 3),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ),MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4),(1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) ),MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY as geom;
- geom
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),POINT(1 2 3),POINT(5 6 7),POINT(8 9 10),POINT(11 12 13))
-(1 row)
-
-select 'MULTIPOINT( -1 -2 -3, 5.4 6.6 7.77, -5.4 -6.6 -7.77, 1e6 1e-6 -1e6, -1.3e-6 -1.4e-5)'::GEOMETRY as geom;
- geom
-----------------------------------------------------------------------------------------------
- MULTIPOINT(-1 -2 -3,5.4 6.6 7.77,-5.4 -6.6 -7.77,1000000 1e-06 -1000000,-1.3e-06 -1.4e-05 0)
-(1 row)
-
-begin;
-BEGIN
-select 'POINT()'::GEOMETRY as geom;
+POINT(1 2)
+POINT(1 2 3)
+LINESTRING(0 0,1 1,2 2,3 3,4 4)
+LINESTRING(0 0 0,1 1 1,2 2 2,3 3 3,4 4 4)
+LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15)
+POLYGON((0 0,10 0,10 10,0 10,0 0))
+POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1))
+POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5))
+POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5),(1 1,2 1,2 2,1 2,1 1))
+POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1))
+POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1))
+GEOMETRYCOLLECTION(POINT(1 2))
+GEOMETRYCOLLECTION(POINT(1 2 3))
+GEOMETRYCOLLECTION(LINESTRING(0 0,1 1,2 2,3 3,4 4))
+GEOMETRYCOLLECTION(LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15))
+GEOMETRYCOLLECTION(POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1)))
+GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3))
+GEOMETRYCOLLECTION(LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),POINT(1 2 3))
+GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(0 0,1 1,2 2,3 3,4 4))
+GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15))
+GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)))
+GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
+MULTIPOINT(1 2)
+MULTIPOINT(1 2 3)
+MULTIPOINT(1 2,3 4,5 6)
+MULTIPOINT(1 2 3,5 6 7,8 9 10,11 12 13)
+MULTIPOINT(1 2 0,1 2 3,4 5 0,6 7 8)
+MULTIPOINT(1 2 3,4 5 0)
+MULTILINESTRING((0 0,1 1,2 2,3 3,4 4))
+MULTILINESTRING((0 0,1 1,2 2,3 3,4 4),(0 0,1 1,2 2,3 3,4 4))
+MULTILINESTRING((0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15))
+MULTILINESTRING((1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))
+MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))
+MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5)))
+MULTIPOLYGON(((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
+GEOMETRYCOLLECTION(POINT(1 2))
+GEOMETRYCOLLECTION(POINT(1 2 3))
+GEOMETRYCOLLECTION(POINT(1 2 3),POINT(5 6 7),POINT(8 9 10),POINT(11 12 13))
+GEOMETRYCOLLECTION(LINESTRING(0 0,1 1,2 2,3 3,4 4))
+GEOMETRYCOLLECTION(LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))
+GEOMETRYCOLLECTION(POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
+GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3))
+GEOMETRYCOLLECTION(POINT(1 2 0),POINT(3 4 0),POINT(5 6 0),POINT(1 2 3))
+GEOMETRYCOLLECTION(POINT(1 2 3),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))
+GEOMETRYCOLLECTION(LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),POINT(1 2 3))
+GEOMETRYCOLLECTION(POINT(1 2 3),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
+GEOMETRYCOLLECTION(POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),POINT(1 2 3),POINT(5 6 7),POINT(8 9 10),POINT(11 12 13))
+MULTIPOINT(-1 -2 -3,5.4 6.6 7.77,-5.4 -6.6 -7.77,1000000 1e-06 -1000000,-1.3e-06 -1.4e-05 0)
+GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1)))
ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'POINT(1)'::GEOMETRY as geom;
ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'POINT(,)'::GEOMETRY as geom;
ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'MULTIPOINT(,)'::GEOMETRY as geom;
ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'POINT(a b)'::GEOMETRY as geom;
ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'MULTIPOINT()'::GEOMETRY as geom;
ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1) ))'::GEOMETRY as geom;
-ERROR: couldnt parse objects in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10) )'::GEOMETRY as geom;
ERROR: polygon has ring where first point != last point
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7) )'::GEOMETRY as geom;
ERROR: polygon has ring where first point != last point
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2,) )'::GEOMETRY as geom;
ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-select 'POINT(1 2 3, 4 5 6)'::GEOMETRY as geom;
- geom
---------------
- POINT(1 2 3)
-(1 row)
-
-select 'POINT(1 2 3 4 5 6 7)'::GEOMETRY as geom;
- geom
---------------
- POINT(1 2 3)
-(1 row)
-
-select 'LINESTRING(1 1)'::GEOMETRY as geom;
- geom
----------------------
- LINESTRING(1 1,1 1)
-(1 row)
-
-select 'POINT( 1e700 0)'::GEOMETRY as geom;
- geom
--------------------
- POINT(Infinity 0)
-(1 row)
-
-select 'POINT( -1e700 0)'::GEOMETRY as geom;
- geom
---------------------
- POINT(-Infinity 0)
-(1 row)
-
-select 'MULTIPOINT(1 1, 2 2'::GEOMETRY as geom;
- geom
----------------------
- MULTIPOINT(1 1,2 2)
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1 0)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1 0)'::GEOMETRY ~= 'POINT(1 1 0)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(1 1,2 2)'::GEOMETRY ~= 'MULTIPOINT(1 1,2 2)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(2 2, 1 1)'::GEOMETRY ~= 'MULTIPOINT(1 1,2 2)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3),POINT(4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(4 5 6, 1 2 3)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(MULTIPOINT(1 2 3, 4 5 6))'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'LINESTRING(1 1,2 2)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'LINESTRING(1 1, 2 2)'::GEOMETRY ~= 'LINESTRING(2 2, 1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'LINESTRING(1 1, 2 2)'::GEOMETRY ~= 'LINESTRING(1 1, 2 2, 3 3)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY &< 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY &< 'POINT(2 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(2 1)'::GEOMETRY &< 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY << 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY << 'POINT(2 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(2 1)'::GEOMETRY << 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY &> 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY &> 'POINT(2 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(2 1)'::GEOMETRY &> 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY >> 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY >> 'POINT(2 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(2 1)'::GEOMETRY >> 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY && 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY && 'POINT(2 2)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1 1, 2 2)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1.0001 1, 2 2)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1 1.0001, 2 2)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1 0, 2 2)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1.0001 0, 2 2)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(0 1, 1 2)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(0 1.0001, 1 2)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 10 10)'::GEOMETRY ~ 'MULTIPOINT(5 5, 7 7)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(5 5, 7 7)'::GEOMETRY ~ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(0 0, 7 7)'::GEOMETRY ~ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(-0.0001 0, 7 7)'::GEOMETRY ~ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 10 10)'::GEOMETRY @ 'MULTIPOINT(5 5, 7 7)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(5 5, 7 7)'::GEOMETRY @ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 7 7)'::GEOMETRY @ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(-0.0001 0, 7 7)'::GEOMETRY @ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select box3d('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as bvol;
- bvol
---------------------
- BOX3D(0 0 0,7 7 0)
-(1 row)
-
-select geometry('BOX3D(0 0 0, 7 7 7 )'::BOX3D) as a_geom;
- a_geom
-----------------------
- BOX3D ONLY - NOT useable
-(1 row)
-
-select npoints('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as value;
- value
--------
- 2
-(1 row)
-
-select npoints('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3))'::GEOMETRY) as value;
- value
--------
- 4
-(1 row)
-
-select nrings('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
- value
--------
- 6
-(1 row)
-
-select mem_size('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
- value
--------
- 884
-(1 row)
-
-select numb_sub_objs('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3),MULTIPOINT(1 1, 2 2))'::GEOMETRY) as value;
- value
--------
- 4
-(1 row)
-
-select summary('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3),MULTIPOINT(1 1, 2 2))'::GEOMETRY) as value;
- value
--------------------------------------------------------------------------------------------------------------
+POINT(1 2 3)
+POINT(1 2 3)
+LINESTRING(1 1,1 1)
+POINT(inf 0)
+POINT(-inf 0)
+MULTIPOINT(1 1,2 2)
+t
+t
+t
+t
+t
+t
+t
+t
+t
+f
+f
+f
+t
+t
+f
+f
+t
+f
+t
+f
+t
+f
+f
+t
+t
+f
+t
+f
+f
+t
+f
+t
+f
+f
+t
+t
+f
+t
+f
+f
+f
+BOX3D(0 0 0,7 7 0)
+BOX3D ONLY - NOT useable
+2
+4
+6
+884
+4
Object 0 is a POINT()
Object 1 is a LINESTRING() with 3 points
Object 2 is a POINT()
Object 3 is a POINT()
-(1 row)
-
-select area2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
- value
--------
- 291
-(1 row)
-
-select perimeter2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
- value
--------
- 140
-(1 row)
-
-select perimeter3d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
- value
--------
- 140
-(1 row)
-
-select length2d('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value;
- value
----------
- 4.24264
-(1 row)
-
-select length3d('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value;
- value
----------
- 4.24264
-(1 row)
-
-select length3d('MULTILINESTRING((0 0 0, 1 1 1),(0 0 0, 1 1 1, 2 2 2) )'::GEOMETRY) as value;
- value
----------
- 5.19615
-(1 row)
-
-select truly_inside('LINESTRING(-1 -1, -1 101, 101 101, 101 -1)'::GEOMETRY,'BOX3D(0 0, 100 100)'::BOX3d) as value;
- value
--------
- f
-(1 row)
-
-select truly_inside('LINESTRING(-1 -1, -1 100, 101 100, 101 -1)'::GEOMETRY,'BOX3D(0 0, 100 100)'::BOX3d) as value;
- value
--------
- t
-(1 row)
-
-CREATE
-INSERT 18640675 1
-
-
----test basic ops on this
-
-select box3d(a) as box3d_a, box3d(b) as box3d_b from TEST;
- box3d_a | box3d_b
---------------------------------------------------------+-------------------------------------------------------
- BOX3D(1.19894826 1.20265412 0,999.932129 999.692932 0) | BOX3D(1.40486765 1.3484304 0,999.857666 999.936401 0)
-(1 row)
-
-
-select a <<b from TEST;
- ?column?
-----------
- f
-(1 row)
-
-select a &<b from TEST;
- ?column?
-----------
- f
-(1 row)
-
-select a >>b from TEST;
- ?column?
-----------
- f
-(1 row)
-
-select a &>b from TEST;
- ?column?
-----------
- f
-(1 row)
-
-
-select a ~= b from TEST;
- ?column?
-----------
- f
-(1 row)
-
-select a @ b from TEST;
- ?column?
-----------
- f
-(1 row)
-
-select a ~ b from TEST;
- ?column?
-----------
- f
-(1 row)
-
-
-select mem_size(a), mem_size(b) from TEST;
- mem_size | mem_size
-----------+----------
- 72080 | 72080
-(1 row)
-
-
-drop table TEST;
-DROP
-
+291
+140
+140
+4.24264
+4.24264
+5.19615
+f
+t
+BOX3D(1.19894826 1.20265412 0,999.932129 999.692932 0) | BOX3D(1.40486765 1.3484304 0,999.857666 999.936401 0)
+f
+f
+f
+f
+f
+f
+f
+72080 | 72080
-select 'POINT( 1 2 )'::GEOMETRY as geom;
- geom
-------------
- POINT(1 2)
-(1 row)
-
-select 'POINT( 1 2 3)'::GEOMETRY as geom;
- geom
---------------
- POINT(1 2 3)
-(1 row)
-
-select 'LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4)'::GEOMETRY as geom;
- geom
----------------------------------
- LINESTRING(0 0,1 1,2 2,3 3,4 4)
-(1 row)
-
-select 'LINESTRING( 0 0 0 , 1 1 1 , 2 2 2 , 3 3 3, 4 4 4)'::GEOMETRY as geom;
- geom
--------------------------------------------
- LINESTRING(0 0 0,1 1 1,2 2 2,3 3 3,4 4 4)
-(1 row)
-
-select 'LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15)'::GEOMETRY as geom;
- geom
--------------------------------------------------
- LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15)
-(1 row)
-
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0) )'::GEOMETRY as geom;
- geom
-------------------------------------
- POLYGON((0 0,10 0,10 10,0 10,0 0))
-(1 row)
-
-select 'POLYGON( (0 0 1 , 10 0 1, 10 10 1, 0 10 1, 0 0 1) )'::GEOMETRY as geom;
- geom
-----------------------------------------------
- POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1))
-(1 row)
-
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) )'::GEOMETRY as geom;
- geom
-----------------------------------------------------------
- POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5))
-(1 row)
-
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) )'::GEOMETRY as geom;
- geom
---------------------------------------------------------------------------------
- POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5),(1 1,2 1,2 2,1 2,1 1))
-(1 row)
-
-select 'POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1 , 5 7 1, 5 5 1) )'::GEOMETRY as geom;
- geom
-------------------------------------------------------------------------------
- POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1))
-(1 row)
-
-select 'POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) )'::GEOMETRY as geom;
- geom
---------------------------------------------------------------------------------------------------------------
- POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ))'::GEOMETRY as geom;
- geom
---------------------------------
- GEOMETRYCOLLECTION(POINT(1 2))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3))'::GEOMETRY as geom;
- geom
-----------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY as geom;
- geom
------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(0 0,1 1,2 2,3 3,4 4))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15))'::GEOMETRY as geom;
- geom
----------------------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1 , 5 7 1, 5 5 1) ))'::GEOMETRY as geom;
- geom
---------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1)))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3) )'::GEOMETRY as geom;
- geom
------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4),POINT( 1 2 3) )'::GEOMETRY as geom;
- geom
-----------------------------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4) )'::GEOMETRY as geom;
- geom
-----------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(0 0,1 1,2 2,3 3,4 4))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) )'::GEOMETRY as geom;
- geom
------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0) ) )'::GEOMETRY as geom;
- geom
---------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),POINT( 1 2 3),POLYGON( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY as geom;
- geom
-------------------------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
-(1 row)
-
-select 'MULTIPOINT( 1 2)'::GEOMETRY as geom;
- geom
------------------
- MULTIPOINT(1 2)
-(1 row)
-
-select 'MULTIPOINT( 1 2 3)'::GEOMETRY as geom;
- geom
--------------------
- MULTIPOINT(1 2 3)
-(1 row)
-
-select 'MULTIPOINT( 1 2, 3 4, 5 6)'::GEOMETRY as geom;
- geom
--------------------------
- MULTIPOINT(1 2,3 4,5 6)
-(1 row)
-
-select 'MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13)'::GEOMETRY as geom;
- geom
------------------------------------------
- MULTIPOINT(1 2 3,5 6 7,8 9 10,11 12 13)
-(1 row)
-
-select 'MULTIPOINT( 1 2, 1 2 3, 4 5, 6 7 8)'::GEOMETRY as geom;
- geom
--------------------------------------
- MULTIPOINT(1 2 0,1 2 3,4 5 0,6 7 8)
-(1 row)
-
-select 'MULTIPOINT( 1 2 3,4 5)'::GEOMETRY as geom;
- geom
--------------------------
- MULTIPOINT(1 2 3,4 5 0)
-(1 row)
-
-select 'MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) )'::GEOMETRY as geom;
- geom
-----------------------------------------
- MULTILINESTRING((0 0,1 1,2 2,3 3,4 4))
-(1 row)
-
-select 'MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY as geom;
- geom
---------------------------------------------------------------
- MULTILINESTRING((0 0,1 1,2 2,3 3,4 4),(0 0,1 1,2 2,3 3,4 4))
-(1 row)
-
-select 'MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4),(1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) )'::GEOMETRY as geom;
- geom
-------------------------------------------------------------------------------------------------------------------------
- MULTILINESTRING((0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15))
-(1 row)
-
-select 'MULTILINESTRING( (1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),(0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY as geom;
- geom
-------------------------------------------------------------------------------------------------------------------------
- MULTILINESTRING((1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))
-(1 row)
-
-select 'MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)) )'::GEOMETRY as geom;
- geom
--------------------------------------------
- MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))
-(1 row)
-
-select 'MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) )'::GEOMETRY as geom;
- geom
----------------------------------------------------------------------------------------------
- MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5)))
-(1 row)
-
-select 'MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY as geom;
- geom
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- MULTIPOLYGON(((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2))'::GEOMETRY as geom;
- geom
---------------------------------
- GEOMETRYCOLLECTION(POINT(1 2))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3))'::GEOMETRY as geom;
- geom
-----------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY as geom;
- geom
------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 3),POINT(5 6 7),POINT(8 9 10),POINT(11 12 13))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ))'::GEOMETRY as geom;
- geom
------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(0 0,1 1,2 2,3 3,4 4))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTILINESTRING( (1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),(0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4)))'::GEOMETRY as geom;
- geom
----------------------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ))'::GEOMETRY as geom;
- geom
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 ),MULTIPOINT( 1 2 3))'::GEOMETRY as geom;
- geom
------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOINT( 1 2, 3 4, 5 6),POINT( 1 2 3))'::GEOMETRY as geom;
- geom
--------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 0),POINT(3 4 0),POINT(5 6 0),POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3),MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ))'::GEOMETRY as geom;
- geom
-----------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 3),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ),POINT( 1 2 3))'::GEOMETRY as geom;
- geom
-----------------------------------------------------------------------------
- GEOMETRYCOLLECTION(LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),POINT(1 2 3))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3), MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ))'::GEOMETRY as geom;
- geom
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POINT(1 2 3),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)))
-(1 row)
-
-select 'GEOMETRYCOLLECTION(MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) ),MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4),(1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) ),MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY as geom;
- geom
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(5 5 0,7 5 0,7 7 0,5 7 0,5 5 0)),POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1)),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),POINT(1 2 3),POINT(5 6 7),POINT(8 9 10),POINT(11 12 13))
-(1 row)
-
-select 'MULTIPOINT( -1 -2 -3, 5.4 6.6 7.77, -5.4 -6.6 -7.77, 1e6 1e-6 -1e6, -1.3e-6 -1.4e-5)'::GEOMETRY as geom;
- geom
-----------------------------------------------------------------------------------------------
- MULTIPOINT(-1 -2 -3,5.4 6.6 7.77,-5.4 -6.6 -7.77,1000000 1e-06 -1000000,-1.3e-06 -1.4e-05 0)
-(1 row)
-
-begin;
-BEGIN
-select 'POINT()'::GEOMETRY as geom;
-ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'POINT(1)'::GEOMETRY as geom;
-ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'POINT(,)'::GEOMETRY as geom;
-ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'MULTIPOINT(,)'::GEOMETRY as geom;
-ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'POINT(a b)'::GEOMETRY as geom;
-ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'MULTIPOINT()'::GEOMETRY as geom;
-ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1) ))'::GEOMETRY as geom;
-ERROR: couldnt parse objects in GEOMETRY
-
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10) )'::GEOMETRY as geom;
-ERROR: polygon has ring where first point != last point
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7) )'::GEOMETRY as geom;
-ERROR: polygon has ring where first point != last point
-rollback;
-ROLLBACK
-begin;
-BEGIN
-select 'MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2,) )'::GEOMETRY as geom;
-ERROR: couldnt parse object in GEOMETRY
-
-rollback;
-ROLLBACK
-select 'POINT(1 2 3, 4 5 6)'::GEOMETRY as geom;
- geom
---------------
- POINT(1 2 3)
-(1 row)
-
-select 'POINT(1 2 3 4 5 6 7)'::GEOMETRY as geom;
- geom
---------------
- POINT(1 2 3)
-(1 row)
-
-select 'LINESTRING(1 1)'::GEOMETRY as geom;
- geom
----------------------
- LINESTRING(1 1,1 1)
-(1 row)
-
-select 'POINT( 1e700 0)'::GEOMETRY as geom;
- geom
--------------------
- POINT(Infinity 0)
-(1 row)
-
-select 'POINT( -1e700 0)'::GEOMETRY as geom;
- geom
---------------------
- POINT(-Infinity 0)
-(1 row)
-
-select 'MULTIPOINT(1 1, 2 2'::GEOMETRY as geom;
- geom
----------------------
- MULTIPOINT(1 1,2 2)
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1 0)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1 0)'::GEOMETRY ~= 'POINT(1 1 0)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(1 1,2 2)'::GEOMETRY ~= 'MULTIPOINT(1 1,2 2)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(2 2, 1 1)'::GEOMETRY ~= 'MULTIPOINT(1 1,2 2)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'GEOMETRYCOLLECTION(POINT( 1 2 3),POINT(4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(4 5 6, 1 2 3)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(MULTIPOINT(1 2 3, 4 5 6))'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'LINESTRING(1 1,2 2)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'LINESTRING(1 1, 2 2)'::GEOMETRY ~= 'LINESTRING(2 2, 1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'LINESTRING(1 1, 2 2)'::GEOMETRY ~= 'LINESTRING(1 1, 2 2, 3 3)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY &< 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY &< 'POINT(2 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(2 1)'::GEOMETRY &< 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY << 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY << 'POINT(2 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(2 1)'::GEOMETRY << 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY &> 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY &> 'POINT(2 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(2 1)'::GEOMETRY &> 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY >> 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY >> 'POINT(2 1)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'POINT(2 1)'::GEOMETRY >> 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY && 'POINT(1 1)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'POINT(1 1)'::GEOMETRY && 'POINT(2 2)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1 1, 2 2)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1.0001 1, 2 2)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1 1.0001, 2 2)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1 0, 2 2)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1.0001 0, 2 2)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(0 1, 1 2)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(0 1.0001, 1 2)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 10 10)'::GEOMETRY ~ 'MULTIPOINT(5 5, 7 7)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(5 5, 7 7)'::GEOMETRY ~ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(0 0, 7 7)'::GEOMETRY ~ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(-0.0001 0, 7 7)'::GEOMETRY ~ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 10 10)'::GEOMETRY @ 'MULTIPOINT(5 5, 7 7)'::GEOMETRY as bool;
- bool
-------
- t
-(1 row)
-
-select 'MULTIPOINT(5 5, 7 7)'::GEOMETRY @ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(0 0, 7 7)'::GEOMETRY @ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select 'MULTIPOINT(-0.0001 0, 7 7)'::GEOMETRY @ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
- bool
-------
- f
-(1 row)
-
-select box3d('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as bvol;
- bvol
---------------------
- BOX3D(0 0 0,7 7 0)
-(1 row)
-
-select geometry('BOX3D(0 0 0, 7 7 7 )'::BOX3D) as a_geom;
- a_geom
---------------------------
- BOX3D ONLY - NOT useable
-(1 row)
-
-select npoints('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as value;
- value
--------
- 2
-(1 row)
-
-select npoints('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3))'::GEOMETRY) as value;
- value
--------
- 4
-(1 row)
-
-select nrings('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
- value
--------
- 6
-(1 row)
-
-select mem_size('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
- value
--------
- 884
-(1 row)
-
-select numb_sub_objs('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3),MULTIPOINT(1 1, 2 2))'::GEOMETRY) as value;
- value
--------
- 4
-(1 row)
-
-select summary('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3),MULTIPOINT(1 1, 2 2))'::GEOMETRY) as value;
- value
--------------------------------------------------------------------------------------------------------------
- Object 0 is a POINT()
-Object 1 is a LINESTRING() with 3 points
-Object 2 is a POINT()
-Object 3 is a POINT()
-
-(1 row)
-
-select area2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
- value
--------
- 291
-(1 row)
-
-select perimeter2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
- value
--------
- 140
-(1 row)
-
-select perimeter3d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
- value
--------
- 140
-(1 row)
-
-select length2d('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value;
- value
----------
- 4.24264
-(1 row)
-
-select length3d('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value;
- value
----------
- 4.24264
-(1 row)
-
-select length3d('MULTILINESTRING((0 0 0, 1 1 1),(0 0 0, 1 1 1, 2 2 2) )'::GEOMETRY) as value;
- value
----------
- 5.19615
-(1 row)
-
-select truly_inside('LINESTRING(-1 -1, -1 101, 101 101, 101 -1)'::GEOMETRY,'BOX3D(0 0, 100 100)'::BOX3d) as value;
- value
--------
- f
-(1 row)
-
-select truly_inside('LINESTRING(-1 -1, -1 100, 101 100, 101 -1)'::GEOMETRY,'BOX3D(0 0, 100 100)'::BOX3d) as value;
- value
--------
- t
-(1 row)
-
-CREATE
-INSERT 31865192 1
+POINT(1 2)
+POINT(1 2 3)
+LINESTRING(0 0,1 1,2 2,3 3,4 4)
+LINESTRING(0 0 0,1 1 1,2 2 2,3 3 3,4 4 4)
+LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15)
+POLYGON((0 0,10 0,10 10,0 10,0 0))
+POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1))
+POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5))
+POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5),(1 1,2 1,2 2,1 2,1 1))
+POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1))
+POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1),(1 1 1,2 1 1,2 2 1,1 2 1,1 1 1))
+GEOMETRYCOLLECTION(POINT(1 2))
+GEOMETRYCOLLECTION(POINT(1 2 3))
+GEOMETRYCOLLECTION(LINESTRING(0 0,1 1,2 2,3 3,4 4))
+GEOMETRYCOLLECTION(LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15))
+GEOMETRYCOLLECTION(POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1),(5 5 1,7 5 1,7 7 1,5 7 1,5 5 1)))
+psql:regress.sql:30: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:31: ERROR: Can not mix dimentionality in a geometry
+GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(0 0,1 1,2 2,3 3,4 4))
+psql:regress.sql:33: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:34: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:35: ERROR: Can not mix dimentionality in a geometry
+MULTIPOINT(1 2)
+MULTIPOINT(1 2 3)
+MULTIPOINT(1 2,3 4,5 6)
+MULTIPOINT(1 2 3,5 6 7,8 9 10,11 12 13)
+psql:regress.sql:41: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:42: ERROR: Can not mix dimentionality in a geometry
+MULTILINESTRING((0 0,1 1,2 2,3 3,4 4))
+MULTILINESTRING((0 0,1 1,2 2,3 3,4 4),(0 0,1 1,2 2,3 3,4 4))
+psql:regress.sql:46: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:47: ERROR: Can not mix dimentionality in a geometry
+MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))
+MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5)))
+psql:regress.sql:51: ERROR: Can not mix dimentionality in a geometry
+GEOMETRYCOLLECTION(MULTIPOINT(1 2))
+GEOMETRYCOLLECTION(MULTIPOINT(1 2 3))
+GEOMETRYCOLLECTION(MULTIPOINT(1 2 3,5 6 7,8 9 10,11 12 13))
+GEOMETRYCOLLECTION(MULTILINESTRING((0 0,1 1,2 2,3 3,4 4)))
+psql:regress.sql:58: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:59: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:60: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:61: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:62: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:63: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:64: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:65: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:67: ERROR: Can not mix dimentionality in a geometry
+GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1)))
+psql:regress.sql:72: ERROR: parse error - invalid geometry
+psql:regress.sql:73: ERROR: parse error - invalid geometry
+psql:regress.sql:74: ERROR: parse error - invalid geometry
+psql:regress.sql:75: ERROR: parse error - invalid geometry
+psql:regress.sql:76: ERROR: parse error - invalid geometry
+psql:regress.sql:77: ERROR: parse error - invalid geometry
+POLYGON((0 0,10 0,10 10,0 10))
+POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7))
+psql:regress.sql:80: ERROR: parse error - invalid geometry
+psql:regress.sql:85: ERROR: parse error - invalid geometry
+psql:regress.sql:86: ERROR: parse error - invalid geometry
+psql:regress.sql:87: ERROR: geometry requires more points
+POINT(inf 0)
+POINT(-inf 0)
+psql:regress.sql:90: ERROR: parse error - invalid geometry
+t
+f
+t
+f
+t
+psql:regress.sql:102: ERROR: parse error - invalid geometry
+f
+f
+f
+f
+f
+f
+t
+t
+f
+f
+t
+f
+t
+f
+t
+f
+f
+t
+t
+f
+t
+f
+f
+t
+f
+t
+f
+t
+f
+f
+f
+f
+t
+t
+f
+BOX3D(0 0 0,7 7 0)
+010300000001000000050000000000000000000000000000000000000000000000000000000000000000001C400000000000001C400000000000001C400000000000001C40000000000000000000000000000000000000000000000000
+2
+4
+psql:regress.sql:173: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:175: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:178: ERROR: function numb_sub_objs(geometry) does not exist
+HINT: No function matches the given name and argument types. You may need to add explicit type casts.
+
+GeometryCollection[] with 3 elements
+ Point[]
+ Line[] with 3 points
+ MultiPoint[] with 2 elements
+ Point[]
+ Point[]
+
+psql:regress.sql:185: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:187: ERROR: Can not mix dimentionality in a geometry
+psql:regress.sql:189: ERROR: Can not mix dimentionality in a geometry
+4.24264068711929
+4.24264068711929
+5.19615242270663
+psql:regress.sql:198: ERROR: function truly_inside(geometry, box3d) does not exist
+HINT: No function matches the given name and argument types. You may need to add explicit type casts.
+psql:regress.sql:199: ERROR: function truly_inside(geometry, box3d) does not exist
+HINT: No function matches the given name and argument types. You may need to add explicit type casts.
+CREATE TABLE
+INSERT 8170169 1
---test basic ops on this
select box3d(a) as box3d_a, box3d(b) as box3d_b from TEST;
- box3d_a | box3d_b
---------------------------------------------------------+-------------------------------------------------------
- BOX3D(1.19894826 1.20265412 0,999.932129 999.692932 0) | BOX3D(1.40486765 1.3484304 0,999.857666 999.936401 0)
-(1 row)
-
+BOX3D(1.19894826 1.20265412 0,999.932129 999.692932 0)|BOX3D(1.40486765 1.3484304 0,999.857666 999.936401 0)
select a <<b from TEST;
- ?column?
-----------
- f
-(1 row)
-
+f
select a &<b from TEST;
- ?column?
-----------
- f
-(1 row)
-
+f
select a >>b from TEST;
- ?column?
-----------
- f
-(1 row)
-
+f
select a &>b from TEST;
- ?column?
-----------
- f
-(1 row)
-
+f
select a ~= b from TEST;
- ?column?
-----------
- f
-(1 row)
-
+f
select a @ b from TEST;
- ?column?
-----------
- f
-(1 row)
-
+f
select a ~ b from TEST;
- ?column?
-----------
- f
-(1 row)
-
+f
select mem_size(a), mem_size(b) from TEST;
- mem_size | mem_size
-----------+----------
- 72080 | 72080
-(1 row)
-
+34009|34009
drop table TEST;
-DROP
-
+DROP TABLE
-#!/bin/csh
+#!/bin/sh
echo "Running Normal Regression Test..."
-echo ""
+echo
echo "Differences such as 'INSERT 18641077 1' are not important"
-echo ""
-createdb geometry_reg
-psql -e geometry_reg <postgis.sql >& /dev/null
-psql -e geometry_reg <regress.sql >& regress_out
+echo
+echo " expected:> obtained:<"
+echo
+
+DB=postgis_reg
+createdb $DB > /dev/null
+createlang plpgsql $DB > /dev/null
+psql -f ../lwpostgis.sql $DB > /dev/null 2>&1
+psql -tA -f regress.sql $DB > regress_out 2>&1
diff regress_out regress_expected
-dropdb geometry_reg
+dropdb $DB > /dev/null