[postgis-users] ST_Dump-like function for simple (non-multi) geometries ?

Maxime van Noppen maxime at altribe.org
Wed Aug 5 05:47:59 PDT 2009


On 08/04/09 17:39, Kevin Neufeld wrote:
> Nice.  I posted your function to the trac ticket for this function.
> (http://trac.osgeo.org/postgis/ticket/76)
> 
> I am a little concerned about scalability, but we'll see what the team
> thinks.
> 
> Good work.

Thanks. However Robe (cf ticket) and you are right, there is a
scalability issue. For the sake of the test I've implemented the ST_Dump
function in plpgsql with a recursive call (as my_ST_DumpPoints is) and
in some very bad cases it's very slow. For example I've tested to dump a
geometry containing 100 nested GEOMETRYCOLLECTION containing each 10
multipolygons. ST_Dump runs in 35ms whereas my_ST_Dump runs in 230ms
(sorry if I'm stating obvious things here, I'm quite new to the postgis
world).

On the same example (100 nested collections) my_ST_DumpPoints runs in
~2 seconds which is quite alot. I'll try to come up with a C version,
but it seems quite more complicated.

-- 
Maxime



More information about the postgis-users mailing list