[pgrouting-users] Distance matrix using road network

Hi all,

I’m new with pgrouting/postgresql and I would need some detailed instructions making distance matrix using road network. Can you lead me to a good source or give some instructions here to get started?

Thanks in advance! I have mac and I’d like to use pgrouting via QGIS or grass.

Laura

On 7/24/2013 2:19 PM, Laura Kauria wrote:

Hi all,

I'm new with pgrouting/postgresql and I would need some detailed
instructions making distance matrix using road network. Can you lead me
to a good source or give some instructions here to get started?

Thanks in advance! I have mac and I'd like to use pgrouting via QGIS or
grass.

Hi Laura,

I will outline the process below, but you should read the docs for the details on how to do the steps:

Say you have ten locations the you want to build a distance matrix for:

1. map you locations to the nearest edge nearest end node
2. for each node call pgr_kdijkstra() with the node as source and the remainder of nodes as targets.
3. place the values in real8 array
4. adjust the array to be symmetric ie: a[i,j] == a[j,i] (we only support symmetric TSP
5. call pgr_tsp(a, start_id [, end_id])

I have no idea how you would do this from QGIS or grass.

Hope this helps,
   -Steve

Thanks, Steve! I need to start first with something easier, since I see lots of gaps with my skills and this tool(/general pgrouting). I try to figure out it first in grass and if it goes fine, then pgrouting. Cheers, Laura

···

2013/7/24 Stephen Woodbridge <woodbri@swoodbridge.com>

On 7/24/2013 2:19 PM, Laura Kauria wrote:

Hi all,

I’m new with pgrouting/postgresql and I would need some detailed
instructions making distance matrix using road network. Can you lead me
to a good source or give some instructions here to get started?

Thanks in advance! I have mac and I’d like to use pgrouting via QGIS or
grass.

Hi Laura,

I will outline the process below, but you should read the docs for the details on how to do the steps:

Say you have ten locations the you want to build a distance matrix for:

  1. map you locations to the nearest edge nearest end node
  2. for each node call pgr_kdijkstra() with the node as source and the remainder of nodes as targets.
  3. place the values in real8 array
  4. adjust the array to be symmetric ie: a[i,j] == a[j,i] (we only support symmetric TSP
  5. call pgr_tsp(a, start_id [, end_id])

I have no idea how you would do this from QGIS or grass.

Hope this helps,
-Steve


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users