[geos-devel] Area building (was: Geometry/Rectangle Intersection: line touching rectangle)
Sandro Santilli
strk at keybit.net
Fri Sep 12 01:07:03 PDT 2014
On Fri, Sep 12, 2014 at 06:57:43AM +0300, Mika Heiskanen wrote:
> On 09/12/2014 03:23 AM, Martin Davis wrote:
> >
> >I agree that having a built-in way to extract only the outer polygons
> >from a polygonized dataset would be useful.
>
> I was then informed of PostGIS BuildArea
> function. The function does a final overlay operation, which I
> thought we would not need. I then offered our a bit different
> solution, but there was no interest then:
>
> http://lists.osgeo.org/pipermail/geos-devel/2014-March/006831.html
Personally I hadn't shown interest because the postgis algorithm was
recently (greatly) improved, enough to be happy about it.
Also, you hadn't shown performance comparison in that mail, so taking
it in consideration would have required me to do so myself, that is
port the code to PostGIS, test it against the existing testsuite,
check performance. Too much work for unknown benefit.
Following latest changes in PostGIS your code could possibly
speedup the "findFaceHoles", but it'd need to be profiled against
a set of tests to really tell. There's also a TODO in the "findFacesHole"
function suggesting further speedups.
The final overlay (self-union) was needed to allow building an area
from a linework like this:
+---+---+
| | |
+---+---+
It might indeed be useful to make the self-union optional for cases in
which it is known in advance that the above case would never happen.
I hope the C++ code you wrote can be useful to Martin for eventually
embedding it as an optional feature of the Polygonizer class.
--strk;
() ASCII ribbon campaign -- Keep it simple !
/\ http://strk.keybit.net/rants/ascii_mails.txt
More information about the geos-devel
mailing list