Boost logo

Geometry :

Subject: Re: [geometry] duplicate points in polygon
From: Volker Schöch (vschoech_at_[hidden])
Date: 2013-07-05 12:15:35


Hi Barend,
Thank you very much for your detailed reply.

> In the output duplicate points are skipped too. Even if the input does not contain duplicate points, the raw output might in some configurations contain duplicate points, and they are explicitly skipped (however, this is not checked). This is done in a later phase of the library, at first they were just included.

Not sure what exactly that means. So, when I call, e.g., boost::geometry::difference(poly1, poly2, polyOut) - can any assumptions be made about the presence of duplicate points in polyOut?

> You can use boost::geometry::unique(polygon). But this is not required, the algorithms we provide should handle them correctly. However it is always possible that you at one time need to get rid of them yourself.

Follow-up question: In case of an open (implicitly closed) representation, does boost::geometry::unique(polygon) remove the last point if it is equal to the first? Why (not)?

Regards
   Volker

--
Volker Schöch | vschoech_at_[hidden]<mailto:vschoech_at_[hidden]>
Senior Software Engineer
________________________________
think-cell Software GmbH        http://www.think-cell.com>
Chausseestr. 8/E        phone / fax     +49 30 666473-10 / -19
10115 Berlin, Germany   US phone / fax  +1 800 891 8091 / +1 212 504 3039
Amtsgericht Berlin-Charlottenburg, HRB 85229 | European Union VAT Id DE813474306
Directors: Dr. Markus Hannebauer, Dr. Arno Schödl


Geometry list run by mateusz at loskot.net