<div dir="ltr">Steve,<div>Sure I will try following the above mentioned steps. Hope this will guide me to further proceed in my work.</div><div>Thanks for sharing your knowledge.</div><div><br></div><div>Thanks,</div><div>

Raghavan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 16, 2014 at 4:11 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 class="im">On 1/16/2014 4:54 PM, Raghavan Krishnasamylakshmanaperumal wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Steve,<div class="im"><br>
Thanks for pointing out various resources, probably I didn't explain<br>
about my data properly. So the data which I have is not just two points,<br>
I have collected data from my and some of my friend's runkeeper<br></div>
<<a href="http://runkeeper.com/" target="_blank">http://runkeeper.com/</a>> GPS traces for various activities like running,<div class="im"><br>
walking, biking in and around Chicago. I have all these GPS<br>
points(longitude,latitude) information with me. What I am trying to find<br>
is the shortest path given any two points from the data which I have<br>
collected.<br>
</div></blockquote>
<br>
Then you should be able to:<br>
1. load the track points into a table<br>
2. convert the tracks into linestrings<br>
3. then run pgr_nodenetwork<br>
4. update the resulting table to include costs or lengths<br>
5. then run pgr_createTopology<br>
6. then map a start point and end point to the network nodes<br>
7. call pgr_dijkstra to get shortest path<br>
<br>
All of the above happens in the database<br>
<br>
8. write a client application the connects to the database maps the start and end points, computes the path and displays it or whatever you need to do with it.<br>
<br>
-Steve<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
Raghavan<br>
<br>
<br><div class="im">
On Thu, Jan 16, 2014 at 3:42 PM, Stephen Woodbridge<br></div><div><div class="h5">
<<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 4:31 PM, Raghavan Krishnasamylakshmanaperumal wrote:<br>
<br>
        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<br>
        figure<br>
        out the shortest path?<br>
<br>
<br>
    if you only have two point on the earth and nothing more what is the<br>
    shortest path. "Path" implies that you have a network of paths and<br>
    that you want to find the the shortest path within the network. If<br>
    you only have the points and no network then you can not find the<br>
    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<br>
    edge ot node in our network for that point and that then becomes the<br>
    start or end point in the network. Dijkstra then searchs the network<br>
    for the shortest path between two points.<br>
<br>
<br>
        So right now I have only these GPS points, how should I proceed<br>
        further<br>
        to figure out the shortest path between any two GPS points from<br>
        my data.<br>
<br>
<br>
    You can't do anything with just these points. You have to make them<br>
    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<br>
    interest. You might look at OSM data and osm2pgrouting to load it<br>
    into pgRouting.<br>
<br>
    You could also look into using Project-OSRM (requires 64bit HW)<br>
    which is the router used by OSM.<br>
<br>
<br>
        I am open to use any database/framework/language so please<br>
        suggest me<br>
        how to proceed further and I am concerned about  scalability or<br>
        other<br>
        factors because this is just a proof of concept(course project)<br>
        which I<br>
        am trying to build.<br>
<br>
<br>
    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>
        Thanks,<br>
        Raghavan<br>
<br>
<br>
        On Thu, Jan 16, 2014 at 12:21 PM, Stephen Woodbridge<br>
        <<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>><br></div></div>
        <mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<div><div class="h5"><br>
        <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<br>
        wrote:<br>
<br>
                 Recently I started using PostGIS for my academic<br>
        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<br>
        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,<br>
        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<br>
        unless<br>
             you want to constrain the problem to the shortest distance<br>
        along<br>
             some road or path network.<br>
<br>
             If it is constrained to a networks of paths then you have<br>
        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<br>
        start and<br>
             end points of a route and ask pgRouting to fins the<br>
        shortest path<br>
             between them along the network.<br>
<br>
<br>
                 I need to find the shortest path(using Dijkistra's)<br>
        between any<br>
                 two geom<br>
                 points from this data set and I am trying to automate<br>
        this using<br>
                 some<br>
                 programming language like Java.<br>
<br>
<br>
             With Java you can connect to the database and issue simple<br>
        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<br>
        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<br>
        available to<br>
                 automate this using Java. I am totally stuck on my<br>
        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." target="_blank">Pgrouting-users@lists.</a><u></u>__<a href="http://osgeo.org" target="_blank">osgeo.org</a><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>
        <<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." target="_blank">Pgrouting-users@lists.</a><u></u>__<a href="http://osgeo.org" target="_blank">osgeo.org</a><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>><div><div class="h5"><br>
<br>
<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>
<br>
<br>
        --<br>
        Thanks and Regards,<br>
        Raghavan KL<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><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><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></div></blockquote><div class="HOEnZb"><div class="h5">
<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>