[postgis-users] [OT] Multipolygon WKT format

Frank Warmerdam warmerdam at pobox.com
Fri Mar 31 07:32:48 PST 2006


Jeremy Nix wrote:
> This is a question more about the opengis standards, then postgis, but 
> I'm assuming someone here has a quick/simple answer for this.  I am 
> trying to figure out what the correct syntax is for formulating a 
> multipolygon in WKT format.  The majority of my confusion is coming in 
> the form of the parenthesis.  For instance, what is the difference (if 
> any) between the 2 representations below?
>  
> //geometries have been simplified
> MULTIPOLYGON(((0 1, 1, 2, 1 1, 0 1),(3 4, 4 5, 4 4, 3 4)))
>     AND
> MULTIPOLYGON(((0 1, 1, 2, 1 1, 0 1)),((3 4, 4 5, 4 4, 3 4)))

Jeremy,

I believe the first is a multipolygon with one polygon and that
polygon has one outer ring and one hole.   This is clearly an
invalid polygon since the inner ring isn't actually geometrically
inside the outer ring with the above coordinates.

The second is a multipolygon consisting of two polygons with just
an outer ring and no inner rings.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org




More information about the postgis-users mailing list