[postgis-users] Intersection errors

Sean M. Montague smontague at ATSDenver.com
Tue Jun 7 15:18:20 PDT 2005


Oh my brain!  So many if statements.  I have successfully rewritten my
script so that it correctly inputs MULTIPOLYGONS and distinguishes
between holes and other polys.  This also seems to have corrected my
intersection problem, although I will test more robustly tomorrow.
Thank you for everyone's help.

Sean

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Markus Schaber
Sent: Tuesday, June 07, 2005 2:02 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Intersection errors

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

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list