[postgis-users] converting multipolygon to polygon

Helge Jensen hej at actua.dk
Mon Nov 16 00:07:41 PST 2009


I just wanna inject a comment about performance here.

Using GeometryN (or ST_GeometryN) incurs a significant penalty, especially
in terms of memory when i was using it. ST_Dump performs *much* better.

>From searches on the internet i concluded that the standard way that
geometries are passed between functions by-value. So invoking GeometryN N
times becomes rather expensive for large geometries.

ST_Dump returns an array of information from which you can easily extract
the parts:

  SELECT dump.geom FROM ST_Dump(orig_geom) as dump;

-- 
Helge Jensen
Partner & Senior Software Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091116/1292151f/attachment.html>


More information about the postgis-users mailing list