<div dir="ltr"><div><div><div><div><div><div><div><div>Hello everybody,<br></div>I'm an active user of Postgis and postgis topology.<br></div>Currently Postgis topology is slow,<br></div>so I did a benchmark of other available options (see at the end).<br>
<br></div>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).<br><br></div>Is there a perticular reason for this? I tried to read the code, but couldn't get to the sql querries. <br>
<br></div>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?).<br><br></div>Many Thanks,<br></div>Cheers,<br>Rémi-C<br>
<div><div><div><div><div><div><br><br>Here is a little comparison :<br>(32k polylines,21k unique points, already 'topological'( no need to cut the lines) ,with a lot of attributes)<br>
<br>Postgis Topology<br><div style="margin-left:40px">Postgis Topology (addtopogeom) : 700+ sec for 10k lines, (??about 1600 sec for 32k lines??)<br>
Postgis Topology (addlinestring) : 240+ sec for 10k lines, (??about 780 sec for 32k lines??)<br></div><div style="margin-left:40px">Postgis Topology (addnode, addedge) : 80sec for 10 k lines (??about 260sec for 32k lines??)<br>
<br></div>Grass Gis 7 :<br><div style="margin-left:40px">Importing everything : 10 sec<br></div><div style="margin-left:40px">Importing only geom (no attributes) : 5 sec<br></div><div style="margin-left:40px"><br>Importing everything then Exporting all topologies to postgis topology : 150 sec<br>
</div><div style="margin-left:40px">Declare postgis topo as external source and fill it with shapefile : 145 sec<br></div><div style="margin-left:40px"><br></div>Geos : (upper bound measured trough st_polygonize)<br>
<div style="margin-left:40px">ST_Polygonize on everything (aggregates on 32k lines) : about 5 sec<br><br></div>TopoJSON (according to previous thread : postgis topology/60 )<br><div style="margin-left:40px">Importing geometry (extrapolated) : about 30 sec?<br>
</div><div style="margin-left:40px"><br></div>CGAL (half edge, exact kernel) :<br><div style="margin-left:40px">4 sec in batch mode (inserting all lines at once)<br></div><div style="margin-left:40px">40min in line by line insertion<br>
<br><br></div></div></div></div></div></div></div></div>