schabi at logix-tt.com
Tue Oct 25 05:10:40 PDT 2005
Lars Rößiger wrote:
> MULTIPOLYGON((( [...] ),( [...] ))))
> But this doesn't work the way it used to? It returns the exact same data
> as shown above except that it reads 'POLYGON' instead of 'MULTIPOLYGON'.
> What do I do wrong? Is this correct behaviour of GeometryN?
Yes, it is, because you have a Multipolygon that contains a single
Polygon with several Rings.
This is how the OpenGIS geometry model works. A Polygon has exactly one
outer ring, and none to several non-overlapping inner rings (holes). A
Multipolygon then contains one or several such polygons.
You can also see this at the level of ()s, your Polygon should have two
(( ))s around everything, while the Multipolygon has three ((( )))s.
This should illustrate the following thing:
MULTIPOLYGON( ( (...),(...),(...) ) , ( (...),(...),(...) ) )
Rings: outer inner inner outer inner inner
Polygon: |-- first ----------| |-- second ---------|
POLYGON( (...),(...),(...) )
Rings: outer inner inner
More information about the postgis-users