[pgrouting-users] Re[2]: How to populate already existing "road_noded_vertices_pgr" table?

Thanks Daniel

Now I add new data in the network through QGIS (GRASS feature v.clean creates the segments from roads perfectly) and the DB trigger keeps the “road_noded” and “road_noded_vertices_pgr” tables duly.


Mon, 25 Aug 2014 11:53:08 +0200 от Daniel Kastl daniel@georepublic.de:

On Mon, Aug 25, 2014 at 11:00 AM, Vladimir fl_v@inbox.ru wrote:

Hi All

I have a road network with appending a new segments sometimes.

Then I copy the new segments into my “road_noded” table and execute

SELECT pgr_createTopology(‘roads_noded’, 0.1, ‘geom’, ‘id’,rows_where:=‘id > a last id’)

for affecting on the new segments only. But this action recreates my “road_noded_vertices_pgr” table completely for the new segments instead of appending the new vertices and referencing them to the new segments.

  1. Is pgr_createTopology only for create not for update? Somebody knows other method or some trick?

Yes, this function does not do updates.
If you add or modify roads later, and if you don’t want to keep old node ID’s, then you can’t use this function.

  1. Could I use native Postgis functions (ST_StartPoint,ST_EndPoint etc) in the event if no possibility?

I don’t understand what you mean with “event”, but yes, you can use any PostGIS function to handle the updates. You could for example a trigger function.


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.info