Hello Team
I need your help. I am new in openrouteservices. I am using docker composer to install and run openroutsernice on my ec2 instance.
I am face issue to run openrouteservice with specific region data like - United States of America. I have downloaded file on ec2 and I mapped .ors file path on ors-config.yml file. after restart docker composer I am not able to find 'co-ordinates between source and destination from United States of America region. Application is working with “example-heidelberg.osm.gz”
I am trying with this “washington-latest.osm.gz”.
If any one have running ors-config.yml could you please share if you can.
My source and destination:
{
"coordinates": [
[
-122.15582537239229,47.770980334045504
],
[
-122.20333265609547,47.759182119750484
]
]
}
error:
{
"error": {
"code": 2010,
"message": "Could not find routable point within a radius of 3000.0 meters of specified coordinate 0: -122.1558254 47.7709803."
},
"info": {
"engine": {
"build_date": "2024-10-09T09:23:42Z",
"version": "8.2.0"
},
"timestamp": 1728985585211
}
}
I search about openroutservice on google and found 1 site and on that site when I give same source and destination that site return co-ordinates.
I am trying to resolve this issue from last one week but not getting solution.
Please help me to resolve this.
This is my config file:
##### openrouteservice settings file #####
# This file contains parameters for openrouteservice.
# For a full list of possible parameters see https://giscience.github.io/openrouteservice/run-instance/configuration/
##### General server settings #####
#server:
# port: 8082
# error:
# whitelabel:
# enabled: false
# # Keep the context-path at / else the war file run with tomcat will have the context-path of /ors/v2 as well.
# servlet:
# context-path: /ors
# tomcat:
# keep-alive-timeout: 30000
#spring:
# profiles:
# active: default
# mvc:
# servlet:
# path: /
##### Settings related to springdoc #####
#springdoc:
# swagger-ui:
# enabled: true
# path: /swagger-ui
# tryItOutEnabled: true
# filter: false
# syntaxHighlight:
# activated: true
# showExtensions: true
# api-docs:
# path: /v2/api-docs
# version: OPENAPI_3_0
# packages-to-scan: org.heigit.ors
# pathsToMatch: /v2/**
##### Logging settings #####
#logging:
# file:
# name: ./logs/ors.log
# pattern:
# console: "%d{yyyy-MM-dd HH:mm:ss} %highlight{%-7p} %style{%50t}{Cyan} %style{[ %-40.40c{1.} ]}{Bright Cyan} %m%n"
# file: "%d{yyyy-MM-dd HH:mm:ss} %p [%-40.40c{1.}] - %m%n"
# level:
# root: WARN
# org.heigit: INFO
##### openrouteservice specific settings #####
ors:
# cors:
# allowed_origins: "*"
# allowed_headers: Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization
# preflight_max_age: 600
# messages:
# ##### ORS endpoints settings #####
endpoints:
routing:
enabled: true
# attribution: openrouteservice.org, OpenStreetMap contributors, tmc - BASt
# gpx_name: ORSRouting
# gpx_description: This is a directions instructions file as GPX, generated from openrouteservice
# gpx_base_url: https://openrouteservice.org/
# gpx_support_mail: support@openrouteservice.org
# gpx_author: openrouteservice
# gpx_content_licence: LGPL 3.0
# maximum_avoid_polygon_area: 200000000
# maximum_avoid_polygon_extent: 20000
# maximum_alternative_routes: 3
matrix:
enabled: true
# attribution: openrouteservice.org, OpenStreetMap contributors
maximum_routes: 2500
maximum_routes_flexible: 25
maximum_visited_nodes: 100000
maximum_search_radius: 2000
u_turn_costs: -1
isochrones:
enabled: true
# attribution: openrouteservice.org, OpenStreetMap contributors
maximum_locations: 2
maximum_intervals: 1
allow_compute_area: true
maximum_range_distance_default: 50000
maximum_range_distance:
- profiles: driving-car, driving-hgv
value: 100000
maximum_range_time_default: 18000
maximum_range_time:
- profiles: driving-car, driving-hgv
value: 3600
fastisochrones:
maximum_range_distance_default: 50000
maximum_range_distance:
- profiles: driving-car, driving-hgv
value: 500000
maximum_range_time_default: 18000
maximum_range_time:
- profiles: driving-car, driving-hgv
value: 10800
snap:
enabled: true
# attribution: openrouteservice.org, OpenStreetMap contributors
maximum_locations: 5000
# ##### ORS engine settings #####
engine:
source_file: /home/ors/files/washington-latest.osm.gz
# init_threads: 1
# preparation_mode: false
# graphs_root_path: ./graphs
# graphs_data_access: RAM_STORE
# elevation:
# preprocessed: false
# data_access: MMAP
# cache_clear: false
# provider: multi
# cache_path: ./elevation_cache
profile_default:
enabled: true
#elevation: true
#elevation_smoothing: false
#encoder_flags_size: 8
#instructions: true
#optimize: false
#traffic: false
maximum_distance: 100000
#maximum_distance_dynamic_weights: 100000
#maximum_distance_avoid_areas: 100000
maximum_waypoints: 50
maximum_snapping_radius: 3000
#maximum_distance_alternative_routes: 100000
#maximum_distance_round_trip_routes: 100000
#maximum_speed_lower_bound: 80
#maximum_visited_nodes: 1000000
#location_index_resolution: 500
# location_index_search_iterations: 4
# force_turn_costs: false
# interpolate_bridges_and_tunnels: true
# preparation:
# min_network_size: 200
# methods:
# lm:
# enabled: true
# threads: 1
# weightings: recommended,shortest
# landmarks: 16
# execution:
# methods:
# lm:
# active_landmarks: 8
profiles:
# # All properties defined in ors.engine.profile_default can also be set in each profile to overwrite the defaults profile-specific.
car:
profile: driving-car
# encoder_options:
# turn_costs: true
# block_fords: false
# use_acceleration: true
preparation:
min_network_size: 200
methods:
ch:
enabled: true
threads: 1
weightings: fastest
# lm:
# enabled: false
# threads: 1
# weightings: fastest,shortest
# landmarks: 16
# core:
# enabled: true
# threads: 1
# weightings: fastest,shortest
# landmarks: 64
# lmsets: highways;allow_all
# execution:
# methods:
# lm:
# active_landmarks: 6
# core:
# active_landmarks: 6
# ext_storages:
# WayCategory:
# HeavyVehicle:
# WaySurfaceType:
# Tollways:
# RoadAccessRestrictions:
# use_for_warnings: true
enabled: true
hgv:
profile: driving-hgv
enabled: true
encoder_options:
turn_costs: true
block_fords: false
use_acceleration: true
preparation:
min_network_size: 200
methods:
ch:
enabled: true
threads: 1
weightings: recommended
core:
enabled: true
threads: 1
weightings: recommended,shortest
landmarks: 64
lmsets: highways;allow_all
# execution:
# methods:
# core:
# active_landmarks: 6
# ext_storages:
# WayCategory:
# HeavyVehicle:
# restrictions: true
# WaySurfaceType:
# Tollways:
# bike-regular:
# profile: cycling-regular
# encoder_options:
# consider_elevation: true
# turn_costs: true
# block_fords: false
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# bike-mountain:
# profile: cycling-mountain
# encoder_options:
# consider_elevation: true
# turn_costs: true
# block_fords: false
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# bike-road:
# profile: cycling-road
# encoder_options:
# consider_elevation: true
# turn_costs: true
# block_fords: false
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# bike-electric:
# profile: cycling-electric
# encoder_options:
# consider_elevation: true
# turn_costs: true
# block_fords: false
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# walking:
# profile: foot-walking
# encoder_options:
# block_fords: false
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# hiking:
# profile: foot-hiking
# encoder_options:
# block_fords: false
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# wheelchair:
# profile: wheelchair
# encoder_options:
# block_fords: true
# maximum_snapping_radius: 50
# ext_storages:
# WayCategory:
# WaySurfaceType:
# Wheelchair:
# KerbsOnCrossings: true
# OsmId:
# public-transport:
# profile: public-transport
# encoder_options:
# block_fords: false
# elevation: true
# maximum_visited_nodes: 1000000
# gtfs_file: ./src/test/files/vrn_gtfs_cut.zip
This is my docker composer file:
# Docker Compose file for the openrouteservice (ORS) application
# Documentation and examples can be found on https://giscience.github.io/openrouteservice/run-instance/running-with-docker
version: '3.8'
services:
# ----------------- ORS application configuration ------------------- #
ors-app:
# Activate the following lines to build the container from the repository
# You have to add --build to the docker compose command to do so
build:
context: ./
container_name: ors-app
ports:
- "8080:8082" # Expose the ORS API on port 8080
- "9001:9001" # Expose additional port for monitoring (optional)
image: openrouteservice/openrouteservice:v8.2.0
# Advanced option! If you different ids to 0:0 and 1000:1000, you have to rebuild the container with the build args UID,GID.
# The user command is useful if you want easier bind mount access or better security.
#user: "1000:1000" # Run "mkdir -p ors-docker/config ors-docker/elevation_cache ors-docker/files ors-docker/graphs ors-docker/logs && sudo chown -R 1000:1000 ors" before starting the container!
volumes: # Mount relative directories. ONLY for local container runtime. To switch to docker managed volumes see 'Docker Volumes configuration' section below.
- ./ors-docker:/home/ors # Mount the ORS application directory (for logs, graphs, elevation_cache, etc.) into its own directory
#- ./graphs:/home/ors/graphs # Mount graphs directory individually
#- ./elevation_cache:/home/ors/elevation_cache # Mount elevation cache directory individually
#- ./config:/home/ors/config # Mount configuration directory individually
#- ./logs:/home/ors/logs # Mount logs directory individually
#- ./files:/home/ors/files # Mount files directory individually
environment:
REBUILD_GRAPHS: False # Set to True to rebuild graphs on container start.
CONTAINER_LOG_LEVEL: INFO # Log level for the container. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL
# If you don't want the default ors-config.yml you can specify a custom file name, that should match the file in
# your 'config' volume mount.
#ORS_CONFIG_LOCATION: /home/ors/config/my-ors-config.yml # Location of your ORS configuration file in the docker container
# ------------------ JAVA OPTS ------------------ #
# Configure the memory settings for JAVA or pass additional opts
# Fore more available ENV properties see Prepare CATALINA_OPTS and JAVA_OPTS
# in https://github.com/GIScience/openrouteservice/blob/main/docker-entrypoint.sh
XMS: 1g # start RAM assigned to java
XMX: 2g # max RAM assigned to java. Rule of Thumb: <PBF-size> * <profiles> * 2
# Example: 1.5 GB pbf size, two profiles (car and foot-walking)
# -> 1.5 * 2 * 2 = 6. Set xmx to be AT LEAST `-Xmx6g`
ADDITIONAL_JAVA_OPTS: "" # further options you want to pass to the java command
# ----------------- Properties configuration ------------------- #
# Configure your whole container with only property ENVs.
# These can be set alternatively or additionally to the yml configuration file.
# Note, that any values set will override the corresponding values from the yml configuration file.
# See the ors-config.env file for more options.
# To have a configuration file-less container, uncomment at least the following properties.
# The values are examples and provide the default configuration.
#ors.engine.source_file: /home/ors/files/example-heidelberg.osm.gz
#ors.engine.graphs_root_path: /home/ors/graphs
#ors.engine.elevation.cache_path: /home/ors/elevation_cache
ors.engine.profiles.car.enabled: true
ors.engine.profiles.hgv.enabled: true
#logging.level.org.heigit: INFO
# ----------------- ENV file configuration ------------------- #
# Too many variables for your 'environment:' section?
# Use an env_file with the ENV properties instead and define everything in there:
# Values will be overwritten if set in the 'environment' section.
#env_file: ors-config.env
# ----------------- Healthcheck configuration ------------------- #
# The healthcheck is disabled by default. Uncomment the following lines to enable it.
# The healthcheck allows you to monitor the status of the ORS application.
# Be careful with long graph builds, as the healthcheck will fail and show 'unhealthy' during this time.
# This is especially useful if you run your ORS container in a production environment.
#healthcheck:
# test: wget --no-verbose --tries=1 --spider http://localhost:8082/ors/v2/health || exit 1
# start_period: 1m
# interval: 10s
# timeout: 2s
# retries: 3
# disable: false
# ----------------- Docker Volumes configuration ------------------- #
# Define the Docker managed volumes for the ORS application. For more info on Docker Volumes see https://docs.docker.com/compose/compose-file/07-volumes/
# Volumes are used to persist the data and configuration of the ORS application.
# If you want to use volumes, uncomment the following lines and remove the ./ prefix from the volume paths in 'services.ors-app.volumes'.
#volumes:
# graphs:
# elevation_cache:
# config:
# logs:
# files:
Thank you