Hello and welcome ! OSM wasn't really designed with routing in mind. Postgis neither. The converter just represents the geometry and you need some parsing on top of it.
If you want to do some routing, you have to use your own parser, or use something existing. A simple approach is the tool provided by pgrouting (if you want to keep using postgis). Otherwise, look at the parsers of all the different routing tools. They have different qualities (like being very compact binary with fast access, the data for precise routing in real life, ...).I'm working right now on using the OSM data to provide instance for research on routing algorithms. The data is quite simplified, so not very good for an actual routing tool, but hopefully simple enough to be easily used. Here is the code hosted : http://github.com/Tristramg/MOSPP-instances I could use some feedback to know what is missing to become really usefull.
Good luck ! On Wed, Jul 8, 2009 at 12:34 PM, IbrahimB22<[email protected]> wrote:
Hi all, My name is Ibrahim and I'm new to this community. I am currently working on my thesis, but I'm having some difficulties figuring out how the osm file is structured. I downloaded the osm file for Belgium, and then I converted it to a postgis database using osm2pgsql. I am supposed to build a routing application, so I should be able to select locations by coordinates, or by inserting a street name of location name. What I don't understand though, is how the data is structured in relation to each other. The data is divided in 4 tables, Point, Road, Line, Polygon. Now I figure that Point just symbolizes a POI with coordinates. On the other hand, I don't understand what the difference is between the Road table and the Line table, nor what the Polygon table really symbolizes. And how are the tables linked? I just can't seem to figure how I can find out which Points belong to which Road/Line/Polygon. (In other words, which column defines the foreign key?) All in all, I have to say, is that I'm really confused by this. Tnx in advance! -- View this message in context: http://www.nabble.com/Having-problems-with-osm-data-structure-tp24389074p24389074.html Sent from the OpenStreetMap - Routing mailing list archive at Nabble.com. _______________________________________________ Routing mailing list [email protected] http://lists.openstreetmap.org/listinfo/routing
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Routing mailing list [email protected] http://lists.openstreetmap.org/listinfo/routing
