How to use OpenStreetMap to get the distance between two points?

I am working on a vehicle routing program that should accurately determine the distance between different locations for a vehicle using .Net. I could use the Google API to get distances, but the company does not want to make at least 11,000 US dollars per year for a monthly fee, taking into account the volume of use.

I tried using the Haversin Formula to get distances, but the correction factor for the route is extremely high so that it even comes close to calculating the total trip time correctly. I spent quite a bit of time learning OpenStreetMaps, but there are no specific examples in the documentation that fit my requirements. I do not need the actual “tiles” to display the maps, just a textual answer with distance.

I was hoping there would be some free opportunity to use a service that I could use in OpenStreetMap or other similar ones, or maybe someone could point me in the right direction to get started.

Any help would be greatly appreciated.

+5
source share
4

, - , API OpenStreetMap.

+2

OpenStreetMap .

OpenStreetMap wiki , . #.

+2

OpenStreetMap.org . . - , OpenStreetMap, :

+1

API- CloudMade . PGRouting. PostGres/PostGIS, OSM - planet.osm.

0

All Articles