NOTICE: help.openstreetmap.org is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum

I am using the openstreet api to get the duration matrix of the trip from one point to another, setting the origin as the first parameter and the destinations to the rest of parameters. However, the limit is 100 total(including origin and destinations).

Is there a way to increase this limit, and if so, how can I do so? Thanks.

asked 26 Jul '23, 14:22

HowsyWorldd's gravatar image

HowsyWorldd
16112
accept rate: 0%

1

the openstreet api

Which API are you actually calling? I'm guessing your calling some sort of router? What is normally referred to as "the OSM API" is just for editing.

(26 Jul '23, 14:26) SomeoneElse ♦

Presumably you have some code and that code calls "something"? What is the "something"?

(26 Jul '23, 14:55) SomeoneElse ♦

From the URL it appears like the software you are interacting with is OSRM (https://github.com/Project-OSRM/osrm-backend). When the OSRM server is started, you can specify the maximum matrix size on the command line. 100 is the default.

Apparently you are using a service operated by solucionait.es - you would have to ask them if they can increase the limit for you. If they cannot, then you can run the OSRM software yourself with an increased limit - both the data and the software are open - or you can ask another provider to do that for you.

Note that you are using ~ 20 characters per coordinate pair in your request and there are limits to the length of a GET URL. What exactly the limit is depends on which pieces of software your provider has put between you and OSRM; it is relatively safe that 200 coordinate pairs (4k characters) will work, but at 350 or 400 coordinate pairs (8k characters) you'll very likely hit a brick wall and you will then have to consider POST requests or using Google polyline encoding.

permanent link

answered 26 Jul '23, 15:11

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Your answer
toggle preview

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:

×290
×63
×29
×6

question asked: 26 Jul '23, 14:22

question was seen: 466 times

last updated: 26 Jul '23, 15:11

NOTICE: help.openstreetmap.org is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum