NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

pmcgrath_1
11112
accept rate: 0%

edited 06 Feb '15, 10:30

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 ?

(12 Feb '15, 19:39) pmcgrath_1
2
  1. 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?

  2. 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

(13 Feb '15, 12:23) stephan75

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

(13 Feb '15, 12:34) pmcgrath_1
2

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.

(13 Feb '15, 13:05) Richard ♦

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

(13 Feb '15, 13:36) 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)

permanent link

answered 06 Feb '15, 11:20

rorym's gravatar image

rorym
5.4k1449100
accept rate: 11%

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 highway tags.

permanent link

answered 06 Feb '15, 12:06

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554
accept rate: 18%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×305
×230
×223
×12

question asked: 06 Feb '15, 10:30

question was seen: 9,064 times

last updated: 13 Feb '15, 13:36

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum