[postgis-users] Intersection errors

Markus Schaber schabi at logix-tt.com
Tue Jun 7 13:02:26 PDT 2005


Hi, Sean,

Sean M. Montague schrieb:
> I've been working on it, and I now realize the problem...not sure if it
> will solve my intersect problem, but I'll get to that later.  There is a
> logical reason for dissolving some of layers, such as lakes at certain
> scales.  If they are multi polys, there is a significant size savings
> when writing out as SVG.  I just need to see if I can distinguish
> between a hole, and say another lake.  Examining what you suggested
> looks like a good start.  Thanks.

Yes, it is easily possible. Maybe you should take a look at the Well
Known Text format specification from the OpenGIS consortium (Part of
their "Simple features for SQL" specification, or use the PostGIS source
or some other program that correctly exports WKT to find out how it works.

The basic idea for Multipolygon is:

MULTIPOLYGON(((First polygon outer ring),(1st poly first hole),(1st poly
2nd hole)),((2nd Poly outer ring)(2nd Poly hole)),((3rd Poly with no
hole)),((4th Poly outer ring)(4th poly 1st hole)(4th poly 2nd hole)))

All holes (inner rings) have to be completely inside their outer ring,
and may not overlap each other. A polygon may be contained completely
inside the hole of another polygon (like an island), but they may not
overlap.

For the exact rules how the inner and outer rings may touch and
intersect, please see geometry model part of the aforementioned
specification.

HTH,
Markus




More information about the postgis-users mailing list