[GRASS-dev] Output to Postgis Topology very slow

Rémi Cura remi.cura at gmail.com
Tue May 6 07:28:06 PDT 2014


Hello everybody,

I'm trying to track why converting from grass 7 vector to postgis topology
vector is so slow.
(http://trac.osgeo.org/postgis/ticket/2695), few sec to import it into
grass , few sec to build topology in grass,* several minutes to push
it*into PostGIS topology.


So far I found that the only sql function used by grass are
topology.createtopology
topology.addtopogeometrycolumn
topology.addnode
topology.addedge

I replaced the 2 last with empty function (returning 1) and that doesn't
change the execution time (meaning slowness comes from grass side).

My command lines executed on grass svn 7 on windows XP (server has latest
postgres postgis geos gdal on ubuntu 12.04 virtual box) are:

v.external.out dsn="PG:host=localhost dbname=test_grass port=5433
user=postgres password=yourguess" format=PostgreSQL
options="TOPOLOGY=yes,SCHEMA=test_route_utf8_4,TOPOSCHEMA_NAME=toposchema,TOPOGEOM_NAME=tg,TOPO_TOLERANCE=0.1,TOPO_GEO_ONLY=NO,SIMPLE_FEATURE=NO"

time v.in.ogr dsn="....myshapefile.shp"
-t output=test --overwrite

_1. Can somebody please confirm that grass is building the topology on the
vector layer *before* exporting it? (it seems to also build a topolgy *after
*export)

_2. I am under the impression that the conversion is slow because many
queries are getting fired instead of few big ones. Is there any way to get
tables in postgis with exact grass topology data (*point,line,called
nodes,boundary,centroid,area,face*) to test batch conversion?

Thank you for your time,

Cheers,
Rémi-C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140506/2dbee84b/attachment.html>


More information about the grass-dev mailing list