<div dir="ltr"><div><div><div><div><div><div><div><div>This is suprising indeed.<br></div>Im my test using the v.out.postgis was still way faster than constructing with postgis topology (about x3 I think).<br><br></div><div>Are you using v.out.postgis -l, with grass 7?<br><br></div><div><br></div>Grass is a topology that is more node centered, opposite to postgis topology which is more edge centered.<br></div>It is possible to output a node centered topology with grass as text (<em><b><a href="http://v.info">v.info</a> -t</b></em>), <br></div>but I found it unpractical to try to convert this into a propoer postgis topology with pure SQL.<br></div>Now I think I should have used a python way from within grass (grass offers full binding, so it should be doable to loop trough grass internal topology and convert it to postgis topology)<br><br></div>I tried to reach grass dev several time to try to improve the postgis export, I had no answer.<br><br></div>My intuition is that the slowness comes from the fact that grass tries to write  edge by edge , and each time the edge_data trigger are triggered.<br></div>The correct way would be to compute full topology structure, then deactivate trigger, then fill table , then reactivate trigger.<br><div><div><div><br>Cheers,<br>Rémi-C<br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-18 19:48 GMT+01:00 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Nov 12, 2014 at 10:51:34AM +0100, Rémi Cura wrote:<br>
> Note you could have directly exported into postgis topology, which is slow<br>
> but very convenient (stil faster than postgis topology conversion).<br>
> I'm not a grass user,<br>
> from what I understood you have to use the "-l" switch in the command "<br>
</span>> *v.out.postgis*"<br>
<br>
I'm trying this out today, and indeed is very slow, much slower than<br>
building the topology, which is surprising to me.<br>
<br>
A look at database activity shows that the command (v.out.postgis -l)<br>
is writing _simple_ features in the output layer.  Do you have an idea<br>
about how to skip that part ? (TopoGeometry would be enough for PostGIS<br>
to reconstruct the SFS on demand).<br>
<br>
--strk;<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>