|
Geometry : |
Subject: Re: [geometry] TR: dissolve and correct
From: Barend Gehrels (barend_at_[hidden])
Date: 2014-05-18 12:28:14
Hi Yohann,
yohann.benedic_at_[hidden] wrote On 15-5-2014 11:50:
> Hi everyone,
>
> Any comment on my message below?
>
> Thank you.
>
> Yohann Bénédic wrote
>> Hi again,
>>
>> I am successfully compiling dissolve in the release branch thanks to Adam and Barend's support.
>> Now comes the question about its recommended usage.
>>
>> Before I realized my polygon database contained self-intersecting polygons, I use to call the correct algorithm after each geometry::polygon was built to make sure it met boost::geometry standards (clockwise and duplicate ending points).
>> What am I supposed to do now that some of my input polygons are self-intersecting : for them, clockwise or anticlockwise doesn't make sense, so I guess I should skip the call to correct, manually duplicate the endpoints and proceed directly with the dissolve algorithm.
>> Should I then call correct on the result to fix Clockwise issue or is dissolve taking care of that for me?
You may assume that dissolve results polygons in the right order, and
that they are closed if the polygon-model is closed. So yes, you can
skip the call to correct both before and after calling dissolve.
Dissolve is, or should be, what some other software calls "make_valid".
As you know dissolve is an extension and not released yet. I fixed a
small compiler issue due to recent changes, and did some more checks.
One of my tests produced a difference between clockwise and counter
clockwise polygons, this is still a bug an the result is still invalid,
it has to be fixed. But the produced orientation should be clockwise
(for clockwise polygons). But if you encounter problems before, it might
still help if you call correct before, in this phase.
Regards, Barend
Geometry list run by mateusz at loskot.net