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

# Limits per day problem - supply chain optimization algorithm

 0 I am planning to do a PhD in supply chain optimization. I want to solve a warehouse localization problem. I have 120 long, alt addresses in West Europe. I need to calculate distances when using a clustering algorithm, then use a grid to locate the best option for the warehouse. For this purpose I will need to calculate the distances approximately 120 thousand times. I think opensteetmap is the best option for this problem. Can anybody provide some information from what to start? For now I have an algorithm made with Wolfram Mathematica, However I didn’t find any openstreetmap scripts that would work with this software. Is there any finished application that I could use and communicate with it easily? E.g. googlemap api works, however it has a 2500 day limit and extra calculations would cost a lot. Is it possible to use simply a web link, that wouldn’t have any limitations? Maybe someone could provide it and for a few days turn off the limits for my IP address? If no, how should I use openstreetmap to solve this problem? Do I need to download the osm planet file and write the code to return the distance between A and B, or is there any completed solutions? I would need to remake the algorithm with another programming language in this case. I would be really grateful for any advice or help, thank you in advanced asked 28 Nov '15, 18:08 ValentasG 11●2●2●3 accept rate: 0% See also http://forum.openstreetmap.org/viewtopic.php?pid=563563#p563563 (crosspost) (28 Nov '15, 20:03) SomeoneElse ♦

 2 I'm assuming by distance, you're talking about road length distance or travel time. If you're after direct line distance, this can easily be calculated by simple math from the latitude and longitude. OSRM offers a table query which would probably reduce the number of calls you need to make. Their usage policy seems to allow you to do this with the publicly available server, but if you wanted to run your own server you could do it and you'd only need to load data for the part of Western Europe you need. answered 30 Nov '15, 17:44 pnorman 2.4k●5●21●40 accept rate: 18% Yes I am talking about the distance and travel time between. I am using now a simply, math formula, however for a correct optimization algorithm I need real distances between points. I understand that I need to do offline routing, because I will need to make requests about 120 thousand times. Otherwise, my IP should get blocked. I have finished a algorithm with Wolfram Mathematica, I am working with googlemaps API distdata = Import["http://maps.googleapis.com/maps/api/directions/json?origin=" <> from <> "&destination=" <> to <> "®ion=es&sensor=false", {"HTML", "Source"}]; roadDistance = StringSplit[StringSplit[distdata, ":"][[13]],","][[1]] travelTime = StringSplit[StringSplit[distdata, ":"][[16]], ","][[1]]" I would like similarly to googlemaps API provide longitude altitude coordinates for point A and B and receive back the distance and travel time for car/truck type vehicle. I have a recommendation to use GraphHopper with Java script. Launching a server would be difficult in this case. It is not necessary to rewrite my algorithm with Java script? Communication between Wolfram Mathematica and OSM should be possible? But how should I do it? (30 Nov '15, 19:18) ValentasG 1 Please note that there is no free solution based on OSM that allows you to make that many requests. It costs money to run a server with the whole planet dump and to provide bandwidth for so many requests. I think you either have to run your local server (and thus pay the cost) or pay for a geocoding solution. See Frederiks comment on https://help.openstreetmap.org/questions/46914/nominatim-alternative which states the same (01 Dec '15, 06:09) escada
 3 There might be web routing algorithms that aren't protectd well enough to kick you out when you make 120k requests but you really shouldn't. It is much better - and it is the beauty of OSM that this is possible - to download the data and run your own routing software on it. There's Europe-only data extracts e.g. at download.geofabrik.de, and you can easily feed them into OSRM or Graphhopper - both free and open source routing engines that work with OSM data out of the box. Both have a HTTP API that you could use locally, but OSRM is in C++ with NodeJS bindings and Graphhopper is in Java, so it would probably be possible to integrate them into your application in a more direct fashion. answered 28 Nov '15, 20:59 Frederik Ramm ♦ 82.5k●92●720●1273 accept rate: 23% Thank you Frederik for your replay. When I used googlemaps API, I simply provided the long and alt coordinates and the API returned the distance. As I understand I can do the same thing by hosting a local map API on my own computer? Or I will need to rewrite my algorithm with C++ or Java? I have checked graphhopper and it should be just the thing that I need, however as I understood I have still a query limit? "To increase your query limits for production you pay online within a few minutes via credit card or debit advice." As a free user I have the same amount as with googlemap api "500 per day". Or if I use a local computer the limits won't concern me? I am downloading europe-latest.osm.pbf file, so thank you again for the tips :) (28 Nov '15, 21:35) ValentasG 1 The limit doesn't apply for a local installation, of course. (29 Nov '15, 09:06) scai ♦ I think there's one basic Graphhopper package and one API package, and if you install the API then you can access your own local Graphhopper through a web API just like you did with Google. And no, there won't be limits other than how fast your hardware can go ;) (29 Nov '15, 14:55) Frederik Ramm ♦

### 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:

×14
×6
×2
×2

question asked: 28 Nov '15, 18:08

question was seen: 4,956 times

last updated: 01 Dec '15, 06:09

### Related questions

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