<div dir="ltr">Steve,<div>Thanks for pointing out various resources, probably I didn't explain about my data properly. So the data which I have is not just two points, I have collected data from my and some of my friend's <a href="http://runkeeper.com/" target="_blank">runkeeper</a> GPS traces for various activities like running, walking, biking in and around Chicago. I have all these GPS points(longitude,latitude) information with me. What I am trying to find is the shortest path given any two points from the data which I have collected.</div>
<div><br></div><div>Thanks,</div><div>Raghavan</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 16, 2014 at 3:42 PM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 1/16/2014 4:31 PM, Raghavan Krishnasamylakshmanaperumal wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Steve,<br>
Thanks for your reply, I think I almost understood. So you say that<br>
having only these GPS point may not help me I should also have the<br>
network map corresponding to these GPS points using which I can figure<br>
out the shortest path?<br>
</blockquote>
<br></div>
if you only have two point on the earth and nothing more what is the shortest path. "Path" implies that you have a network of paths and that you want to find the the shortest path within the network. If you only have the points and no network then you can not find the shorth path in the network, because you do not have one.<br>
<br>
The way things works is that we take a point and find the nearest edge ot node in our network for that point and that then becomes the start or end point in the network. Dijkstra then searchs the network for the shortest path between two points.<div>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So right now I have only these GPS points, how should I proceed further<br>
to figure out the shortest path between any two GPS points from my data.<br>
</blockquote>
<br></div>
You can't do anything with just these points. You have to make them to a network and then search for a solution within that network.<br>
<br>
So you have to find network data that you can use for your area of interest. You might look at OSM data and osm2pgrouting to load it into pgRouting.<br>
<br>
You could also look into using Project-OSRM (requires 64bit HW) which is the router used by OSM.<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am open to use any database/framework/language so please suggest me<br>
how to proceed further and I am concerned about scalability or other<br>
factors because this is just a proof of concept(course project) which I<br>
am trying to build.<br>
</blockquote>
<br></div>
pgRouting<br>
Project-OSRM<br>
google: java dijkstra<br>
<br>
There are lots of choices, but all require that you have network data.<br>
<br>
-Steve<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
Thanks,<br>
Raghavan<br>
<br>
<br>
On Thu, Jan 16, 2014 at 12:21 PM, Stephen Woodbridge<br></div><div><div>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>> wrote:<br>
<br>
On 1/16/2014 12:46 PM, Raghavan Krishnasamylakshmanaperumal wrote:<br>
<br>
Recently I started using PostGIS for my academic project which is a<br>
route recommendation system. I have stored the data in the<br>
following format.<br>
/<br>
/<br>
/gid=>integer, activity=>varchar(20), geom geometry(Point,4326)/<br>
<br>
<br>
geometry points are longitude and latitude information, for<br>
example if<br>
you record your Running activity using a gps device, each point<br>
record<br>
(longitude & latitude) is stored in the geom column.<br>
<br>
<br>
The shortest distance between two points is a straight line unless<br>
you want to constrain the problem to the shortest distance along<br>
some road or path network.<br>
<br>
If it is constrained to a networks of paths then you have to have<br>
the data for that network available.<br>
<br>
In the case of pgRouting, you have to load the network data and<br>
prepare it for routing, then you can use you points as the start and<br>
end points of a route and ask pgRouting to fins the shortest path<br>
between them along the network.<br>
<br>
<br>
I need to find the shortest path(using Dijkistra's) between any<br>
two geom<br>
points from this data set and I am trying to automate this using<br>
some<br>
programming language like Java.<br>
<br>
<br>
With Java you can connect to the database and issue simple queries<br>
to pgRouting to get your results. If you are looking for a Java<br>
library to solve Dijkstra problems then this is not pgRouting. Also<br>
if you are using a Java library you will still need to load the<br>
network of paths that you want to solve you queries against.<br>
<br>
Hope this helps,<br>
-Steve<br>
<br>
Please can you suggest me how to make use of pgrouting and<br>
postgis data<br>
to figure out the shortest path. Is there any library available to<br>
automate this using Java. I am totally stuck on my project and<br>
finally<br>
came to know about this mailing list.<br>
<br>
<br>
--<br>
Thanks and Regards,<br>
Raghavan KL<br>
<br>
<br></div></div>
______________________________<u></u>___________________<br>
Pgrouting-users mailing list<br>
Pgrouting-users@lists.osgeo.__<u></u>org<br>
<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>
<<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>
<br>
______________________________<u></u>___________________<br>
Pgrouting-users mailing list<br>
Pgrouting-users@lists.osgeo.__<u></u>org<br>
<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><div><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>
<br>
<br>
<br>
--<br>
Thanks and Regards,<br>
Raghavan KL<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><br><br clear="all"><div><br></div>-- <br>Thanks and Regards,<div>Raghavan KL</div>
</div></div>