<div dir="ltr"><div><div><div><div><div><div><div><div>Hello everybody, <br></div><br>I'm trying to track why converting from grass 7 vector to postgis topology vector is so slow.<br>(<a href="http://trac.osgeo.org/postgis/ticket/2695">http://trac.osgeo.org/postgis/ticket/2695</a>), few sec to import it into grass , few sec to build topology in grass,<b> several minutes to push it</b> into PostGIS topology.<br>
<br><br></div>So far I found that the only sql function used by grass are<br></div><div style="margin-left:40px">topology.createtopology<br>topology.addtopogeometrycolumn<br>topology.addnode<br>topology.addedge<br></div></div>
</div><br></div>I replaced the 2 last with empty function (returning 1) and that doesn't change the execution time (meaning slowness comes from grass side).<br></div><br></div>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: <br>
<br><div style="margin-left:40px">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"<br>
<br>time v.in.ogr dsn="....myshapefile.shp"<br>-t output=test --overwrite<br></div><div><div><div><div><div><div><div><br></div><div>_1. Can somebody please confirm that grass is building the topology on the vector layer <b>before</b> exporting it? (it seems to also build a topolgy <b>after </b>export)<br>
<br></div><div>_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 (<i>point,line,called nodes,boundary,centroid,area,face</i>) to test batch conversion?<br>
</div><div><br></div><div>Thank you for your time,<br><br>Cheers,<br>RĂ©mi-C<br></div><div><br></div></div></div></div></div></div></div></div>