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


Hi there,

I'm trying to develop a mobile application, like a GPS, but instead of only plan routes based on distance/traffic/etc , I also want to plan the best path based on my own routing type. I think I could do this with OSM services, but I don't know how. Do you know what services should I use to? I think the best strategy is first - load the maps, second - convert it to a graph , third - apply weights , fourth - use routing algorithms. What do you think about it?


asked 26 Jul '14, 18:13

CarlosPiedade's gravatar image

accept rate: 0%

edited 31 Jul '14, 21:15

I'm not sure if this is a question that is related to OSM. Usually I would point you to stackexchange or stackoverflow instead.

Anyway, first you need to specify your application on a module/component level. Here it seems to be:

  • map rendering and interaction
  • routing strategies
  • online services (3rd party or self hosted) or offline
  • position providers

Concering the routing, you should have a look at the routers list and pick the one who fits best. Otherwise you might try to work with an offline framework for your desired platform.

permanent link

answered 26 Jul '14, 20:08

iii's gravatar image

accept rate: 10%



  1. I know that OpenRouteService supported "by safety" as criteria per routing profile
  2. I don't know any routing service that publishes the routing graph -> setup your own instance
  3. Please see my links above
  4. So you need to setup your own instance or use integrated solutions as Navit, ...
(27 Jul '14, 15:09) iii

IMHO the most challenging part will be to merge the existing OSM data with the insurance data to have one common data model to work with (but please don't upload that data to OSM!). This depends quite a bit on the format you got from the insurance company (maybe you could provide some pointers to the format to get some more precise hints).

Usually you would start with a Geofabrik Extract of the region in question and then you need to figure out how to map the insurance data on existing OSM ways or nodes. Possibly you would add your own "safety tags" to your local OSM extract and use those artificial tags for routing decisions. Depending on your interpretation of your own tags, certain values could block a street altogether (compare to "access=no") or add a severe penalty to it (like "maxspeed=1"), so that a router will either completely ignore a way or use it with a much lower prio.

The rest is not really rocket science, iii already mentioned a number of pointers. OSRM, GraphHopper and BRouter come to mind, which are all fairly easily customizable to your requirements and can be made to accept your artificial tags for routing decisions.

permanent link

answered 27 Jul '14, 17:11

mmd's gravatar image

accept rate: 37%

edited 27 Jul '14, 17:29


Hi Carlos, you’re asking allot besides OSM, a basic data scheme which enables you to build a map. If you want to go out and add accidents to a map based on OSM, please go ahead. Try to search in the hughe pile of maps based on OSM data collections, follow this link . Iii and mmd already pointed out some nice directions as well. To count the imported accidents you need some statistics and to import the insurance data onto your map a methode to translate it into a readable database. Did you consider to weight the accident rate by category as pedestrians and bicyclist ? And what about drunken drivers (colliding with obstacles, 1 motor vehicle only accidents) ?

(29 Jul '14, 13:36) Hendrikklaas

Carlos, with a statistical program and a database and you’ll be able to visualize anything on a GIS related map. Add weight or minimize a group to show it. If you can’t think of any method or program follow Stephan’s advice. For instance follow this link

(30 Jul '14, 00:13) Hendrikklaas

Carlos, a bit offtopic, some remarks for your your project; Pin pointing of accidents by the police isn’t perfect: The Insurance companies work with a data sheet made by civilians: Civilians even don’t know in which civil community the accident happened nor where: How do you want to reach a certain level of accuracy, based on such a database ?

permanent link

answered 28 Jul '14, 14:04

Hendrikklaas's gravatar image

accept rate: 5%

edited 28 Jul '14, 14:06

Maybe you can try to visualize your basic data about accidents via cartoDB.

What I have seen so far, that webservice has really a lot of display features for all kinds of data on a map ... but no routing feature.

Did you ever had a look at professional OSM service companies? Maybe some of them can develop a solution.

permanent link

answered 29 Jul '14, 17:32

stephan75's gravatar image

accept rate: 6%

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 26 Jul '14, 18:13

question was seen: 11,424 times

last updated: 31 Jul '14, 21:15

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