Isochrones maximum range distance

Hi everyone,

I was testing the isochrones feature. With the default configuration values, it works perfectly. However, when I tried increasing the maximum_range_distance to 600 km, I encountered an issue during the graph-building process.
Any help would be greatly appreciated!

Here is the error message:

2025-04-01 21:02:08 ERROR main [ o.s.b.d.LoggingFailureAnalysisReporter ]


APPLICATION FAILED TO START


Description:

Failed to bind properties under ‘ors.endpoints.isochrones.maximum-range-distance’ to java.util.List<org.heigit.ors.api.config.EndpointsProperties$MaximumRangeProperties$MaximumRangePropertiesEntry>:

Property: ors.endpoints.isochrones.maximum-range-distance
Value: "600000"
Origin: System Environment Property "ors.endpoints.isochrones.maximum_range_distance"
Reason: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.util.List<org.heigit.ors.api.config.EndpointsProperties$MaximumRangeProperties$MaximumRangePropertiesEntry>]

Action:

Update your application’s configuration

Here is my docker run options:
docker run -dt --name ors-app
-p 8080:8082
-p 9001:9001
-v $PWD/ors-docker/config:/home/ors/config
-v $PWD/ors-docker/elevation_cache:/home/ors/elevation_cache
-v $PWD/ors-docker/graphs:/home/ors/graphs
-v $PWD/ors-docker/files:/home/ors/files
-v $PWD/ors-docker/logs:/home/ors/logs
-e “XMS=6g”
-e “XMX=8g”
-e ADDITIONAL_JAVA_OPTS=“”
-e REBUILD_GRAPHS=True
-e CONTAINER_LOG_LEVEL=DEBUG
-e “ors.engine.profile_default.build.source_file=files/france-benelux-swiss-latest.osm.pbf”
-e “ors.engine.profile_default.service.maximum_distance=2000000”
-e “ors.engine.profile_default.service.maximum_distance_dynamic_weights=2000000”
-e “ors.engine.profile_default.service.maximum_distance_avoid_areas=2000000”
-e “ors.endpoints.isochrones.maximum_range_distance=600000”
openrouteservice/openrouteservice:latest

Hi Akira,

thanks for reaching out! :+1:

In order to set the maximum range in meters across all profiles please use

-e "ors.endpoints.isochrones.maximum_range_distance_default=600000"

The default value specified above can be overridden for a subset of profiles like in the following example. For more details please refer to the documentation.

-e "ors.endpoints.isochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv"
-e "ors.endpoints.isochrones.maximum_range_distance.0.value=900000"

Cheers,
Andrzej

Hi @Andrzej,

Thanks for your help! It’s working now.

However, I am currently facing an issue: I am not receiving any response for queries like this one:

curl -X POST 'http://localhost:8080/ors/v2/isochrones/driving-car' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \
  -d '{
    "locations": [[4.697593,45.897056]],
    "area_units": "km",
    "range_type": "distance",
    "range": [200000],
    "interval": 200000
  }' | jq
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   325    0   212    0   113      0      0 --:--:--  0:24:09 --:--:--    57
{
  "error": {
    "message": "Handler dispatch failed: java.lang.OutOfMemoryError: Java heap space"
  },
  "info": {
    "engine": {
      "build_date": "2025-01-29T12:32:30Z",
      "graph_version": "1",
      "version": "9.1.0"
    },
    "timestamp": 1743622514159
  }
}

It seems like a java.lang.OutOfMemoryError is causing the failure. Do you have any suggestions on how to fix this issue?

Thanks in advance!

Great, I’m glad to hear that the original issue has been resolved! :tada:

Regarding the java.lang.OutOfMemoryError you could try increasing the Java VM heap space by adjusting the following values that correspond to gigabytes of your available RAM.

OK, thanks. However, my main concern is the response time.

24 minutes is far too long.

Do you have any suggestions for speeding up the process?

Fair point, thanks for your feedback! :+1:

You might want to try enabling the so-called fastisochrones algorithm. While it has higher memory requirements it is intended to speed-up long distance isochrone calculations, which seems to be your use case. Please note that the graph build time will increase with fastisochrones enabled.

In order to enable fastisochrones and set their maximum range distance for a given profile, say driving-car, use the following configuration parameters:

-e "ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.profiles=driving-car"
-e "ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.value=900000"
-e "ors.engine.profiles.driving-car.build.preparation.methods.fastisochrones.enabled=true"
-e "ors.engine.profiles.driving-car.build.preparation.methods.fastisochrones.weightings=shortest"