HELP-1!
Daniel
daniel.faivre at CAMPTOCAMP.COM
Tue Oct 4 08:35:37 PDT 2005
For routing, u can use the pgdijkstra extension written as a postgresql
contrib by camptocamp. You can download it and consult documentation on
cartoweb.org.
With pgdijkstra, you can compute (for sample) the shortest path from one
city to another, and define the result as a mapserver layer. In your
mapfile, the shortest path layer will look like:
LAYER
[...]
CONNECTIONTYPE postgis
CONNECTION "user=webuser host=localhost dbname=geo"
DATA "the_geom from (SELECT the_geom, gid from
shortest_path_as_geometry('my_polyline_[table|query|view|tuples]', 2629,
10171)) as thing using unique gid using srid=-1"
[...]
You can also use mapscript to add a shortest path layer dynamically.
In postgresql, you can directly compute a shortest path by a query like:
SELECT shortest_path('SELECT source, id, target, cost FROM edges',
22791, 4816);
Yours,
dF
volverinn at libero.it wrote:
>Hello all,
>
>I've a question for my problem.
>I want calculate a min route between two cities.
>I've idea to implement this (i've thin al. e.g. link state for the router), but i dont'know if the Mapscript does execute some operation.
>My intentions is:
>with a database for support, i calculate index of shape object that will be into new shape. Therefore i must read from a shape shapeobj by index and insert to my result shape and finally i draw it.
>With PHP/Mapscript can i do this?
>
>Thak for prospective response.
>
>Alessio.
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: daniel.faivre.vcf
Type: text/x-vcard
Size: 323 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20051004/d381d036/attachment.vcf>
More information about the MapServer-users
mailing list