[GRASS-dev] Grass to postgis topology export performance

Rémi Cura remi.cura at gmail.com
Tue Apr 1 02:43:58 PDT 2014


Hello everybody,
I'm an active user of Postgis and postgis topology.
Currently Postgis topology is slow,
so I did a benchmark of other available options (see at the end).

Grass GIS is very fast to construct a topology over vectors (5 secs), and
then surprisingly slow in exporting this model to Postgis topology (145
sec).

Is there a perticular reason for this? I tried to read the code, but
couldn't get to the sql querries.

Also, in a more prospective way, could Grass import from geometry
(shapefile for example) then export to postgis topology be isolated (into
an exe or a lib?).

Many Thanks,
Cheers,
Rémi-C


Here is a little comparison :
(32k polylines,21k unique points,  already 'topological'( no need to cut
the lines) ,with a lot of attributes)

Postgis Topology
Postgis Topology (addtopogeom) : 700+ sec for 10k lines, (??about 1600 sec
for 32k lines??)
Postgis Topology (addlinestring) : 240+ sec for 10k lines,  (??about 780
sec for 32k lines??)
Postgis Topology (addnode, addedge) : 80sec for 10 k lines (??about 260sec
for 32k lines??)

Grass Gis 7 :
Importing everything : 10 sec
Importing only geom (no attributes) : 5 sec

Importing everything then Exporting all topologies to postgis topology :
150 sec
Declare postgis topo as external source and fill it with shapefile : 145 sec

Geos : (upper bound measured trough st_polygonize)
ST_Polygonize on everything (aggregates on 32k lines) : about 5 sec

TopoJSON (according to previous thread : postgis topology/60 )
Importing geometry (extrapolated) : about 30 sec?

CGAL (half edge, exact kernel) :
4 sec in batch mode (inserting all lines at once)
40min in line by line insertion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140401/5bbd0167/attachment.html>


More information about the grass-dev mailing list