[postgis-users] geomunion revisited....

Martin Davis mbdavis at refractions.net
Wed Nov 14 11:52:58 PST 2007


Dylan,

To get CascadedUnion into PostGIS will require some work to get the JTS 
algorithm ported to GEOS, and then exposed in PostGIS (probably via an 
enhancement to the existing geomunion function).

We're keen on doing this, but at the moment have to schedule it behind 
some other more pressing projects.  As usual, our priorities could be 
refocussed by the availability of  funding... 8^)

As for GRASS, I have no idea.  The code will appear shortly in JTS 1.9 - 
perhaps the maintainer of the GRASS vector code could use this.

Martin

Dylan Beaudette wrote:
> On Nov 14, 2007 9:48 AM, Martin Davis <mbdavis at refractions.net> wrote:
>   
>> Lee,
>>
>> Having done some more investigation, I can say that your dataset is a
>> poster child for the use of Cascaded Union.  This is because it contains
>> relatively simple geometries with a very high degree of overlap.
>> Cascaded Union has the effect of quickly merging and discarding linework
>> which doesn't appear in the final result.  This makes each individual
>> union operation fairly performant.
>>
>> In JTS-land my results were:
>>
>> Cascaded Union: 20 sec
>> Iterated Union: 3 h 40 min !  (This is equivalent to the PostGIS
>> geomunion aggregate)
>>
>> I realize this doesn't help directly with your work, but it is a good
>> example of why it would be nice to have CascadedUnion functionality in
>> PostGIS.
>>
>> I can also see why buffer was struggling with this data.  It has to deal
>> with all the linework in the dataset at once, and with that many
>> overlapping lines it is simply overwhelmed.   Using buffer() is a hack
>> to get around the lack of true CascadedUnion.  It works in many cases,
>> but does have its limits.
>>
>> Martin
>>
>>     
> *Apologies for the cross-posting*
>
> This is highly relevant to some of the work that I do on a regular
> basis with soil survey data. Dealing with thousands of polygons which
> share a common attribute is usually a nice time to GeomUnion them
> together. I have only been successful at working with rather small
> geometry collections, and something like CascadedUnion sounds
> fantastic. What would it take to get this implemented in PostGIS ? It
> might also be worth having in GRASS as well.
>
> Cheers,
>
> Dylan
>
>   
>


-- 
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022




More information about the postgis-users mailing list