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

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?

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

Please, help.
Thanks in advance
Vladimir

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.

2) 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.

Daniel

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