Hi,<div><br></div><div>Which Tutorial do you use?</div><div>In case you tried Workshop &quot;FOSS4G2007&quot; it&#39;s better to take a look at <a href="http://pgrouting.postlbs.org/wiki/WorkshopOL2.7andOSM">http://pgrouting.postlbs.org/wiki/WorkshopOL2.7andOSM</a></div>

<div>Kai Behncke rewrote the workshop because since 2007 a couple of things changed with OpenLayers. For example there was no 900913 that time.</div><div><br></div><div>Daniel</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>

<br><br><div class="gmail_quote">2010/7/16 Yasir Shoaib <span dir="ltr">&lt;<a href="mailto:yasirshoa@gmail.com">yasirshoa@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div>
              <p>
Hello,
</p>
<p>
I am trying to have routing working for city of Toronto data.
But,nothing shows up and a problem is seen in the <a>FindNearestEdge</a>() method.
</p>
<p>
One example request sent to the routing php is as follows:
routing.php?startpoint=-8837720.7293944 
5412947.799546&amp;finalpoint=-8836963.525083 
5412307.6394342&amp;method=SPD&amp;srid=900913
</p>
<p>
My understanding is that projection for the pgRouting database is 4326 
and for the tiles displayed in <a href="http://pgrouting.postlbs.org/wiki/OpenLayers" target="_blank">OpenLayers</a> it is
 900913. (In the code both the html and php projection values are set to
 900913. However I am not clear as to how to make the projection changes -- 
whether modify the pgRouting database or change <a href="http://pgrouting.postlbs.org/wiki/OpenLayers" target="_blank">OpenLayers</a> HTML 
page).
</p>
<p>
Further details are below
</p>
<hr>
<p>
- The tiles were rendered through generate_tiles.py script of postgis 
database for Toronto routes. I found Ontario.osm and then extracted city
 of Toronto osm data. Then, created the pgRouting database. Now my map 
displays the tiles correctly in 900913 projection.
</p>
<p>
- I am not sure but maybe the pgRouting database is 4326 projection, 
because for A* search the x1,y1... are shown in latlng. ...?
</p>
<p>
The HTML page is very similar to: <a href="http://pgrouting.postlbs.org/wiki/Workshop-RoutingRequest" target="_blank">http://pgrouting.postlbs.org/wiki/Workshop-RoutingRequest</a>
Except that instead of 54004 projection, I use 9000913 projection.
</p>
<p>
The php page is same as <a href="http://pgrouting.postlbs.org/wiki/Workshop-ClosestEdge" target="_blank">http://pgrouting.postlbs.org/wiki/Workshop-ClosestEdge</a>
Again I have set projection to 900913 here.
</p>
<blockquote>
<p>
Code snippet:
</p>
</blockquote>
<p>
...
</p>
<blockquote>
<p>
$sql = &quot;SELECT gid, source, target, the_geom,astext(the_geom),
</p>
<blockquote>
<p>
distance(the_geom, <a>GeometryFromText?</a>(
</p>
<blockquote>
<p>
&#39;POINT(&quot;.$lonlat<a title="No changeset 0 in 
the repository">[0]</a>.&quot; &quot;.$lonlat<a href="http://pgrouting.postlbs.org/changeset/1" title="Initial import" target="_blank">[1]</a>.&quot;)&#39;,
 900913)) AS dist
</p>
</blockquote>
</blockquote>
<p>
FROM &quot;.TABLE.&quot;
WHERE the_geom &amp;&amp; setsrid(
</p>
<blockquote>
<blockquote>
<p>
&#39;BOX3D(&quot;.($lonlat<a title="No changeset 0 in 
the repository">[0]</a>-200).&quot;
</p>
<blockquote>
<p>
&quot;.($lonlat<a href="http://pgrouting.postlbs.org/changeset/1" title="Initial import" target="_blank">[1]</a>-200).&quot;,
&quot;.($lonlat<a title="No changeset 0 in the 
repository">[0]</a>+200).&quot;
&quot;.($lonlat<a href="http://pgrouting.postlbs.org/changeset/1" title="Initial import" target="_blank">[1]</a>+200).&quot;)&#39;::box3d,
 900913)
</p>
</blockquote>
</blockquote>
</blockquote>
<p>
ORDER BY dist LIMIT 1&quot;;
</p>
</blockquote>
<p>
...
</p>
<p>
The problem is when the php script runs, findNearestEdge() method doesn&#39;t 
work and one warning as followed shown:
</p>
<p>
PHP Warning:  pg_fetch_result(): Unable to jump to row 0 on PostgreSQL 
result index 3
...
</p>
<p>
I am not sure of the problem. Please, if you have ideas let me know.
</p>
            </div>
<br>_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
<br></blockquote></div><br></div>