adds test on multipolygon

This commit is contained in:
Andy Eschbacher 2018-01-10 16:45:36 -05:00
parent 807a5373e8
commit 628fd2b839
2 changed files with 16 additions and 0 deletions

View File

@ -10,3 +10,8 @@ SET client_min_messages TO WARNING;
POINT(0 0)
(1 row)
st_astext
------------
POINT(0 0)
(1 row)

View File

@ -11,5 +11,16 @@ SELECT st_astext(cdb_crankshaft.CDB_PIA(g)) from a;
WITH square AS (
SELECT 'SRID=4326;POLYGON((-1 1, 1 1, 1 -1, -1 -1, -1 1))'::geometry as g
)
SELECT ST_AsText(cdb_crankshaft.CDB_PIA(g))
FROM square;
-- MultiPolygon test
-- square centered on 0,0 with sides of length 2
-- expectation: point(0, 0)
WITH square AS (
SELECT
ST_Multi('SRID=4326;POLYGON((-1 1, 1 1, 1 -1, -1 -1, -1 1))'::geometry) as g
)
SELECT ST_AsText(cdb_crankshaft.CDB_PIA(g))
FROM square