InDashPC.org Forum Index InDashPC.org
In Dash Car PC forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Vector Data in MySQL

 
Post new topic   Reply to topic    InDashPC.org Forum Index -> GPS
View previous topic :: View next topic  
Author Message
s003apr
Newbie


Joined: 07 Jul 2005
Posts: 6

PostPosted: Thu Jul 07, 2005 5:20 pm    Post subject: Vector Data in MySQL Reply with quote

Just released some python scripts that will allow for porting Tiger Road data into MySQL. This results in very fast spatial searches. If someone was willing to work on a way of graphically displaying this data then it would fit in very well with PyCar as pygame would be perfectly suited for the job. PyGame supports 2D graphics, could also be used for displaying road data from a 3D perspective.

Jbors,
I have talked with you in the past on mp3car about the project. I have changed directions from using Gigabase to using MySQL which really made things a lot simpler.

http://sourceforge.net/projects/navdb/

I may also contact developers working on projects like Roadnav to see if they would be interested in this as an alternative to Tiger Files.
Back to top
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Fri Jul 08, 2005 11:24 am    Post subject: Reply with quote

Cool.
I was also looking into the MySQL db for that. I was thinking making graphical part in a very simple fashion using either OpenGL or DirectFB extension for rendering mesh data.
Will check your project for a strong backend support. Thanks.
Back to top
View user's profile Send private message
s003apr
Newbie


Joined: 07 Jul 2005
Posts: 6

PostPosted: Tue Jul 19, 2005 6:00 pm    Post subject: Reply with quote

jbors wrote:
Cool.
I was also looking into the MySQL db for that. I was thinking making graphical part in a very simple fashion using either OpenGL or DirectFB extension for rendering mesh data.
Will check your project for a strong backend support. Thanks.

jbors,
If you get the chance to check it out, let me know what you think. I take criticism well.
When created the database currently contains 5 tables:
Roads 1- Primary Roads with limited access
Roads2 - Primary Roads with non-limited access
Roads3 - Secondary/Connnecting Roads
Roads4 - Local/ Neighborhood Roads
Ramps - Access Ramps.

The reason I chose this layout is because one of my goals was to be able to single out major roads when mapping/routing large areas, had I included all of the roads into a single table, a large amount of sorting would be necessary to extract just the major roads.

Tonight I finished a demo program to draw an SVG image from a specified location. It is in the demos module of the CVS. It is a good example of how to access the database with python. I will add it to the file release page within a couple days. Turns out the SVG (Scalable Vector Graphics) is really useful for representing vector data Wink

The speed of the database is impressive:
I created a sample database made up of Ohio, Michigan, Indiana, Kentucky, West Virginia, and Pennsyvania. In total in contains roughly 4.6 million records and when using spatial indexing I am able to retrieve a 5x5 mile area and generate an SVG image in under 1 second, even when the program is written entirely in python.

The next thing on my list is to write some documentation/tutorials to assist others in accessing the database data.

Since you mentioned OpenGL I would like to mention a few ideas that have been running through my head. One is the use of a scene graph. Eventually I hope to incorporate information like terrain data into the database in hopes of creating better 3-D views of the maps. A second is the idea of overlaying a video feed with a 3-D representation of the roads. If a USB camera can be mounted on the car, then in theory the virtual camera existing in the scene graph can be set to the same location/angle with respect to the GPS as the real world camera resulting in a 3-D map that overlays the real-world picture.
Back to top
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Wed Jul 20, 2005 7:37 am    Post subject: Reply with quote

Great progress !
I did not have time to work on my stuff yet or check yours. Will work after I send the adapters out this week. Will get back to you thiw weekend.
Thanks.
Back to top
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Sun Jul 24, 2005 8:13 pm    Post subject: Reply with quote

s003apr: I tried to get the project's files. Can you please let me know what I should do to try to generat SVG image ? I have Tiger data installed for CA.
Back to top
View user's profile Send private message
s003apr
Newbie


Joined: 07 Jul 2005
Posts: 6

PostPosted: Sat Jul 30, 2005 12:23 pm    Post subject: Reply with quote

The SVG program is in the seperate package called "demos". Keep in mind that it is just a demo so that others can observe how to query the database. The image displayed will only have the roads with no indication of size of road or road names.

The demos folder contains the make-svg python scripts and a README that tells how to use it.

Just an update on other progress:
I am now working on some tables which relate city,states, and zipcodes with a geographical location. This will assist in Address Lookups. Given State and City you will be able to find relevant zipcodes. You can use the coordinates to go directly to cities or you can use the zipcode to query for a specific road. Before I make the next release I plan to also make another demo which demonstrates how to translate address info into lat/lon coordinates.

I am using Sourceforge's Document management to store instructions, manual, and tutorials for the time being.

I currently have a very basic tutorial where the formatting did not all come out correctly on the conversion to html.
http://sourceforge.net/docman/index.php?group_id=131245
Back to top
View user's profile Send private message
s003apr
Newbie


Joined: 07 Jul 2005
Posts: 6

PostPosted: Sat Jul 30, 2005 2:53 pm    Post subject: Reply with quote

jbors wrote:
s003apr: I tried to get the project's files. Can you please let me know what I should do to try to generat SVG image ? I have Tiger data installed for CA.


Reading your comment over, I guess I may not have answered it. I assume that you have used tig2sqlpy to extract road data from the tiger files and store them in a MySQL database. If not, then you need to get it from the main project page here:

http://sourceforge.net/projects/navdb/

The Readme file walks you through loading the data to MySQL.

You can also download the demo package which contains "make-svg" which is a couple python scripts.

For both programs you need to edit a .ini configuration file which contains the parameters needed to connect to the database.
Back to top
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Wed Aug 03, 2005 6:34 am    Post subject: Reply with quote

Let me try that this weekend.
Back to top
View user's profile Send private message
s003apr
Newbie


Joined: 07 Jul 2005
Posts: 6

PostPosted: Thu Aug 11, 2005 11:02 am    Post subject: Reply with quote

I have some documentation up on the project website.

http://navdb.sourceforge.net/docs/Devel_Tutorial/Devel_Tutorial.html

Right now it is a pretty involved process to get a working database. I think now that the basics of uploading the road data to the database is in place, I am going to distribute a backups of the database. That is easier to work with than trying to convert tiger files. I am guessing from your earlier comments that you are from CA. So I will make a CA database and distribute and sql backup on the project page. I will do another for OH since that is where I live. Then it will be very easy to replicate the database on your own computer.

If I can get some support behind the project and others start using it, then eventually what I would like to do is just distribute the entire US database via BitTorrent. From there things can even be changed so that data can be directly taken from master servers over the internet and replicated on slave databases on individual computers.

The database now has city, state, and zipcode tables that can support address lookups. I have added another demo to the demo project that shows how address lookups can be performed.
Back to top
View user's profile Send private message
reginaliya



Joined: 09 Jun 2009
Posts: 2

PostPosted: Sat Jun 13, 2009 2:27 am    Post subject: Reply with quote

THANKS FOR THE SUGGESTION
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    InDashPC.org Forum Index -> GPS All times are GMT - 8 Hours
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group