[postgis-users] Re: Cascaded Union Aggregate function

Jose Carlos Martinez Llario jomarlla at cgf.upv.es
Wed Oct 8 02:05:38 PDT 2008


Hi,

I want to tell you about the work i did a couple of years ago about the 
same topics with the hope it can help you.
I tried to improve the union operator to be able to carry out the 
'dissolve spatial operation'. Im a cartographer and I noticed that we 
can not use PostGIS in a direct way for dissolving a layer with 10.000 
geometries or more because it takes a long time and it needs a lot of 
resources for working.

I wrote a paper (sorry about the english...) explaining the work i did 
(unfortunately i need to write papers because of my job...i hate that of 
course).
In the introduction of the article  i did some test about cascade union. 
I got around 10 times faster results with the cascade union.
In the second part i proposed an algorithm to dissolve just the adjacent 
polygons. For example in a cadastral dataset starting from parcels to 
get lots boundaries. I got around 100 times faster. In total around 1000 
times faster than just using the union aggregate with the whole dataset.

In the article a test removed the shared boundaries in a layer with 500 
000 polygons. It took around 1000 secs in a kind of old computer.

  Geometries                        The whole aggregate    Cascade (i 
called it 'fragmented')      Just adjacent polygons
 Real case
   10 000                                    1 600 
s                                 around 100 
s                                     < 15 s
   30 000                                 i couldnt test 
it                         around 1000 s                             
around  50 s

Cadastral simulation (lots with 10 parcels)
  80 000 parcels                             i couldnt test it           
                   around 5000 s                             around 100 s
500 000 parcels                             i couldnt test it           
                  i couldnt test it                              around 
1000 s


Look in the article because the datasets have special geometry 
configuration.

I think the union operation can be really fast in a system with 
persistent topology. Im looking forward to try this with the current 
implementation of topology in PostGIS. I would like to know if someone 
is checking or implementing these kind of operations in PostGIs using 
topology.

I hope it can be useful for the PostGIS community,
The link of the article is:
http://cartosig.upv.es/es/system/files/jomarlla/article-martinez-llario-2.pdf

Cheers,
José Carlos





More information about the postgis-users mailing list