[geos-devel] Area building (was: Geometry/Rectangle Intersection: line touching rectangle)

Mika Heiskanen mika.heiskanen at fmi.fi
Fri Sep 12 02:36:30 PDT 2014

On 09/12/2014 11:07 AM, Sandro Santilli wrote:
> 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.

True, I never tested the code for speed. The extra overlay was the
killer for us.

> 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.

That could provide a great speedup for complex geometries.


Mika Heiskanen / Finnish Meteorological Institute

More information about the geos-devel mailing list