[pgrouting-users] Calculating the shortest way between pairs

Hi everybody,

I have a table with about lets say 1.000 rows of pairs of origin/destination and a routable network table.

The origin/destination table (my_route) has a

  • pair_id
  • source (calculated nearest node from the network table)
  • target (also calculated from the network table)

Where do I have to start or what do I have to do to get the shortest path between these pairs?

Could anybody please help me to solve this?

Thanks
ch

Maybe to clearify.

I’ve got the following two tables:

Table at_2po_4pgr with the columns:

id integer NOT NULL,
osm_id bigint,
osm_name character varying,
osm_meta character varying,
osm_source_id bigint,
osm_target_id bigint,
clazz integer,
flags integer,
source integer,
target integer,
km double precision,
kmh integer,
cost2 double precision,
reverse_cost double precision,
x1 double precision,
y1 double precision,
x2 double precision,
y2 double precision,
geom_way geometry(LineString,4326)

and Table routing_pair with the columns:

id integer,
h_key integer,
lat_htl double precision,
lon_htl double precision,
source integer,
geom_htl geometry(Point,4326),
lat_bhf double precision,
lon_bhf double precision,
target integer,
geom_bhf geometry(Point,4326)

The routing_pair table hold three important information:
ID
SOURCE
TARGET

All columns are filled (source + target are calculated from at_2po_4pgr.

The task seems to be quite simple: I want for each row from the routing_pair the distance between soure + target (and if possible its geom).
Could you please help me how to solve this?

Thank you very very much!
ch

···

2014-03-13 17:56 GMT+01:00 Carsten Hogertz <carsten.hogertz@gmail.com>:

Hi everybody,

I have a table with about lets say 1.000 rows of pairs of origin/destination and a routable network table.

The origin/destination table (my_route) has a

  • pair_id
  • source (calculated nearest node from the network table)
  • target (also calculated from the network table)

Where do I have to start or what do I have to do to get the shortest path between these pairs?

Could anybody please help me to solve this?

Thanks

ch

On Fri, Mar 14, 2014 at 11:26 PM, Carsten Hogertz <carsten.hogertz@gmail.com

wrote:

Maybe to clearify.

I've got the following two tables:

Table at_2po_4pgr with the columns:

  id integer NOT NULL,
  osm_id bigint,
  osm_name character varying,
  osm_meta character varying,
  osm_source_id bigint,
  osm_target_id bigint,
  clazz integer,
  flags integer,
  source integer,
  target integer,
  km double precision,
  kmh integer,
  cost2 double precision,
  reverse_cost double precision,
  x1 double precision,
  y1 double precision,
  x2 double precision,
  y2 double precision,
  geom_way geometry(LineString,4326)

and Table routing_pair with the columns:

  id integer,
  h_key integer,
  lat_htl double precision,
  lon_htl double precision,
  source integer,
  geom_htl geometry(Point,4326),
  lat_bhf double precision,
  lon_bhf double precision,
  target integer,
  geom_bhf geometry(Point,4326)

The routing_pair table hold three important information:
ID
SOURCE
TARGET

All columns are filled (source + target are calculated from at_2po_4pgr.

The task seems to be quite simple: I want for each row from the
routing_pair the distance between soure + target (and if possible its geom).
Could you please help me how to solve this?

Hi Carsten,

There is a function named kDijkstra and it allows you to calculate all
paths from one node to many:
http://docs.pgrouting.org/2.0/en/src/kdijkstra/doc/index.html#pgr-kdijkstra

If something is not clear with the page above, feel free to ask.

Daniel

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

Hi Daniel,
thanks for your eMail.
Well, I think it’s not a 1-n calculation. IMHO it’s a 1-1 calculation,right?
So I don’t know how to calculate the distance for each row of the routing_pair table.

Thanks
Carsten

···

2014-03-14 15:33 GMT+01:00 Daniel Kastl <daniel@georepublic.de>:


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

On Fri, Mar 14, 2014 at 11:26 PM, Carsten Hogertz <carsten.hogertz@gmail.com> wrote:

Maybe to clearify.

I’ve got the following two tables:

Table at_2po_4pgr with the columns:

id integer NOT NULL,
osm_id bigint,
osm_name character varying,
osm_meta character varying,
osm_source_id bigint,
osm_target_id bigint,
clazz integer,
flags integer,
source integer,
target integer,
km double precision,
kmh integer,
cost2 double precision,
reverse_cost double precision,
x1 double precision,
y1 double precision,
x2 double precision,
y2 double precision,
geom_way geometry(LineString,4326)

and Table routing_pair with the columns:

id integer,
h_key integer,
lat_htl double precision,
lon_htl double precision,
source integer,
geom_htl geometry(Point,4326),
lat_bhf double precision,
lon_bhf double precision,
target integer,
geom_bhf geometry(Point,4326)

The routing_pair table hold three important information:
ID
SOURCE
TARGET

All columns are filled (source + target are calculated from at_2po_4pgr.

The task seems to be quite simple: I want for each row from the routing_pair the distance between soure + target (and if possible its geom).
Could you please help me how to solve this?

Hi Carsten,

There is a function named kDijkstra and it allows you to calculate all paths from one node to many:
http://docs.pgrouting.org/2.0/en/src/kdijkstra/doc/index.html#pgr-kdijkstra

If something is not clear with the page above, feel free to ask.

Daniel

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

On Fri, Mar 14, 2014 at 11:42 PM, Carsten Hogertz <carsten.hogertz@gmail.com

wrote:

Hi Daniel,
thanks for your eMail.
Well, I think it's not a 1-n calculation. IMHO it's a 1-1
calculation,right?
So I don't know how to calculate the distance for each row of the
routing_pair table.

Well, you need to run this query for each row. So with n rows you need n
queries.
If you use standard shortest path function you need to run "n x n" queries.

You may want to write a custom function, which makes first a select of all
records in your table and then loops through these records.
Or don't I still understand the problem?

Daniel

Thanks
Carsten

2014-03-14 15:33 GMT+01:00 Daniel Kastl <daniel@georepublic.de>:

On Fri, Mar 14, 2014 at 11:26 PM, Carsten Hogertz <
carsten.hogertz@gmail.com> wrote:

Maybe to clearify.

I've got the following two tables:

Table at_2po_4pgr with the columns:

  id integer NOT NULL,
  osm_id bigint,
  osm_name character varying,
  osm_meta character varying,
  osm_source_id bigint,
  osm_target_id bigint,
  clazz integer,
  flags integer,
  source integer,
  target integer,
  km double precision,
  kmh integer,
  cost2 double precision,
  reverse_cost double precision,
  x1 double precision,
  y1 double precision,
  x2 double precision,
  y2 double precision,
  geom_way geometry(LineString,4326)

and Table routing_pair with the columns:

  id integer,
  h_key integer,
  lat_htl double precision,
  lon_htl double precision,
  source integer,
  geom_htl geometry(Point,4326),
  lat_bhf double precision,
  lon_bhf double precision,
  target integer,
  geom_bhf geometry(Point,4326)

The routing_pair table hold three important information:
ID
SOURCE
TARGET

All columns are filled (source + target are calculated from at_2po_4pgr.

The task seems to be quite simple: I want for each row from the
routing_pair the distance between soure + target (and if possible its geom).
Could you please help me how to solve this?

Hi Carsten,

There is a function named kDijkstra and it allows you to calculate all
paths from one node to many:

http://docs.pgrouting.org/2.0/en/src/kdijkstra/doc/index.html#pgr-kdijkstra

If something is not clear with the page above, feel free to ask.

Daniel

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

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

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

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

lol. Now we’re talking about the same issue!
I could run n x n queries but this would not be very efficient as I’d like to have a more “automatic” solution.

I already thought about function and looping but as being a complete newbie on looping and writing functions this seems quite hard to solve for myself.

Maybe you’ve got a hint?

thanks
carsten

···

2014-03-14 15:53 GMT+01:00 Daniel Kastl <daniel@georepublic.de>:


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

On Fri, Mar 14, 2014 at 11:42 PM, Carsten Hogertz <carsten.hogertz@gmail.com> wrote:

Hi Daniel,
thanks for your eMail.
Well, I think it’s not a 1-n calculation. IMHO it’s a 1-1 calculation,right?
So I don’t know how to calculate the distance for each row of the routing_pair table.

Well, you need to run this query for each row. So with n rows you need n queries.
If you use standard shortest path function you need to run “n x n” queries.

You may want to write a custom function, which makes first a select of all records in your table and then loops through these records.
Or don’t I still understand the problem?

Daniel

Thanks
Carsten


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

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

2014-03-14 15:33 GMT+01:00 Daniel Kastl <daniel@georepublic.de>:


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

On Fri, Mar 14, 2014 at 11:26 PM, Carsten Hogertz <carsten.hogertz@gmail.com> wrote:

Maybe to clearify.

I’ve got the following two tables:

Table at_2po_4pgr with the columns:

id integer NOT NULL,
osm_id bigint,
osm_name character varying,
osm_meta character varying,
osm_source_id bigint,
osm_target_id bigint,
clazz integer,
flags integer,
source integer,
target integer,
km double precision,
kmh integer,
cost2 double precision,
reverse_cost double precision,
x1 double precision,
y1 double precision,
x2 double precision,
y2 double precision,
geom_way geometry(LineString,4326)

and Table routing_pair with the columns:

id integer,
h_key integer,
lat_htl double precision,
lon_htl double precision,
source integer,
geom_htl geometry(Point,4326),
lat_bhf double precision,
lon_bhf double precision,
target integer,
geom_bhf geometry(Point,4326)

The routing_pair table hold three important information:
ID
SOURCE
TARGET

All columns are filled (source + target are calculated from at_2po_4pgr.

The task seems to be quite simple: I want for each row from the routing_pair the distance between soure + target (and if possible its geom).
Could you please help me how to solve this?

Hi Carsten,

There is a function named kDijkstra and it allows you to calculate all paths from one node to many:
http://docs.pgrouting.org/2.0/en/src/kdijkstra/doc/index.html#pgr-kdijkstra

If something is not clear with the page above, feel free to ask.

Daniel

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

Hi Carsten,

I assume you can make a single pgRouting query from point A to B using pgr_astar() or pgr_trsp() or something similar.

Work that out first. Read the Documentation and the workshop.

Then you just want to write a simple procedure to query your table and for each row run the pgr_*() query and do something with the results.

https://www.google.com/#newwindow=1&q=postgres%20plpgsql%20tutorial

Read these to get a basic understanding ot plpgsql sripting for stored procedures.

If you table is big it will take a while. Get this working first and then we can talk about how to speed it up if you need that.

-Steve

On 3/14/2014 11:00 AM, Carsten Hogertz wrote:

lol. Now we're talking about the same issue!
I could run n x n queries but this would not be very efficient as I'd
like to have a more "automatic" solution.

I already thought about function and looping but as being a complete
newbie on looping and writing functions this seems quite hard to solve
for myself.

Maybe you've got a hint?

thanks
carsten

2014-03-14 15:53 GMT+01:00 Daniel Kastl <daniel@georepublic.de
<mailto:daniel@georepublic.de>>:

    On Fri, Mar 14, 2014 at 11:42 PM, Carsten Hogertz
    <carsten.hogertz@gmail.com <mailto:carsten.hogertz@gmail.com>> wrote:

        Hi Daniel,
        thanks for your eMail.
        Well, I think it's not a 1-n calculation. IMHO it's a 1-1
        calculation,right?
        So I don't know how to calculate the distance for each row of
        the routing_pair table.

    Well, you need to run this query for each row. So with n rows you
    need n queries.
    If you use standard shortest path function you need to run "n x n"
    queries.

    You may want to write a custom function, which makes first a select
    of all records in your table and then loops through these records.
    Or don't I still understand the problem?

    Daniel

        Thanks
        Carsten

        2014-03-14 15:33 GMT+01:00 Daniel Kastl <daniel@georepublic.de
        <mailto:daniel@georepublic.de>>:

            On Fri, Mar 14, 2014 at 11:26 PM, Carsten Hogertz
            <carsten.hogertz@gmail.com
            <mailto:carsten.hogertz@gmail.com>> wrote:

                Maybe to clearify.

                I've got the following two tables:

                Table at_2po_4pgr with the columns:

                   id integer NOT NULL,
                   osm_id bigint,
                   osm_name character varying,
                   osm_meta character varying,
                   osm_source_id bigint,
                   osm_target_id bigint,
                   clazz integer,
                   flags integer,
                   source integer,
                   target integer,
                   km double precision,
                   kmh integer,
                   cost2 double precision,
                   reverse_cost double precision,
                   x1 double precision,
                   y1 double precision,
                   x2 double precision,
                   y2 double precision,
                   geom_way geometry(LineString,4326)

                and Table routing_pair with the columns:

                   id integer,
                   h_key integer,
                   lat_htl double precision,
                   lon_htl double precision,
                   source integer,
                   geom_htl geometry(Point,4326),
                   lat_bhf double precision,
                   lon_bhf double precision,
                   target integer,
                   geom_bhf geometry(Point,4326)

                The routing_pair table hold three important information:
                ID
                SOURCE
                TARGET

                All columns are filled (source + target are calculated
                from at_2po_4pgr.

                The task seems to be quite simple: I want for each row
                from the routing_pair the distance between soure +
                target (and if possible its geom).
                Could you please help me how to solve this?

            Hi Carsten,

            There is a function named kDijkstra and it allows you to
            calculate all paths from one node to many:
            http://docs.pgrouting.org/2.0/en/src/kdijkstra/doc/index.html#pgr-kdijkstra

            If something is not clear with the page above, feel free to ask.

            Daniel

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

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

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

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

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

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

puh, not the simplest task for a non-developer…I mean the function.
to get a result with for one row is no problem (using whatever pg_*())

···

2014-03-14 16:33 GMT+01:00 Stephen Woodbridge <woodbri@swoodbridge.com>:

Hi Carsten,

I assume you can make a single pgRouting query from point A to B using pgr_astar() or pgr_trsp() or something similar.

Work that out first. Read the Documentation and the workshop.

Then you just want to write a simple procedure to query your table and for each row run the pgr_*() query and do something with the results.

https://www.google.com/#newwindow=1&q=postgres%20plpgsql%20tutorial

Read these to get a basic understanding ot plpgsql sripting for stored procedures.

If you table is big it will take a while. Get this working first and then we can talk about how to speed it up if you need that.

-Steve

On 3/14/2014 11:00 AM, Carsten Hogertz wrote:

lol. Now we’re talking about the same issue!
I could run n x n queries but this would not be very efficient as I’d
like to have a more “automatic” solution.

I already thought about function and looping but as being a complete
newbie on looping and writing functions this seems quite hard to solve
for myself.

Maybe you’ve got a hint?

thanks
carsten

2014-03-14 15:53 GMT+01:00 Daniel Kastl <daniel@georepublic.de

mailto:[daniel@georepublic.de](mailto:daniel@georepublic.de)>:

On Fri, Mar 14, 2014 at 11:42 PM, Carsten Hogertz

<carsten.hogertz@gmail.com mailto:[carsten.hogertz@gmail.com](mailto:carsten.hogertz@gmail.com)> wrote:

Hi Daniel,
thanks for your eMail.
Well, I think it’s not a 1-n calculation. IMHO it’s a 1-1
calculation,right?
So I don’t know how to calculate the distance for each row of
the routing_pair table.

Well, you need to run this query for each row. So with n rows you
need n queries.
If you use standard shortest path function you need to run “n x n”
queries.

You may want to write a custom function, which makes first a select
of all records in your table and then loops through these records.
Or don’t I still understand the problem?

Daniel

Thanks
Carsten

2014-03-14 15:33 GMT+01:00 Daniel Kastl <daniel@georepublic.de

mailto:[daniel@georepublic.de](mailto:daniel@georepublic.de)>:

On Fri, Mar 14, 2014 at 11:26 PM, Carsten Hogertz
<carsten.hogertz@gmail.com

mailto:[carsten.hogertz@gmail.com](mailto:carsten.hogertz@gmail.com)> wrote:

Maybe to clearify.

I’ve got the following two tables:

Table at_2po_4pgr with the columns:

id integer NOT NULL,
osm_id bigint,
osm_name character varying,
osm_meta character varying,
osm_source_id bigint,
osm_target_id bigint,
clazz integer,
flags integer,
source integer,
target integer,
km double precision,
kmh integer,
cost2 double precision,
reverse_cost double precision,
x1 double precision,
y1 double precision,
x2 double precision,
y2 double precision,
geom_way geometry(LineString,4326)

and Table routing_pair with the columns:

id integer,
h_key integer,
lat_htl double precision,
lon_htl double precision,
source integer,
geom_htl geometry(Point,4326),
lat_bhf double precision,
lon_bhf double precision,
target integer,
geom_bhf geometry(Point,4326)

The routing_pair table hold three important information:
ID
SOURCE
TARGET

All columns are filled (source + target are calculated
from at_2po_4pgr.

The task seems to be quite simple: I want for each row
from the routing_pair the distance between soure +
target (and if possible its geom).
Could you please help me how to solve this?

Hi Carsten,

There is a function named kDijkstra and it allows you to
calculate all paths from one node to many:
http://docs.pgrouting.org/2.0/en/src/kdijkstra/doc/index.html#pgr-kdijkstra

If something is not clear with the page above, feel free to ask.

Daniel


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de

mailto:[daniel.kastl@georepublic.de](mailto:daniel.kastl@georepublic.de)

Web: http://georepublic.info


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org

mailto:[Pgrouting-users@lists.osgeo.org](mailto:Pgrouting-users@lists.osgeo.org)

http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org

mailto:[Pgrouting-users@lists.osgeo.org](mailto:Pgrouting-users@lists.osgeo.org)

http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Georepublic UG & Georepublic Japan

eMail: daniel.kastl@georepublic.de mailto:[daniel.kastl@georepublic.de](mailto:daniel.kastl@georepublic.de)

Web: http://georepublic.info


Pgrouting-users mailing list

Pgrouting-users@lists.osgeo.org mailto:[Pgrouting-users@lists.osgeo.org](mailto:Pgrouting-users@lists.osgeo.org)

http://lists.osgeo.org/mailman/listinfo/pgrouting-users


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


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

On Sat, Mar 15, 2014 at 12:57 AM, Carsten Hogertz <carsten.hogertz@gmail.com

wrote:

puh, not the simplest task for a non-developer....I mean the function.
to get a result with for one row is no problem (using whatever pg_*())

Of course you don't need to write a plpgsql function.
You can also make n queries with your programming language of your choice.
But with pgRouting it's common that you always need to code at least a
little bit.

Daniel

2014-03-14 16:33 GMT+01:00 Stephen Woodbridge <woodbri@swoodbridge.com>:

Hi Carsten,

I assume you can make a single pgRouting query from point A to B using
pgr_astar() or pgr_trsp() or something similar.

Work that out first. Read the Documentation and the workshop.

Then you just want to write a simple procedure to query your table and
for each row run the pgr_*() query and do something with the results.

https://www.google.com/#newwindow=1&q=postgres%20plpgsql%20tutorial

Read these to get a basic understanding ot plpgsql sripting for stored
procedures.

If you table is big it will take a while. Get this working first and then
we can talk about how to speed it up if you need that.

-Steve

On 3/14/2014 11:00 AM, Carsten Hogertz wrote:

lol. Now we're talking about the same issue!
I could run n x n queries but this would not be very efficient as I'd
like to have a more "automatic" solution.

I already thought about function and looping but as being a complete
newbie on looping and writing functions this seems quite hard to solve
for myself.

Maybe you've got a hint?

thanks
carsten

2014-03-14 15:53 GMT+01:00 Daniel Kastl <daniel@georepublic.de
<mailto:daniel@georepublic.de>>:

    On Fri, Mar 14, 2014 at 11:42 PM, Carsten Hogertz
    <carsten.hogertz@gmail.com <mailto:carsten.hogertz@gmail.com>>
wrote:

        Hi Daniel,
        thanks for your eMail.
        Well, I think it's not a 1-n calculation. IMHO it's a 1-1
        calculation,right?
        So I don't know how to calculate the distance for each row of
        the routing_pair table.

    Well, you need to run this query for each row. So with n rows you
    need n queries.
    If you use standard shortest path function you need to run "n x n"
    queries.

    You may want to write a custom function, which makes first a select
    of all records in your table and then loops through these records.
    Or don't I still understand the problem?

    Daniel

        Thanks
        Carsten

        2014-03-14 15:33 GMT+01:00 Daniel Kastl <daniel@georepublic.de
        <mailto:daniel@georepublic.de>>:

            On Fri, Mar 14, 2014 at 11:26 PM, Carsten Hogertz
            <carsten.hogertz@gmail.com
            <mailto:carsten.hogertz@gmail.com>> wrote:

                Maybe to clearify.

                I've got the following two tables:

                Table at_2po_4pgr with the columns:

                   id integer NOT NULL,
                   osm_id bigint,
                   osm_name character varying,
                   osm_meta character varying,
                   osm_source_id bigint,
                   osm_target_id bigint,
                   clazz integer,
                   flags integer,
                   source integer,
                   target integer,
                   km double precision,
                   kmh integer,
                   cost2 double precision,
                   reverse_cost double precision,
                   x1 double precision,
                   y1 double precision,
                   x2 double precision,
                   y2 double precision,
                   geom_way geometry(LineString,4326)

                and Table routing_pair with the columns:

                   id integer,
                   h_key integer,
                   lat_htl double precision,
                   lon_htl double precision,
                   source integer,
                   geom_htl geometry(Point,4326),
                   lat_bhf double precision,
                   lon_bhf double precision,
                   target integer,
                   geom_bhf geometry(Point,4326)

                The routing_pair table hold three important information:
                ID
                SOURCE
                TARGET

                All columns are filled (source + target are calculated
                from at_2po_4pgr.

                The task seems to be quite simple: I want for each row
                from the routing_pair the distance between soure +
                target (and if possible its geom).
                Could you please help me how to solve this?

            Hi Carsten,

            There is a function named kDijkstra and it allows you to
            calculate all paths from one node to many:
            http://docs.pgrouting.org/2.0/en/src/kdijkstra/doc/index.
html#pgr-kdijkstra

            If something is not clear with the page above, feel free to
ask.

            Daniel

            --
            Georepublic UG & Georepublic Japan
            eMail: daniel.kastl@georepublic.de
            <mailto:daniel.kastl@georepublic.de>

            Web: http://georepublic.info

            _______________________________________________
            Pgrouting-users mailing list
            Pgrouting-users@lists.osgeo.org
            <mailto:Pgrouting-users@lists.osgeo.org>

            http://lists.osgeo.org/mailman/listinfo/pgrouting-users

        _______________________________________________
        Pgrouting-users mailing list
        Pgrouting-users@lists.osgeo.org
        <mailto:Pgrouting-users@lists.osgeo.org>

        http://lists.osgeo.org/mailman/listinfo/pgrouting-users

    --
    Georepublic UG & Georepublic Japan
    eMail: daniel.kastl@georepublic.de <mailto:daniel.kastl@
georepublic.de>

    Web: http://georepublic.info

    _______________________________________________
    Pgrouting-users mailing list
    Pgrouting-users@lists.osgeo.org <mailto:Pgrouting-users@lists.
osgeo.org>

    http://lists.osgeo.org/mailman/listinfo/pgrouting-users

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

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

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

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