<div dir="ltr">Hey,<div>addlinestring is topology.topogeo_addlinestring(atopology character varying, aline geometry, tolerance double precision DEFAULT 0).</div><div>My version : POSTGIS="2.2.0dev r12325" GEOS="3.5.0dev-CAPI-1.9.0 r3963" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.11dev, released 2013/04/13" LIBXML="2.8.0" TOPOLOGY RASTER</div>
<div>PostgreSQL 9.3.3 on i686-pc-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 32-bit<br></div><div><br></div><div><br></div><div>About your idea, </div><div>it was our first intend, hence the test with manually using "topology.addnode(atopology character varying, apoint geometry)",</div>
<div>then manually adding the line : topology.st_addedgemodface(atopology character varying, anode integer, anothernode integer, acurve geometry).<br>In an ideal world we would have then used polygonize, but as you said there is no way to build only adjacency without faces.</div>
<div> </div><div><br></div><div>In my test , adding points and generating the table for line insertion was 10 sec, the other 70 sec being for line insertion.</div><div><br></div><div>I don't understand your last question, do you mean just fill the table manually without computing adjacencies?</div>
<div><br></div><div>Cheers,</div><div>Rémi-C</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-19 19:08 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"><div class="HOEnZb"><div class="h5">On Wed, Mar 19, 2014 at 06:43:21PM +0100, Rémi Cura wrote:<br>
> Hey,<br>
><br>
> We tried several way to load an already topologically correct shapefile<br>
> into postgis topology .<br>
><br>
> 10k lines loaded<br>
> _Using totopogeom : 750 sec<br>
> _Using addlinestring : 246 sec<br>
> _Manually using addnode and st_addedgemodface : 86 sec.<br>
><br>
> Still very slow  :-/<br>
><br>
> Considering manually filling table /and/or using GEOS/or using grass loader.<br>
<br>
</div></div>Interesting numbers, thanks.<br>
By "addlinestring" you mean TopoGeo_addLinestring ?<br>
Is this with postgis trunk ?<br>
<br>
Note that ST_AddEdgeModFace (called by TopoGeo_addLinestring)<br>
still performs checks to verify the line you add does not<br>
cross othe redges. There's currently no API exposed for simply<br>
adding the linking attributes (face left/right and next edges).<br>
<br>
I was thinking that one idea could be to manually insert all<br>
the nodes and edges and then have a function to "polygonize"<br>
the supposedly pre-noded resultance set. This would be pretty<br>
much the same model used by GEOSPolygonize (requires pre-noded<br>
input) and would probably be faster for batch constructions.<br>
<br>
To complete the picture, how long does it take to simply insert<br>
all your lines as edges ? So we get a feeling of IO and referential<br>
integrity checks cost...<br>
<br>
--strk;<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>
</blockquote></div><br></div>