Boost logo

Geometry :

Subject: [ggl] Within polygon detection including the polygon borders
From: Barend Gehrels (Barend.Gehrels)
Date: 2009-09-21 11:10:51


Hi Ivan,

>
>
> So, what is the correct way to define the points? Anti-clockwise,
> starting in the lower left point?
Note that it was not the *clockwise* *order* which was not correct, but
the points were ordered wrong (hard to explain).
Because you're calling "correct", you can enter them in any order. If
not, you have to enter them in clockwise order.
Lower-left is not relevant here, you can also start with upperright and
in polygons with more than 4 points this is actually hard to define. You
can start anywhere.

>
>
>
> >
> > Therefore the centroid point also gives a strange value (0, 1e+006).
>
>
> Yes, this happens when the points are defined in the other sense. Is
> there a way to test for ill defined points or point insertion order?
So it probably does not happen if the points are clockwise or
anti-clockwise, but it happens if points are in orders like 1,3,2,4. It
then gets a self-intersection and indeed, a function to test that is
valid, is required for OGC compliance, but is not yet implemented...

>
>
> >
> > 2) In the library (preview 4): the results are still wrong
> indeed, using
> > preview 4. Using the head (hosted at Geodan SVN) it is OK. The
> code in
> > preview4 didn't handle points on segments correctly, this was
> solved in the
> > meantime. So I updated preview 4, hosted at Boost SVN, with the
> new code and
> > it is OK now.
>
>
>
> Yes, I've just downloaded the svn version, and it's working.
You mean the Boost.SVN version?
>
>
> >
> > Ivan, note that you can also have SVN access to the Geodan SVN,
> you're
> > working then with the newest versions, up for Boost preview or
> review next
> > month, if this is feasable.
>
>
> I will follow now the svn version.
>
>
> Thank you very much.
No problem, you're welcome

Regards, Barend

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20090921/74fa0a8e/attachment.html


Geometry list run by mateusz at loskot.net