data (#23) - Adapt my datas with pgRouting (#375) - Message List

Adapt my datas with pgRouting

Hello everyone,

It seems pgRounting need this king of table : CREATE TABLE newbridge (

gid integer, the_geom geometry, source integer, target integer, length double precision, x1 double precision, y1 double precision, x2 double precision, y2 double precision,

);

I think that it's a table of ways where - gid is the identifier of the way - the_geom a postgis linestring - source ? the identifier of the start waypoint ? - target ? the identifier of the end waypoint ? - length : the length of the way (used à cost in the example I used) - x1 ? The x of the start waypoint ? - y1 ? The y of the start waypoint ? - x2 ? The x of the end waypoint ? - y2 ? The y of the end waypoint ?

I need to know because I have to make a view from my datas to be used by pgRouting.

Thank you very much,

Aurélien

  • Message #1603

    Hi Aurelien,

    Have you tried the workshop/tutorial?
    It explains which attributes your data requires for which shortest path function. If your column name is not the same as the function expects you can either use "ALIAS" or give it the right name in your view.

    If your data doesn't contain information about network topology (relations of your network like source, target and cost) you need to use assign_vertex_id function to build the topology. You will find this all explained in the tutorials.