[postgis-devel] LWGEOM: collection type

strk at refractions.net strk at refractions.net
Tue Aug 24 03:26:57 PDT 2004


LWGEOM stores nested collection types w/out flatting them.
This means that:
	GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(0 0), POINT(1 1))
... is a collection of 1 element ( a collection ).

OGC functions like NumPoints(), NumRings(), ExteriorRing() are
described as working on the *first* appropriate element found in
a collection. Now my question is:

1) What's the *first* polygon in this geometry:

GEOMETRYCOLLECTION(
	GEOMETRYCOLLECTION(
		POLYGON A,
		POLYGON B
	),
	POLYGON C
)

Is it 'A' or 'C' ??

Also, does OGC allows this format ? 

--strk;



More information about the postgis-devel mailing list