Routing using Open Source

 
Post new topic   Reply to topic    PHP User Group Malta Forum Index // Describe the project
View previous topic :: View next topic  
Author Message
yancho
Site Admin


Joined: 13 Nov 2007
Posts: 58
Location: Iklin

PostPosted: Tue Nov 13, 2007 11:09 am    Post subject: Routing using Open Source Reply with quote
I am preparing to build up a GIS system as part of my University Masters Thesis. My final aim is to build a system where the user inputs (or via GPS) inputs the location where he is and the location where he want to go and gets the route planned. My main concern will be that the driver can decide which route to take, if the shortest distance, least time consuming or else least fuel consumption. Also the route planned has to be aware of certain problems that the network can find, for example road blocks, or some other type of incidents / accidents. May I point out that I need to use only Open Source Software.

I am think to use this algorithm to work with :
1. User inputs starting and ending
2. A script checks the options sent by the user
3. The streets which are "blocked" by something are mentioned as inactive
4. A route is planned
5. The route is sent as an image to user
6. Wait 20 seconds
7. If start = end goto 10 Else :
8. Reread position (maybe using GPS.. or random new coordinates from the map)
9. Go back to step 3
10. Send a msg : Thanks for driving safely or some other msg Smile


Now, from the research I have done, it seems I need these Open Source software, and this is what I got the presumption they will suffice for :

PostgreSQL + PostGIS : Basically where to store the data GRASS : For data Management QGis (with GRASS extension) : Frontend for viewing the data pgRouting : To create the route OpenLayers : To create the image to be sent to the user's browser. I want a static image which then will be updated every lets say 20 seconds.
PHP : To write the scripts to communicate with the PostGIS / User + HTML 4.0

What do you think about my setup please? Is there some software you think I should replace or rethink about using? Following my algorithm and the software I am looking at, I think that I need to do like this :
a. A script in PHP which captures the data and then echo the image using OpenLayers to the user's browser b. QGIS (with the save file of the base-map and the roads marked) which allows the Road Network Admin to disable any Road, and another PHP Script that can read the starting, ending coordinates of the road and allow a User to report that there are problems in the road.

Any comments / suggestions / change of plans would be extremely appreciated at this stage,

Whilst thanking all of you for taking time to read this post, I really wish to hear your opinions.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
maldman



Joined: 13 Nov 2007
Posts: 7

PostPosted: Tue Nov 13, 2007 4:24 pm    Post subject: Reply with quote
sounds interesting but where will the user be using this system? like at home on the computer or from a car unit?
Back to top
View user's profile Send private message
yancho
Site Admin


Joined: 13 Nov 2007
Posts: 58
Location: Iklin

PostPosted: Tue Nov 13, 2007 6:14 pm    Post subject: Reply with quote
from any mobile device which can access internet and has a browser that accept an image .. also the user needs somehow to give the start / end of journey Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
maldman



Joined: 13 Nov 2007
Posts: 7

PostPosted: Tue Nov 13, 2007 6:29 pm    Post subject: Reply with quote
yancho wrote:
from any mobile device which can access internet and has a browser that accept an image .. also the user needs somehow to give the start / end of journey Very Happy


just make him click on the map to indicate a start position and the same for an end position. quite simple to do
Back to top
View user's profile Send private message
Christian Sciberras



Joined: 11 Jan 2008
Posts: 8
Location: Malta

PostPosted: Wed Jan 16, 2008 11:53 pm    Post subject: Reply with quote
Quote:
just make him click on the map to indicate a start position and the same for an end position. quite simple to do

With what exactly?
Java - Nah it is device dependent, and of course requires Java knowledge.
HTML (image map) - Might get too complicated, imagine finding the route from all those streets. I'm not really sure mobiles support maps anyway.
I suggest entering the data from a textbox and put a sort of server-side parser (probably with php).
More of a pre-processor then a parser. For example, it finds the street from a list of lower case streets. Also make it work it in query style, example entering house name / number, street and village (you know many houses share the same name, the major difference is in the street).
Finding the correct route might get difficult. I suggest you use A* (a-star or astar) pathfinding. I've seen some of it's use, quite impressive personally.
The thing about the loop, I suggest maybe you should use cookies? or session ids? (I suggest you use cookies). Then put an infinite meta-refresh loop until the user is at the end point.
I think you can redownload a particular part of a page with JS without actually reloading it, I think I saw it done on images, maybe you might want to use that?
Try both methods and see which one is faster and smoother.
Good luck!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
yancho
Site Admin


Joined: 13 Nov 2007
Posts: 58
Location: Iklin

PostPosted: Thu Jan 17, 2008 8:58 am    Post subject: Reply with quote
Christian Sciberras wrote:
Quote:
just make him click on the map to indicate a start position and the same for an end position. quite simple to do

With what exactly?
Java - Nah it is device dependent, and of course requires Java knowledge.

www.Openlayers.org - Javascript library working upon Mapserver
Quote:

HTML (image map) - Might get too complicated, imagine finding the route from all those streets. I'm not really sure mobiles support maps anyway.

Thats why im using a website for my project .. and most browsers do support Javascript so should be ok Smile

Quote:

I suggest entering the data from a textbox and put a sort of server-side parser (probably with php).

The project will generate a random point on the map to represent where the user is - it is not a real project so certain assumptions are allowed

Quote:

More of a pre-processor then a parser. For example, it finds the street from a list of lower case streets.

Also make it work it in query style, example entering house name / number, street and village (you know many houses share the same name, the major difference is in the street).

The user will just need to input the final destination - but u gave me an idea .. I might use geocoding for that Smile - but then again a street can be really long .. how will I stop routing on it? :S

Quote:

Finding the correct route might get difficult. I suggest you use A* (a-star or astar) pathfinding. I've seen some of it's use, quite impressive personally.

Using http://pgrouting.postlbs.org 's own Shooting * - which is more useful than A* coz it uses parameters Smile

Quote:

The thing about the loop, I suggest maybe you should use cookies? or session ids? (I suggest you use cookies). Then put an infinite meta-refresh loop until the user is at the end point.
I think you can redownload a particular part of a page with JS without actually reloading it, I think I saw it done on images, maybe you might want to use that? Try both methods and see which one is faster and smoother.

Using XHTMLRequest Smile refreshing from a mixture of XML / Temporary table / Log files

Quote:

Good luck!

Thnkas Smile Will post more info as I finish it Smile

Btw - for those interested once the thesis is finished I'm releasing it for public knowledge Smile - so rest assured I'm going to post the link here Smile
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
Post new topic   Reply to topic    PHP User Group Malta Forum Index // Describe the project All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

alexisRed v1.2 // Theme Created By: Andrew Charron and Web Hosting Bluebook // Icons in Part By: Travis Carden
Boards optimised using the phpBB-SEO mod found at phpbb-seo.com
Boards hosted courtesy of solutions-lab.net
Link Backs : PHPClasses.org - MT Page :: PHPUsergroups.org - MT Page



Powered by phpBB © 2001, 2002 phpBB Group