[postgis-users] bow-tie polygons and the like
Nicolas Ribot
nicky666 at gmail.com
Tue Apr 1 01:39:22 PDT 2008
> Good people;
>
> I have this odd problem that I hope others may clarify for me.
>
> I have a big ArcInfo polygon coverage produced by a sequence of spatial
> unions. One of the component polygon coverages was brutalized somewhere
> along the way and it has some polygons with triangular and bow-tie
> inclusions.
>
> Nevertheless, the coverage is clean and sober as far as ArcInfo is
> concerned.
>
> If you all can picture in your minds a bow-tie polygon |><| where the
> rightmost | of the bowtie is actually the edge of an enclosing polygon, kind
> of like:
>
> |
> |><|
> |
>
> (I sure hope that works out visually...)
>
> OK, when I use ogr2ogr to import this coverage into postgis 1.3.1 /
> geos-3.0.0rc4, I see the following:
>
>
>
> the containing polygon fails at st_isValid()
> the st_area() of the containing polygon appears to include the area of the
> bow-tie polygon, ie it is larger than the area copied over from the ArcInfo
> coverage by about the same amount as the area of the bow-tie polygon When I
> look at this little mess with OpenJump, sure enough the QA routines find the
> bow-tie and complain.
>
> The long and the short of this is that PostGIS returns slightly more area
> than ArcInfo does for the same big ugly polygon coverage, because of the
> apparent loss of these bow ties.
>
> What I'm not sure about is what exactly is wrong here. Is the bow-tie
> shape itself illegal? Or is it the fact that both sides of the bow-tie
> belong to the same polygon? Or something else I'm missing?
>
> Thanks for any light anyone can shed on this.
>
>
Hi,
I will only give a partial answer:
yes, a bowtie polygon is invalid for PostGIS (as stated in the OGC
SFSQL documentation, polygon's boundary cannot cross itself).
If you want to represent this with valid polygons, you will need 2
triangles touching at one point.
HTH
nicolas
More information about the postgis-users
mailing list