Hi!!
Can anyone point me or share with me a working ors-config.yml for running jar, to use with matrix and car profile? I tried to use the default one, only changing the source_file and enabling the car profile, it didn’t work. Then I found this more compact config here on this forum:
ors:
### uncomment the following lines to change CORS settings.
#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
engine:
### use the following line for development setup using test OSM file for Heidelberg
#source_file: ./src/test/files/heidelberg.osm.gz
source_file: /Volumes/TOSHIBA/calculadora/brazil-latest.osm.pbf
graphs_root_path: /Volumes/TOSHIBA/calculadora/ors-core/data/graphs
elevation:
cache_path: /Volumes/TOSHIBA/calculadora/ors-core/data/elevation_cache
profiles:
car:
profile: driving-car
elevation: true
encoder_options:
turn_costs: true
block_fords: false
use_acceleration: true
preparation:
min_network_size: 200
min_one_way_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:
ch:
disabling_allowed: true
lm:
disabling_allowed: true
active_landmarks: 6
core:
disabling_allowed: true
active_landmarks: 6
ext_storages:
WayCategory:
HeavyVehicle:
WaySurfaceType:
RoadAccessRestrictions:
use_for_warnings: true
But it complaints about:
2024-08-02 09:18:46 ERROR ORS-Init [ o.h.o.r.RoutingProfileManager ]
2024-08-02 09:18:46 ERROR ORS-Init [ o.h.o.r.RoutingProfileManager ] No profiles configured. Exiting.
I’m trying to run the jar with java -jar ors.jar
and after that (still can’t though), call it via python, using:
ors = client.Client(base_url="http://localhost:8082/ors")
profile = 'driving-car'
matrix_parameters = {
'locations': latlons_lista,
'sources': [0],
'profile': profile,
'metrics': ['duration', "distance"]
}
matrix = ors.distance_matrix(**matrix_parameters)
Many thanks!!