[Qgis-user] network building tool

Vincent Picavet vincent.ml at oslandia.com
Wed Nov 20 15:17:55 PST 2013


Hello again.

Le mercredi 20 novembre 2013 23:32:59, Vincent Picavet a écrit :
> Here is a PostGIS example of creating the edge geometry given to/from nodes
> : https://gist.github.com/vpicavet/7572293
> 
> > These could then slightly adjusted manually be adding more vertices or
> > alike. But the procedure would easy up the effort of building the
> > network. And in the ideal case, it would also take care of updating the
> > lines if a node is shifted on the map.
> > (Similar to a "connector" line in an Openoffice Impress drawing)
> 
> We could add triggers to this example so that the edge line is recreated
> every time a to or from node is updated. So you would just have to edit
> the node table to have a coherent network.

I updated the gist to add triggers which automatically update the edges 
geometries. 
If you want some non-linear connections between nodes, it is the same 
mechanism, but you would use your own function to create the geometry instead 
of using st_makeline (something like ST_makeDiscreteBezierCurve(..) )
Enjoy.

Vincent



More information about the Qgis-user mailing list