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

I am a developer need to find if the truck is going on-road and off-road for waste management application. So that i need draw a route based on lat and lat. In that i need to find if traveled route(road) is public or private road.

If it is possible to get details of route details in OSM or any other ways to do this. please suggest.Thanks

asked 25 Oct '16, 13:53

Ranjeet8530's gravatar image

Ranjeet8530
9225
accept rate: 0%


You will first have to match the GPX trace of the truck to the OSM street network. This is often called "map matching", and both well-known OSM routing engines Graphhopper and OSRM support it. You will want to install one of them on your system and load the relevant OSM data into it. Performing the map matching yields a sequence of graph edges (most likely) traversed by the vehicle, and you can then look at the properties of these edges to find out whether they are public or private roads.

NB not all routing engines/routing profiles will even route over private roads - a road marked private without explicit access for motor vehicles will often be ignored for routing. Also, before you even start, perhaps you should ensure that private roads are actually marked as such in OSM in the area you are interested in; otherwise you might as well not bother.

Last not least, remember that in executing this map matching, the resulting list of edges and the public/private information is a database derived from OpenStreetMap and hence subject to the ODbL share alike license, which depending on your exact use case may mean that you have to make the data available under the ODbL license, and make users aware that data comes from OSM.

permanent link

answered 25 Oct '16, 14:20

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

I am new to OSM map. I need to implement using javascript for web application Can you please suggest me. How do i start map matching any reference link API.

(02 Nov '16, 04:58) Ranjeet8530
3

"OSM" is essentially just a big pile of data which people have written software to process.

I'd start by looking at previous questions here and elsewhere that mention "graph". You aren't going to find any magic javascript that will solve your problem without you understanding it; you'll have spend a little time understanding how OSM data is represented and how to process it first.

(02 Nov '16, 06:48) SomeoneElse ♦

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:

×5
×2

question asked: 25 Oct '16, 13:53

question was seen: 2,331 times

last updated: 02 Nov '16, 06:48

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