]> granicus.if.org Git - postgis/commitdiff
Implement lwgeom_same for COMPOUNDCURVE (#1475)
authorSandro Santilli <strk@keybit.net>
Mon, 16 Jan 2012 10:18:07 +0000 (10:18 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 16 Jan 2012 10:18:07 +0000 (10:18 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8829 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeom.c
regress/wkb.sql
regress/wkb_expected

index b5d0a6e4feb074a67e7ad981832abecfa7e93d90..00fb580e3f134369cb20f387f72c3172b3f7dc7c 100644 (file)
@@ -516,6 +516,7 @@ lwgeom_same(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2)
        case MULTIPOINTTYPE:
        case MULTILINETYPE:
        case MULTIPOLYGONTYPE:
+       case COMPOUNDTYPE:
        case POLYHEDRALSURFACETYPE:
        case TINTYPE:
        case COLLECTIONTYPE:
index 1057f26b37e7c8800342e807c944afef50d5a43f..428552cfb07264e6672c4eba59c5c70327046834 100644 (file)
@@ -303,3 +303,26 @@ select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'),
           encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT
  'CIRCULARSTRING ZM EMPTY'
 ::text as g ) as foo;
+
+-- COMPOUNDCURVE
+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
+ 'COMPOUNDCURVE 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
+ 'COMPOUNDCURVE 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
+ 'COMPOUNDCURVE 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
+ 'COMPOUNDCURVE ZM EMPTY'
+::text as g ) as foo;
+
index 9da5ab8a5edaf31c040c06fe35d890df46c34cba..ef3d21b1274582e256cb98be800ff04236f076b0 100644 (file)
@@ -56,3 +56,7 @@ CIRCULARSTRING EMPTY|010800000000000000|t|000000000800000000
 CIRCULARSTRING Z EMPTY|01f003000000000000|t|00000003f000000000
 CIRCULARSTRING M EMPTY|01d807000000000000|t|00000007d800000000
 CIRCULARSTRING ZM EMPTY|01c00b000000000000|t|0000000bc000000000
+COMPOUNDCURVE EMPTY|010900000000000000|t|000000000900000000
+COMPOUNDCURVE Z EMPTY|01f103000000000000|t|00000003f100000000
+COMPOUNDCURVE M EMPTY|01d907000000000000|t|00000007d900000000
+COMPOUNDCURVE ZM EMPTY|01c10b000000000000|t|0000000bc100000000