<div dir="ltr">By the way, I followed Sittichai's code but I still got the same errors I got earlier.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 9 January 2014 10:48, Emmanuel Adegboye <span dir="ltr"><<a href="mailto:eaadegboye@googlemail.com" target="_blank">eaadegboye@googlemail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello.<div><br></div><div>I'm now working with the 2013 workshop now and I have my tables structured as follows:</div>

<div><br></div><div><div>routing=# \d</div><div>                      List of relations</div>
<div> Schema |             Name              |   Type   |  Owner</div><div>--------+-------------------------------+----------+----------</div><div> public | eastlegon                     | table    | postgres</div><div>

 public | eastlegon_gid_seq             | sequence | postgres</div>
<div> public | eastlegon_vertices_pgr        | table    | postgres</div><div> public | eastlegon_vertices_pgr_id_seq | sequence | postgres</div><div> public | eastlegonboundary             | table    | postgres</div><div>


 public | eastlegonboundary_gid_seq     | sequence | postgres</div><div> public | geography_columns             | view     | postgres</div><div> public | geometry_columns              | view     | postgres</div><div> public | raster_columns                | view     | postgres</div>


<div> public | raster_overviews              | view     | postgres</div><div> public | route                         | table    | postgres</div><div> public | spatial_ref_sys               | table    | postgres</div><div>


(12 rows)</div><div><br></div><div><br></div><div><br></div><div>routing=# \d eastlegon</div><div>                                      Table "public.eastlegon"</div><div>    Column    |           Type            |                        Modifiers</div>


<div><br></div><div>--------------+---------------------------+-------------------------------------</div><div>--------------------</div><div> gid          | integer                   | not null default nextval('eastlegon_</div>


<div>gid_seq'::regclass)</div><div> length       | double precision          |</div><div> class_id     | integer                   | not null</div><div> postcode     | character varying(254)    |</div><div> name         | character varying(100)    |</div>


<div> the_geom     | geometry(LineString,4326) |</div><div> source       | integer                   |</div><div> target       | integer                   |</div><div> cost_len     | double precision          |</div><div>


 cost_time    | double precision          |</div><div> rcost_len    | double precision          |</div><div> rcost_time   | double precision          |</div><div> x1           | double precision          |</div><div> y1           | double precision          |</div>


<div> x2           | double precision          |</div><div> y2           | double precision          |</div><div> to_cost      | double precision          |</div><div> rule         | text                      |</div><div>


 isolated     | integer                   |</div><div> reverse_cost | double precision          |</div><div>Indexes:</div><div>    "eastlegon_pkey" PRIMARY KEY, btree (gid)</div><div>    "eastlegon_source_idx" btree (source)</div>


<div>    "eastlegon_target_idx" btree (target)</div><div>    "eastlegon_the_geom_gidx" gist (the_geom)</div><div>    "source_idx" btree (source)</div><div>    "target_idx" btree (target)</div>


</div><div><br></div><div><br></div><div>My aim is simply to follow the workshop and display my routes using at least dijkstra algorithm in openlayers 2 (or 3 if it's not too complicated). I try installing the wrappers in the workshop but I get syntax errors.</div>


<div><br></div><div>I'm sure my routing is properly set up since I can display routes using the pgRouting layer plugin for QGIS. I also have the layer stored properly in Geoserver. I can already display the layers as a WMS layer using openlayers. My only challenge is to display the route dynamically in a web browser.</div>


<div><br></div><div>I need pointers in the right direction. My skills are still basic though, but I'm willing to learn.</div><div><br></div><div>Thanks a lot for your help.</div><span class="HOEnZb"><font color="#888888"><div>

<br></div><div>Emmanuel</div></font></span></div>
<div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On 4 January 2014 05:59, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br>


</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Emmanuel,<br>
<br>
I wrote the legacy.sql more as an example to document how things changed, but it was never tested as we did not plan on supporting it. The idea behind it was to provide and an example to help people convert their existing applications to use the new functions.<br>



<br>
Part of the problem with the legacy code is that it had not test suite and the code was very buggy. It also was haphazard because of its evolution and random things being added that people thought might be nice to have.<br>



<br>
The best thing to do is use the new workshop and if you have questions or get stuck to ask the list and we will try to help you sort them out.<br>
<br>
Best regards,<br>
  -Steve<div><div><br>
<br>
On 1/3/2014 11:28 PM, Emmanuel Adegboye wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Regina.<br>
<br>
It was from the foss4g 2007 workshop. The most recent worshops include<br>
wrapper functions which I am not familiar with so I also get stuck at<br>
some point.<br>
<br>
What I am trying to do is to create a simple application that allows<br>
users to set a start and end point and calculate the route using any one<br>
of the major algorithms like the workshop describes.<br>
<br>
So far, the user interface (based on openlayers 2.10) works well and<br>
displays both points. I get an error in firebug when I click the<br>
'calculate route' button and the php script is called, and this was<br>
after I installed legacy.sql. I get "ERROR: type "geoms" does not exist"<br>
when installing pgrouting.sql.<br>
<br>
Here's the error from firebug:<br>
<br>
|<br /><br>
||<b>Warning</b>:  pg_query(): Query failed: ERROR:  parse error - invalid geometry<br>
||HINT:  &quot;POINT( )&quot; &lt;-- parse error at position 9 within geometry in <b>C:\ms4w\Apache\htdocs||\<u></u>hgt\routing.php</b> on line <b>42</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_fetch_result() expects parameter 1 to be resource, boolean given in <b>C:\ms4w\Apache||\htdocs\<u></u>hgt\routing.php</b> on line <b>44</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_fetch_result() expects parameter 1 to be resource, boolean given in <b>C:\ms4w\Apache||\htdocs\<u></u>hgt\routing.php</b> on line <b>45</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_fetch_result() expects parameter 1 to be resource, boolean given in <b>C:\ms4w\Apache||\htdocs\<u></u>hgt\routing.php</b> on line <b>46</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_fetch_result() expects parameter 1 to be resource, boolean given in <b>C:\ms4w\Apache||\htdocs\<u></u>hgt\routing.php</b> on line <b>47</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_query(): Query failed: ERROR:  parse error - invalid geometry<br>
||HINT:  &quot;POINT( )&quot; &lt;-- parse error at position 9 within geometry in <b>C:\ms4w\Apache\htdocs||\<u></u>hgt\routing.php</b> on line <b>42</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_fetch_result() expects parameter 1 to be resource, boolean given in <b>C:\ms4w\Apache||\htdocs\<u></u>hgt\routing.php</b> on line <b>44</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_fetch_result() expects parameter 1 to be resource, boolean given in <b>C:\ms4w\Apache||\htdocs\<u></u>hgt\routing.php</b> on line <b>45</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_fetch_result() expects parameter 1 to be resource, boolean given in <b>C:\ms4w\Apache||\htdocs\<u></u>hgt\routing.php</b> on line <b>46</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_fetch_result() expects parameter 1 to be resource, boolean given in <b>C:\ms4w\Apache||\htdocs\<u></u>hgt\routing.php</b> on line <b>47</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_query(): Query failed:  in <b>C:\ms4w\Apache\htdocs\hgt\<u></u>routing.php</b> on line||<b>108</b><br /><br>
||<br /><br>
||<b>Warning</b>:  pg_fetch_assoc() expects parameter 1 to be resource, boolean given in <b>C:\ms4w\Apache||\htdocs\<u></u>hgt\routing.php</b> on line <b>115</b><br /><br>
||<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><br>
||<route><br>
||</route>|<br>
<br>
<br>
<br>
And the html document:<br>
<br>
<br>
<!DOCTYPE html><br>
<br>
<html><br>
<br>
<head><br>
<br>
<title>pgRouting Demo</title><br>
<br>
<link rel="stylesheet" href="openlayers/theme/<u></u>default/style.css"<br>
type="text/css"><br>
<br>
<style><br>
<br>
#map-id {<br>
<br>
width: 100%;<br>
<br>
height: 512px;<br>
<br>
border: 1px solid black;<br>
<br>
}<br>
<br>
</style><br>
<br>
<script src="openlayers/OpenLayers.js"<u></u>></script><br>
<br>
</head><br>
<br>
<body><br>
<br>
<div id="map-id"></div><br>
<br>
<script><br>
<br>
var SinglePoint = OpenLayers.Class.create();<br>
<br>
SinglePoint.prototype = OpenLayers.Class.inherit(<u></u>OpenLayers.Handler.Point, {<br>
<br>
createFeature: function(evt) {<br>
<br>
this.control.layer.<u></u>removeFeatures(this.control.<u></u>layer.features);<br>
<br>
OpenLayers.Handler.Point.<u></u>prototype.createFeature.apply(<u></u>this, arguments);<br>
<br>
}<br>
<br>
});<br>
<br>
var start_style = OpenLayers.Util.applyDefaults(<u></u>{<br>
<br>
externalGraphic: "start.png",<br>
<br>
graphicWidth: 18,<br>
<br>
graphicHeight: 26,<br>
<br>
graphicYOffset: -26,<br>
<br>
graphicOpacity: 1<br>
<br>
}, OpenLayers.Feature.Vector.<u></u>style['default']);<br>
<br>
var stop_style = OpenLayers.Util.applyDefaults(<u></u>{<br>
<br>
externalGraphic: "stop.png",<br>
<br>
graphicWidth: 18,<br>
<br>
graphicHeight: 26,<br>
<br>
graphicYOffset: -26,<br>
<br>
graphicOpacity: 1<br>
<br>
}, OpenLayers.Feature.Vector.<u></u>style['default']);<br>
<br>
var result_style = OpenLayers.Util.applyDefaults(<u></u>{<br>
<br>
strokeWidth: 3,<br>
<br>
strokeColor: "#ff0000",<br>
<br>
fillOpacity: 0<br>
<br>
}, OpenLayers.Feature.Vector.<u></u>style['default']);<br>
<br>
// global variables<br>
<br>
var map, parser, start, stop, result, controls;<br>
<br>
var format = 'image/png';<br>
<br>
var bounds = new OpenLayers.Bounds(<br>
<br>
                     -0.178166372987693, 5.62323476776518,<br>
<br>
                     -0.140817506885068, 5.64840001174401<br>
<br>
                 );<br>
<br>
var options = {<br>
<br>
                     controls: [],<br>
<br>
                     maxExtent: bounds,<br>
<br>
                     maxResolution: 0.0001458940082134,<br>
<br>
                     projection: "EPSG:4326",<br>
<br>
                     units: 'degrees'<br>
<br>
};<br>
<br>
map = new OpenLayers.Map("map-id", options);<br>
<br>
boundary = new OpenLayers.Layer.WMS(<br>
<br>
                     "East Legon - Boundary",<br>
"<a href="http://localhost:8080/geoserver/pgrouting/wms" target="_blank">http://localhost:8080/<u></u>geoserver/pgrouting/wms</a>",<br>
<br>
                     {<br>
<br>
                         LAYERS: 'pgrouting:eastlegonboundary',<br>
<br>
                         STYLES: '',<br>
<br>
                         format: format,<br>
<br>
                         tiled: true,<br>
<br>
                         tilesOrigin : map.maxExtent.left + ',' +<br>
map.maxExtent.bottom<br>
<br>
                     },<br>
<br>
                     {<br>
<br>
                         buffer: 0,<br>
<br>
                         displayOutsideMaxExtent: true,<br>
<br>
                         isBaseLayer: true,<br>
<br>
                         yx : {'EPSG:4326' : true}<br>
<br>
                     }<br>
<br>
                 );<br>
<br>
eastlegon = new OpenLayers.Layer.WMS(<br>
<br>
                     "East Legon",<br>
"<a href="http://localhost:8080/geoserver/pgrouting/wms" target="_blank">http://localhost:8080/<u></u>geoserver/pgrouting/wms</a>",<br>
<br>
                     {<br>
<br>
                         LAYERS: 'pgrouting:eastlegon',<br>
<br>
                         STYLES: '',<br>
<br>
                         format: format,<br>
<br>
transparent: true,<br>
<br>
                         tiled: true,<br>
<br>
                         tilesOrigin : map.maxExtent.left + ',' +<br>
map.maxExtent.bottom<br>
<br>
                     },<br>
<br>
                     {<br>
<br>
                         buffer: 0,<br>
<br>
                         displayOutsideMaxExtent: true,<br>
<br>
                         isBaseLayer: false,<br>
<br>
                         yx : {'EPSG:4326' : true}<br>
<br>
                     }<br>
<br>
                 );<br>
<br>
start = new OpenLayers.Layer.Vector("Start Point", {style: start_style});<br>
<br>
stop = new OpenLayers.Layer.Vector("End Point", {style: stop_style});<br>
<br>
result = new OpenLayers.Layer.Vector("<u></u>Routing Results",<br>
<br>
{style: result_style});<br>
<br>
map.addLayers([boundary, eastlegon, start, stop, result]);<br>
<br>
map.addControl(new OpenLayers.Control.<u></u>LayerSwitcher());<br>
<br>
map.addControl(new OpenLayers.Control.PanPanel())<u></u>;<br>
<br>
map.addControl(new OpenLayers.Control.ZoomPanel()<u></u>);<br>
<br>
map.addControl(new OpenLayers.Control.ScaleLine()<u></u>);<br>
<br>
map.addControl(new OpenLayers.Control.Navigation(<u></u>));<br>
<br>
map.addControl(new OpenLayers.Control.<u></u>MousePosition());<br>
<br>
map.zoomToExtent(bounds);<br>
<br>
// controls<br>
<br>
controls = {<br>
<br>
start: new OpenLayers.Control.<u></u>DrawFeature(start, SinglePoint),<br>
<br>
stop: new OpenLayers.Control.<u></u>DrawFeature(stop, SinglePoint)<br>
<br>
}<br>
<br>
for (var key in controls) {<br>
<br>
map.addControl(controls[key]);<br>
<br>
}<br>
<br>
function toggleControl(element) {<br>
<br>
for (key in controls) {<br>
<br>
if (element.value == key && element.checked) {<br>
<br>
controls[key].activate();<br>
<br>
} else {<br>
<br>
controls[key].deactivate();<br>
<br>
}<br>
<br>
}<br>
<br>
}<br>
<br>
function compute() {<br>
<br>
             var startPoint = start.features[0];<br>
<br>
             var stopPoint = stop.features[0];<br>
<br>
<br>
             if (startPoint && stopPoint) {<br>
<br>
                 var result = {<br>
<br>
                     startpoint: startPoint.geometry.x + ' ' +<br>
startPoint.geometry.y,<br>
<br>
                     finalpoint: stopPoint.geometry.x + ' ' +<br>
stopPoint.geometry.y,<br>
<br>
                     method: OpenLayers.Util.getElement('<u></u>method').value,<br>
<br>
                     region: "eastlegon",<br>
<br>
                     srid: "4326"<br>
<br>
                 };<br>
<br>
                 OpenLayers.loadURL("./routing.<u></u>php",<br>
<br>
<br>
  OpenLayers.Util.<u></u>getParameterString(result),<br>
<br>
                                    null,<br>
<br>
                                    displayRoute);<br>
<br>
             }<br>
<br>
         }<br>
<br>
<br>
         function displayRoute(response) {<br>
<br>
             if (response && response.responseXML) {<br>
<br>
                 // erase the previous results<br>
<br>
                 result.removeFeatures(result.<u></u>features);<br>
<br>
<br>
                 // parse the features<br>
<br>
                 var edges =<br>
response.responseXML.<u></u>getElementsByTagName('edge');<br>
<br>
                 var features = [];<br>
<br>
                 for (var i = 0; i < edges.length; i++) {<br>
<br>
                     var g =<br>
parser.read(edges[i].<u></u>getElementsByTagName('wkt')[0]<u></u>.textContent);<br>
<br>
                     features.push(new OpenLayers.Feature.Vector(g));<br>
<br>
                 }<br>
<br>
                 result.addFeatures(features);<br>
<br>
             }<br>
<br>
         }<br>
<br>
</script><br>
<br>
<ul><br>
<br>
<li><br>
<br>
<input type="radio" name="control" id="noneToggle"<br>
<br>
onclick="toggleControl(this);" checked="checked" /><br>
<br>
<label for="noneToggle">navigate</<u></u>label><br>
<br>
</li><br>
<br>
<li><br>
<br>
<input type="radio" name="control" value="start" id="startToggle"<br>
<br>
onclick="toggleControl(this);" /><br>
<br>
<label for="startToggle">set start point</label><br>
<br>
</li><br>
<br>
<li><br>
<br>
<input type="radio" name="control" value="stop" id="stopToggle"<br>
<br>
onclick="toggleControl(this);" /><br>
<br>
<label for="stopToggle">set stop point</label><br>
<br>
</li><br>
<br>
</ul><br>
<br>
<select id="method"><br>
<br>
<option value="SPD">Shortest Path Dijkstra - undirected (BBox)</option><br>
<br>
<option value="SPA">Shortest Path A Star - undirected</option><br>
<br>
<option value="SPS">Shortest Path Shooting Star</option><br>
<br>
</select><br>
<br>
<button onclick="compute()">Calculate Route</button><br>
<br>
</body><br>
<br>
</html><br>
<br>
<br>
<br>
On Jan 4, 2014 3:45 AM, "Paragon Corporation" <<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a><br></div></div>
<mailto:<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>>> wrote:<br>
<br>
    __<div><br>
    Emmanuel,<br>
    That PHP code looks like it was written for pgRouting 1.0. Which<br>
    workshop did you get that from?<br>
    Most of the pgRouting 2.0 functions are prefixed with pgr_. There<br>
    should be a file in your install called<br>
      In C:/Program<br>
    Files/PostgreSQL/9.2/share/<u></u>extensions/pgrouting_legacy.<u></u>sql which<br>
    installs the 1.0 function names.  You could try using that though I<br>
    haven't personally had a need to.<br>
    One other thing I did notice about this code which I think is a bug<br>
    is that although PG_PORT is defined, it doesn't seem to be used for<br>
    pg_connect, so will not work without modification if you are<br>
    runnning postgres on non-default port (5432).<br>
    Hope that helps,<br>
    Regina<br>
    <a href="http://www.postgis.us" target="_blank">http://www.postgis.us</a><br>
    <a href="http://www.bostongis.com" target="_blank">http://www.bostongis.com</a><br>
    <a href="http://www.paragoncorporation.com" target="_blank">http://www.paragoncorporation.<u></u>com</a><br>
<br></div>
    ------------------------------<u></u>------------------------------<u></u>------------<br>
    *From:* <a href="mailto:pgrouting-users-bounces@lists.osgeo.org" target="_blank">pgrouting-users-bounces@lists.<u></u>osgeo.org</a><br>
    <mailto:<a href="mailto:pgrouting-users-bounces@lists.osgeo.org" target="_blank">pgrouting-users-<u></u>bounces@lists.osgeo.org</a>><br>
    [mailto:<a href="mailto:pgrouting-users-bounces@lists.osgeo.org" target="_blank">pgrouting-users-<u></u>bounces@lists.osgeo.org</a><br>
    <mailto:<a href="mailto:pgrouting-users-bounces@lists.osgeo.org" target="_blank">pgrouting-users-<u></u>bounces@lists.osgeo.org</a>>] *On Behalf Of<br>
    *Emmanuel Adegboye<br>
    *Sent:* Friday, January 03, 2014 4:42 PM<br>
    *To:* <a href="mailto:pgrouting-users@lists.osgeo.org" target="_blank">pgrouting-users@lists.osgeo.<u></u>org</a><br>
    <mailto:<a href="mailto:pgrouting-users@lists.osgeo.org" target="_blank">pgrouting-users@lists.<u></u>osgeo.org</a>><br>
    *Subject:* [pgrouting-users] Issues with pgrouting workshop code in<div><br>
    postgis2.11/pgrouting 2.0<br>
<br>
    I'm having issues getting the pgrouting workshop to work on<br>
    Postgresql 9.2/PostGIS 2.11 and pgrouting 2.0 on windows.<br>
<br>
    How can I rewrite the following php/sql code and make it compatible<br>
    with my version:<br>
<br>
    |<?php<br>
<br>
       // Database connection settings<br>
       define("PG_DB"   ,  "routing");<br>
       define("PG_HOST",  "localhost");<br>
       define("PG_USER",  "postgres");<br>
       define("PG_PORT",  "5432");<br>
        define("PG_PASSWD",    "*******");<br>
       define("TABLE",    "eastlegon");<br>
<br></div>
       $counter=  $pathlength=  0;<div><br>
<br>
       // Retrieve start point<br>
       $start=  split('',$_REQUEST['<u></u>startpoint']);<br></div>
       $startPoint=  array($start[0],  $start[1]);<div><br>
<br>
       // Retrieve end point<br>
       $end=  split('',$_REQUEST['<u></u>finalpoint']);<br></div>
       $endPoint=  array($end[0],  $end[1]);<div><br>
<br>
       // Find the nearest edge<br>
       $startEdge=  findNearestEdge($startPoint);<br></div>
       $endEdge=  findNearestEdge($endPoint);<div><br>
<br>
       // FUNCTION findNearestEdge<br>
       function  findNearestEdge($lonlat)  {<br>
<br>
         // Connect to database<br></div>
         $con=  pg_connect("dbname=".PG_DB." host=".PG_HOST." user=".PG_USER." password=".PG_PASSWD);<br>
<br>
         $sql=  "SELECT gid, source, target, the_geom,<div><br>
                  distance(the_geom, GeometryFromText(<br>
                       'POINT(".$lonlat[0]."".$<u></u>lonlat[1].")', 4326)) AS dist<br>
                 FROM ".TABLE."<br>
                 WHERE the_geom && setsrid(<br>
                       'BOX3D(".($lonlat[0]-200)."<br>
                              ".($lonlat[1]-200).",<br>
                              ".($lonlat[0]+200)."<br>
                              ".($lonlat[1]+200).")'::box3d, 4326)<br>
                 ORDER BY dist LIMIT 1";<br>
<br></div>
         $query=  pg_query($con,$sql);<div><br>
<br>
         $edge['gid']       =  pg_fetch_result($query,  0,  0);<br>
         $edge['source']    =  pg_fetch_result($query,  0,  1);<br>
         $edge['target']    =  pg_fetch_result($query,  0,  2);<br>
         $edge['the_geom']  =  pg_fetch_result($query,  0,  3);<br>
<br>
         // Close database connection<br>
         pg_close($con);<br>
<br>
         return  $edge;<br>
       }<br>
<br>
       // Select the routing algorithm<br>
       switch($_REQUEST['method'])  {<br>
<br>
         case  'SPD'  :  // Shortest Path Dijkstra<br>
<br></div>
           $sql=  "SELECT rt.gid, AsText(rt.the_geom) AS wkt,<div><br>
                        length(rt.the_geom) AS length, ".TABLE.".id<br>
                     FROM ".TABLE.",<br>
                         (SELECT gid, the_geom<br>
                             FROM dijkstra_sp_delta(<br>
                                 '".TABLE."',<br>
                                 ".$startEdge['source'].",<br>
                                 ".$endEdge['target'].",<br>
                                 3000)<br>
                          ) as rt<br>
                     WHERE ".TABLE.".gid=rt.gid;";<br>
           break;<br>
<br>
         case  'SPA'  :  // Shortest Path A*<br>
<br></div>
           $sql=  "SELECT rt.gid, AsText(rt.the_geom) AS wkt,<div><br>
                          length(rt.the_geom) AS length, ".TABLE.".id<br>
                       FROM ".TABLE.",<br>
                           (SELECT gid, the_geom<br>
                               FROM astar_sp_delta(<br>
                                   '".TABLE."',<br>
                                   ".$startEdge['source'].",<br>
                                   ".$endEdge['target'].",<br>
                                   3000)<br>
                            ) as rt<br>
                       WHERE ".TABLE.".gid=rt.gid;";<br>
           |<br>
<br>
<br>
    ______________________________<u></u>_________________<br>
    Pgrouting-users mailing list<br></div>
    <a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a> <mailto:<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.<u></u>osgeo.org</a>><br>



    <a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
    ...<div><br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
<br>
</div></blockquote><div><div>
<br>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
</div></div></blockquote></div></div></div><br></div>
</blockquote></div><br></div>