<div>Hi Daniel</div>
<div> </div>
<div>yo agrege el campo ID a la consulta pero el orden en que me entrega los resultados es el mismo.</div>
<div> </div>
<div>query:</div>
<div>SELECT id,gid, the_geom FROM dijkstra_sp_delta( 'calle', 3414, 3406, 3000)</div>
<div> </div>
<div>result:</div>
<div>"id";"gid";"the_geom"<br>2;4414;"0105000020B30F000001000000010200000002000000F9E3B4109BCC51C065E35F65B5973EC0656B43BC8ECC51C02D2D6B65B0973EC0"<br>3;4415;"0105000020B30F000001000000010200000002000000656B43BC8ECC51C02D2D6B65B0973EC018E60A2187CC51C007069A16AD973EC0"</div>
<div>1;<strong>4416</strong>;"0105000020B30F00000100000001020000000200000018E60A2187CC51C007069A16AD973EC0AA2CA7847ECC51C0EB933A5AA9973EC0"<br>4;4417;"0105000020B30F000001000000010200000002000000AA2CA7847ECC51C0EB933A5AA9973EC04DFDF22B7ACC51C0FD7FB373A7973EC0"<br>
</div>
<div>
<div id="result_box" dir="ltr" style="TEXT-ALIGN: left">should be:</div>
<div dir="ltr" style="TEXT-ALIGN: left"> </div>
<div dir="ltr" style="TEXT-ALIGN: left">"id";"gid";"the_geom"<br><br>2;4414;"0105000020B30F000001000000010200000002000000F9E3B4109BCC51C065E35F65B5973EC0656B43BC8ECC51C02D2D6B65B0973EC0"<br>
3;4415;"0105000020B30F000001000000010200000002000000656B43BC8ECC51C02D2D6B65B0973EC018E60A2187CC51C007069A16AD973EC0"</div>
<div dir="ltr" style="TEXT-ALIGN: left">1;4416;"0105000020B30F00000100000001020000000200000018E60A2187CC51C007069A16AD973EC0AA2CA7847ECC51C0EB933A5AA9973EC0"<br>4;4417;"0105000020B30F000001000000010200000002000000AA2CA7847ECC51C0EB933A5AA9973EC04DFDF22B7ACC51C0FD7FB373A7973EC0</div>
</div>
<div> </div>
<div>
<div id="result_box" dir="ltr" style="TEXT-ALIGN: left">I think I have problems with the data from the shapefile...</div>
<div dir="ltr" style="TEXT-ALIGN: left"> </div>
<div dir="ltr" style="TEXT-ALIGN: left">RG</div></div>
<div class="gmail_quote">2009/2/4 Daniel Kastl <span dir="ltr"><<a href="mailto:kastl@orkney.co.jp">kastl@orkney.co.jp</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Valeria,<br><br>I never had the case of wrong ordered result, but you could add the "id"<br>attribute to the select and order by it.<br>
<br>For example:<br>SELECT id, gid, AsText(the_geom) AS the_geom FROM astar_sp_delta('ways',<br>10, 20, 0.1);<br><br>... should return something like:<br><br> id | gid | the_geom<br>-----+-------+----------------------------------------------------------------------------------------------------------------<br>
1 | 9 | MULTILINESTRING((18.421891 -33.9154821,18.4216313<br>-33.9151594))<br> 2 | 8 | MULTILINESTRING((18.4220472 -33.9156916,18.421891<br>-33.9154821))<br> 3 | 7 | MULTILINESTRING((18.4223323 -33.9159963,18.4220472<br>
-33.9156916))<br> 4 | 2983 | MULTILINESTRING((...))<br> 5 | 2982 | MULTILINESTRING((...))<br><br>Also you might want to try to JOIN two tables this way if you need more<br>than the standard returned attributes:<br><a href="http://pgrouting.postlbs.org/wiki/SQLTipsAndTricks" target="_blank">http://pgrouting.postlbs.org/wiki/SQLTipsAndTricks</a><br>
<br>Daniel<br><br><br>Valeria Muņoz schrieb:<br>
<div>
<div></div>
<div class="Wj3C7c">> Hi<br>><br>> I have problems with the query results, The results are not sorted.<br>><br>> my Query:<br>><br>> SELECT rt.gid,rt.the_geom AS tg, AsText(rt.the_geom) AS wkt,<br>> length(rt.the_geom) AS length, calle.gid FROM calle, (SELECT gid,<br>
> the_geom FROM dijkstra_sp_delta( 'calle', 3429, 3406, 3000) ) as rt<br>> WHERE calle.gid=rt.gid;<br>><br>> result:<br>> "gid";"tg";"wkt";"length";"gid"<br>
> *4416*;"0105000020B30F00000100000001020000000200000018E60A2187CC51C007069A16AD973EC0AA2CA7847ECC51C0EB933A5AA9973EC0";"MULTILINESTRING((-71.1957476240572<br>> -30.5924848676714,-71.1952220566333<br>
> -30.5924278634083))";0.000528649792432027;4416<br>> *4414*;"0105000020B30F000001000000010200000002000000F9E3B4109BCC51C065E35F65B5973EC0656B43BC8ECC51C02D2D6B65B0973EC0";"MULTILINESTRING((-71.1969644323834<br>
> -30.5926116332152,-71.1962118776697<br>> -30.5925353418981))";0.000756411899864822;4414<br>> *4415*;"0105000020B30F000001000000010200000002000000656B43BC8ECC51C02D2D6B65B0973EC018E60A2187CC51C007069A16AD973EC0";"MULTILINESTRING((-71.1962118776697<br>
> -30.5925353418981,-71.1957476240572<br>> -30.5924848676714))";0.00046698936208239;4415<br>> *4417*;"0105000020B30F000001000000010200000002000000AA2CA7847ECC51C0EB933A5AA9973EC04DFDF22B7ACC51C0FD7FB373A7973EC0";"MULTILINESTRING((-71.1952220566333<br>
> -30.5924278634083,-71.194956767363<br>> -30.5923988641007))";0.000266869550146504;4417<br>> should be given A, B and C gave me B, A and C, then I can not generate<br>> a guide of how to get from point A to B properly..<br>
><br>> Can sort the results?..please help..<br>> RG<br></div></div>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>
> Pgrouting-users mailing list<br>> <a href="mailto:Pgrouting-users@lists.postlbs.org">Pgrouting-users@lists.postlbs.org</a><br>> <a href="http://lists.postlbs.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.postlbs.org/mailman/listinfo/pgrouting-users</a><br>
><br><br>_______________________________________________<br>Pgrouting-users mailing list<br><a href="mailto:Pgrouting-users@lists.postlbs.org">Pgrouting-users@lists.postlbs.org</a><br><a href="http://lists.postlbs.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.postlbs.org/mailman/listinfo/pgrouting-users</a><br>
</blockquote></div><br>