I am trying to extract road data to use to implement a shortest path routing algorithm like A* or Dijksktras, I have been using QGis to try and extract the road data from map but I am really not sure what data to extract as there is huge amounts of data. Can anyone help me out ? asked 06 Feb '15, 10:30 pmcgrath_1 |
If you want smaller amounts of data, you can download country (or region) specific extracts from Geofabrik download service. The OSM API can provide (much) smaller boxes of data. It really depends what you want to do. Do you want to write a routing algorithm from scratch? In which case you should look at the OSM XML schema (sometimes you will get PBF files) and learn about the OSM Data model. However, there are numerous existing routing software libraries that can be used with OSM data (e.g OSRM or GraphHopper) answered 06 Feb '15, 11:20 rorym I want to write an algorithm from scratch if possible, but I am struggling to extract the data that I will need to do this.
(06 Feb '15, 11:55)
pmcgrath_1
Take a look at tags and tags for routing. It will also be helpful to look at other existing routing engines that are based on OSM data.
(06 Feb '15, 12:05)
scai ♦
1
Once you've decided how large an area you want, have a read of this previous question: osm-xml-into-graph.
(06 Feb '15, 12:05)
SomeoneElse ♦
|
(regarding: "extract the road data from map but I am really not sure what data to extract" and "extract the data that I will need") rorym already linked the OSM data model. If you want roads only, you will want to filter the data to only have objects with specific answered 06 Feb '15, 12:06 aseerel4c26 ♦ |
Would it be possible for me to add my own roads to my own osm MAP ? I have added my area of Ireland to a postgres database and I plan on using pgrouting for routing, but would it be possible for me to add any new roads I find to the data and for them to considered when calculating the shortest path ?
When your "own" roads are based on a free data source, at least no licence breaking when using them for OSM purposes, why not adding them directly to the main OSM database?
by using an internet search engine I found the following hints:
https://help.openstreetmap.org/questions/10817/how-to-use-my-private-data-with-osm
http://inasafe.org/en/training/intermediate/osm/305-using-private-data-store.html
http://gis.stackexchange.com/questions/28898/conflate-merge-private-shapefile-data-with-osm-data
The purpose of the app is to allow the user to update the map and not have to wait on official updates from Osm, so they basically have their own version a map. Thanks for those links
If you add roads to your own copy of the OpenStreetMap database, and you host this on a publicly accessible website (or similar), note that the OSM database requires you to make these additional roads available to OSM on request.
I would have no problem making the data available for the OSM database, its just the primary function of this app is too allow the user to update their own map