[pgrouting-users] Regarding pgrouting and postgis for shortest path
Daniel Kastl
daniel at georepublic.de
Thu Jan 16 10:03:19 PST 2014
On Fri, Jan 17, 2014 at 2:46 AM, Raghavan Krishnasamylakshmanaperumal <
rkrish20 at uic.edu> wrote:
> Recently I started using PostGIS for my academic project which is a route
> recommendation system. I have stored the data in the following format.
>
> *gid=>integer, activity=>varchar(20), geom geometry(Point,4326)*
>
> geometry points are longitude and latitude information, for example if you
> record your Running activity using a gps device, each point record
> (longitude & latitude) is stored in the geom column.
>
> I need to find the shortest path(using Dijkistra's) between any two geom
> points from this data set and I am trying to automate this using some
> programming language like Java.
>
> Please can you suggest me how to make use of pgrouting and postgis data
> to figure out the shortest path. Is there any library available to automate
> this using Java. I am totally stuck on my project and finally came to know
> about this mailing list.
>
>
To be able to use pgRouting you need a network, which contains information
about "source" and "target" ID of each network segment and the "cost" to
traverse the network segment.
In case of a road network for example, the network segment is a "road
segment" with a "start node" (source) and a "end node" (target). The most
simple cost for such a road segment would be the "length".
So regarding your data you need to see, how the points are connected and
what the costs are to move between 2 points.
pgRouting does not provide a function to compute shortest path in a raster:
http://www.policyalmanac.org/games/aStarTutorial.htm
(This might be a good Google Summer of Code project idea)
Daniel
--
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20140117/58206b11/attachment.html>
More information about the Pgrouting-users
mailing list