[pgrouting-dev] How to build a web application using pgRouting for solving traffic problem

Dear all,
I 'm a newbie in GIS and pgRounting.I have a problem and can you support for me?
I 'm developping a web application.My desire is buiding a web with this functions:
1.Find shortest path in any time( support for traffic problem), “shortest” mean time,cost…
2.Allow me change data.
This is similar google map,but I want to use my data(download from OpenStreetMap),and use pgRoungting to route in that data,then use Google Map API for display the result.
Can you help me? how to use pgRouting in OpenStreetMap data? How to change data? How to return result similarly google?
Ex : When I find shortest path in Google Map,they draw path in map and a set of drections:
1.Turn left A 100m
2.Turn right B 200m
3.Go ahead C 300m
Can pgRouting do that?

Thank for read my email !I hope you support me early.
PS: Sorry if my English is bad!

Vũ Khắc Tín
K53,Department of Software Engineering ,
School of Information and Communication Technology, http://soict.hut.edu.vn/
Hanoi University of Science and Technology,Vietnam, http://www.hut.edu.vn
Email: tinvukhac@gmail.com
Y!ID: Xitrum_rapper91
Skype: vu.khac.tin
Mobile: +84 168 990 4684

Probably this is a good start: http://workshop.pgrouting.org/

Daniel

2011/5/6 Vũ Khắc Tín <tinvukhac@gmail.com>

Dear all,
I 'm a newbie in GIS and pgRounting.I have a problem and can you support for me?
I 'm developping a web application.My desire is buiding a web with this functions:
1.Find shortest path in any time( support for traffic problem), “shortest” mean time,cost…
2.Allow me change data.
This is similar google map,but I want to use my data(download from OpenStreetMap),and use pgRoungting to route in that data,then use Google Map API for display the result.
Can you help me? how to use pgRouting in OpenStreetMap data? How to change data? How to return result similarly google?
Ex : When I find shortest path in Google Map,they draw path in map and a set of drections:
1.Turn left A 100m
2.Turn right B 200m
3.Go ahead C 300m
Can pgRouting do that?

Thank for read my email !I hope you support me early.
PS: Sorry if my English is bad!

Vũ Khắc Tín
K53,Department of Software Engineering ,
School of Information and Communication Technology, http://soict.hut.edu.vn/
Hanoi University of Science and Technology,Vietnam, http://www.hut.edu.vn
Email: tinvukhac@gmail.com
Y!ID: Xitrum_rapper91
Skype: vu.khac.tin
Mobile: +84 168 990 4684


pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

On 5/6/2011 3:53 AM, Daniel Kastl wrote:

Probably this is a good start: http://workshop.pgrouting.org/

<http://workshop.pgrouting.org/&gt;Daniel

Yup, start here and break your project down into a series of steps like:

1. load the data
2. prepare the data
3. get a simple test working with your data
4. look at the list archives for how to generate textual driving directions this will require extra work
5. editing the data - all the data is in DB tables so it is accessible to changes, but you will need to think through how you want to build a application that allows editing of the data - review the prepare data steps

see more inline below ...

2011/5/6 Vũ Khắc Tín <tinvukhac@gmail.com <mailto:tinvukhac@gmail.com>>

    Dear all,
    I 'm a newbie in GIS and pgRounting.I have a problem and can you
    support for me?
    I 'm developping a web application.My desire is buiding a web with
    this functions:

Look at using OpenLayers for a Javascript API for mapping and to build your application GUI in. This supports Google but also allows you to build an application the is not locked into one vendor.

    1.Find shortest path in any time( support for traffic problem),
    "shortest" mean time,cost...

By traffic to you mean getting traffic feeds and dynamically adjusting segment speeds? or are you just trying to say your want to solve general vehicle routing problems?

    2.Allow me change data.
    This is similar google map,but I want to use my data(download from
    OpenStreetMap),and use pgRoungting to route in that data,then use
    Google Map API for display the result.

See my order of steps above. You will have to design and build an application that interacts with the user making changes and generate ajax requests to some server code that updates the database, then refresh you screen to the changes from the database.

    Can you help me? how to use pgRouting in OpenStreetMap data?

There are some tools the support loading OpenStreetMap data into pgRouting:

http://www.google.com/#q=osm2pgrouting

How to
    change data? How to return result similarly google?
    Ex : When I find shortest path in Google Map,they draw path in map
    and a set of drections:
                   1.Turn left A 100m
                   2.Turn right B 200m
                   3.Go ahead C 300m
    Can pgRouting do that?

pgRouting does not do this out of the box, but it is possible to do it and has been discussed in the list. search the list archives for "driving directions". You can look at an example I built here:

http://tinyurl.com/3dz7zbk

Summary, You can do all of this but the project you have outline is very big and you need to break it down into smaller pieces that you can focus on one at a time. Some of the steps are not supported directly and those you will have to write yourself. You will need skills in Javascript, Openlayers, postgresql/postgis, pgrouting, and writing ajax handlers (I use php for this).

Hope this helps,
   -Steve

    Thank for read my email !I hope you support me early.
    PS: Sorry if my English is bad!
    --
    Vũ Khắc Tín
    K53,Department of Software Engineering ,
    School of Information and Communication Technology,
    http://soict.hut.edu.vn/
    Hanoi University of Science and Technology,Vietnam,
    http://www.hut.edu.vn/&gt;
    Email: tinvukhac@gmail.com <mailto:tinvukhac@gmail.com>
    Y!ID: Xitrum_rapper91
    Skype: vu.khac.tin
    Mobile: +84 168 990 4684