From: Sandro Santilli Date: Mon, 16 Jan 2012 10:21:09 +0000 (+0000) Subject: Implement lwgeom_same for CURVEPOLYGON types (#1475) X-Git-Tag: 2.0.0alpha1~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=615bdce18a74467d8178e49c71c553af9cddf267;p=postgis Implement lwgeom_same for CURVEPOLYGON types (#1475) git-svn-id: http://svn.osgeo.org/postgis/trunk@8830 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c index 00fb580e3..8bc02b2d5 100644 --- a/liblwgeom/lwgeom.c +++ b/liblwgeom/lwgeom.c @@ -517,6 +517,7 @@ lwgeom_same(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2) case MULTILINETYPE: case MULTIPOLYGONTYPE: case COMPOUNDTYPE: + case CURVEPOLYTYPE: case POLYHEDRALSURFACETYPE: case TINTYPE: case COLLECTIONTYPE: diff --git a/regress/wkb.sql b/regress/wkb.sql index 428552cfb..8027ddab2 100644 --- a/regress/wkb.sql +++ b/regress/wkb.sql @@ -326,3 +326,25 @@ select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), 'COMPOUNDCURVE ZM EMPTY' ::text as g ) as foo; +-- CURVEPOLYGON +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CURVEPOLYGON EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CURVEPOLYGON Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CURVEPOLYGON M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CURVEPOLYGON ZM EMPTY' +::text as g ) as foo; + diff --git a/regress/wkb_expected b/regress/wkb_expected index ef3d21b12..4c61dc22b 100644 --- a/regress/wkb_expected +++ b/regress/wkb_expected @@ -60,3 +60,7 @@ COMPOUNDCURVE EMPTY|010900000000000000|t|000000000900000000 COMPOUNDCURVE Z EMPTY|01f103000000000000|t|00000003f100000000 COMPOUNDCURVE M EMPTY|01d907000000000000|t|00000007d900000000 COMPOUNDCURVE ZM EMPTY|01c10b000000000000|t|0000000bc100000000 +CURVEPOLYGON EMPTY|010a00000000000000|t|000000000a00000000 +CURVEPOLYGON Z EMPTY|01f203000000000000|t|00000003f200000000 +CURVEPOLYGON M EMPTY|01da07000000000000|t|00000007da00000000 +CURVEPOLYGON ZM EMPTY|01c20b000000000000|t|0000000bc200000000