<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 14, 2014 at 11:26 PM, Carsten Hogertz <span dir="ltr"><<a href="mailto:carsten.hogertz@gmail.com" target="_blank">carsten.hogertz@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Maybe to clearify. <div><br></div><div>I've got the following two tables:</div>
<div><br></div><div>Table at_2po_4pgr with the columns:</div><div><br></div><div><div> id integer NOT NULL,</div><div> osm_id bigint,</div>
<div> osm_name character varying,</div><div> osm_meta character varying,</div><div> osm_source_id bigint,</div><div> osm_target_id bigint,</div><div> clazz integer,</div><div> flags integer,</div><div> source integer,</div>
<div> target integer,</div><div> km double precision,</div><div> kmh integer,</div><div> cost2 double precision,</div><div> reverse_cost double precision,</div><div> x1 double precision,</div><div> y1 double precision,</div>
<div> x2 double precision,</div><div> y2 double precision,</div><div> geom_way geometry(LineString,4326)</div></div><div><br></div><div>and Table routing_pair with the columns:</div><div><br></div><div><div> id integer,</div>
<div> h_key integer,</div><div> lat_htl double precision,</div><div> lon_htl double precision,</div><div> source integer,</div><div> geom_htl geometry(Point,4326),</div><div> lat_bhf double precision,</div><div> lon_bhf double precision,</div>
<div> target integer,</div><div> geom_bhf geometry(Point,4326)</div></div><div><br></div><div><br></div><div>The routing_pair table hold three important information:</div><div>ID</div><div>SOURCE</div><div>TARGET</div>
<div>
<br></div><div>All columns are filled (source + target are calculated from at_2po_4pgr.</div><div><br></div><div>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).</div>
<div>Could you please help me how to solve this?</div><div><br></div></div></blockquote><div><br></div><div>Hi Carsten,</div><div><br></div><div>There is a function named kDijkstra and it allows you to calculate all paths from one node to many:</div>
<div><a href="http://docs.pgrouting.org/2.0/en/src/kdijkstra/doc/index.html#pgr-kdijkstra">http://docs.pgrouting.org/2.0/en/src/kdijkstra/doc/index.html#pgr-kdijkstra</a><br></div><div><br></div><div>If something is not clear with the page above, feel free to ask.</div>
<div><br></div><div>Daniel</div><div><br></div><div><br></div><div><br></div><div> </div></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & Georepublic Japan<br>
eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>Web: <a href="http://georepublic.info" style="color:rgb(66,99,171)" target="_blank">http://georepublic.info</a></span></div>
</div></div>