About populations and profiles for isochrones on self hosted ors instance

Hi,

I’m hosting my own ors instance and use it for requesting isochrones. Now I’m facing two issues:

Some profiles like “cycling-electric” lead to a status 500 error response. Profiles like “driving-car” seem to work fine though. Even though my request has the “total_pop” attribute, the response doesn’t return it.

Any help would be appreciated! Thanks!

Hi @RaikoPipe,

that’s probably an issue with your configuration.
Check if localhost:8082/ors/v2/status shows cycling-electric in the profiles (adjust port if needed).

Regarding population data see:

That’s more or less what you need to do, but we currently don’t have documentation for that yet.

The correct location in the new ors-config.yml is probably endpoints.isochrones.statistics_provider (in yaml format instead of dot notation ofc).

Best regards

Thanks for the help @amandus! Using your advice, I could address the issue regarding the missing profiles. Next, I will try your solution regarding the configuration of the population layer.

Best regards
Richard

Dear all,

has anyone yet successfully implemented the population on a self hosted instance using docker compose and can share their approach ?
I wasn’t yet able to implement the github solution provided by elpaso.
Greetings
Florian

Dear @amandus - I would like to refresh my request on how to implement population data into the self hosted instance. I try to follow this
Missing documentation about population data setup with Docker · Issue #881 · GIScience/openrouteservice · GitHub but also get confused by the documentation ors.endpoints.isochrones | openrouteservice backend documentation

My self hosted instance is up and running as a docker standalone

Any help is greatly appreciated - thank you for your work

Hi there! Thank you very much for this solution. I managed to follow it through however I am using the .env file for the config and when I set the parameters for the statistics providers (somewhat guessing the format by reading this) I cannot manage to get the docker compose up and running. On start up I get the following error:

2024-08-08 19:16:36 ors-app  |  java.base/java.lang.Thread.run(Thread.java:1583)
2024-08-08 19:16:36 ors-app  | 2024-08-08 17:16:36 ERROR                                                 main [ o.s.b.d.LoggingFailureAnalysisReporter   ]   
2024-08-08 19:16:36 ors-app  | 
2024-08-08 19:16:36 ors-app  | ***************************
2024-08-08 19:16:36 ors-app  | APPLICATION FAILED TO START
2024-08-08 19:16:36 ors-app  | ***************************
2024-08-08 19:16:36 ors-app  | 
2024-08-08 19:16:36 ors-app  | Description:
2024-08-08 19:16:36 ors-app  | 
2024-08-08 19:16:36 ors-app  | Failed to bind properties under 'ors.endpoints.isochrones.statisticsproviders.enabled' to org.heigit.ors.api.EndpointsProperties$EndpointIsochronesProperties$StatisticsProviderProperties:
2024-08-08 19:16:36 ors-app  | 
2024-08-08 19:16:36 ors-app  |     Reason: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [org.heigit.ors.api.EndpointsProperties$EndpointIsochronesProperties$StatisticsProviderProperties]
2024-08-08 19:16:36 ors-app  | 
2024-08-08 19:16:36 ors-app  | Action:
2024-08-08 19:16:36 ors-app  | 
2024-08-08 19:16:36 ors-app  | Update your application's configuration

The portion of my ors-config.env file related to the isochrones looks like this:

ors.endpoints.isochrones.enabled=true
ors.endpoints.isochrones.attribution=openrouteservice.org, OpenStreetMap contributors
ors.endpoints.isochrones.maximum_locations=2
ors.endpoints.isochrones.maximum_intervals=6
ors.endpoints.isochrones.allow_compute_area=true
ors.endpoints.isochrones.maximum_range_distance_default=50000
ors.endpoints.isochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.maximum_range_distance.0.value=100000
ors.endpoints.isochrones.maximum_range_time_default=18000
ors.endpoints.isochrones.maximum_range_time.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.maximum_range_time.0.value=8000
ors.endpoints.isochrones.fastisochrones.maximum_range_distance_default=50000
ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.value=500000
ors.endpoints.isochrones.fastisochrones.maximum_range_time_default=18000
ors.endpoints.isochrones.fastisochrones.maximum_range_time.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.fastisochrones.maximum_range_time.0.value=10800
ors.endpoints.isochrones.statistics_providers.enabled=true
ors.endpoints.isochrones.statistics_providers.provider_name=local_db
ors.endpoints.isochrones.statistics_providers.property_mapping=total_pop
ors.endpoints.isochrones.statistics_providers.provider_parameters.host=localhost
ors.endpoints.isochrones.statistics_providers.provider_parameters.port=5432
ors.endpoints.isochrones.statistics_providers.provider_parameters.user=ors_user
ors.endpoints.isochrones.statistics_providers.provider_parameters.password=ors_password
ors.endpoints.isochrones.statistics_providers.provider_parameters.db_name=population_db
ors.endpoints.isochrones.statistics_providers.provider_parameters.table_name=ghs_pop_2030
ors.endpoints.isochrones.statistics_providers.provider_parameters.geometry_column=rast
ors.endpoints.isochrones.statistics_providers.provider_parameters.postgis_version=3.4

Without the lines related to the statistics_providers it works fine as expected.

Am I missing something to make it work properly?

Thanks in advance !

Hi @felipe-notilus ,

for you statistics_provider configs try those:

  • setting a provider name e.g. prov1 in the example below
  • for the property_mapping there is currenlty only one value supported which is an object with .total_pop=total_pop (see below)
  • postgis_verison might only allow single digit
ors.endpoints.isochrones.statistics_providers.pov1.provider_name=local_db
ors.endpoints.isochrones.statistics_providers.pov1.property_mapping.total_pop=total_pop
ors.endpoints.isochrones.statistics_providers.pov1.provider_parameters.host=localhost
ors.endpoints.isochrones.statistics_providers.pov1.provider_parameters.port=5432
ors.endpoints.isochrones.statistics_providers.pov1.provider_parameters.user=ors_user
ors.endpoints.isochrones.statistics_providers.pov1.provider_parameters.password=ors_password
ors.endpoints.isochrones.statistics_providers.pov1.provider_parameters.db_name=population_db
ors.endpoints.isochrones.statistics_providers.pov1.provider_parameters.table_name=ghs_pop_2030
ors.endpoints.isochrones.statistics_providers.pov1.provider_parameters.geometry_column=rast
ors.endpoints.isochrones.statistics_providers.pov1.provider_parameters.postgis_version=3

Best regards