# About populations and profiles for isochrones on self hosted ors instance

**URL:** https://ask.openrouteservice.org/t/about-populations-and-profiles-for-isochrones-on-self-hosted-ors-instance/5560
**Category:** openrouteservice
**Created:** [December 7, 2023, 12:48pm UTC](https://ask.openrouteservice.org/t/about-populations-and-profiles-for-isochrones-on-self-hosted-ors-instance/5560 "2023-12-07T12:48:06Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![RaikoPipe](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/raikopipe/32/2711_2.png) [@RaikoPipe](https://ask.openrouteservice.org/u/RaikoPipe)
#### Post date: [December 7, 2023, 12:48pm UTC](https://ask.openrouteservice.org/t/about-populations-and-profiles-for-isochrones-on-self-hosted-ors-instance/5560/1 "2023-12-07T12:48:06Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)
#### Post date: [December 8, 2023, 12:32pm UTC](https://ask.openrouteservice.org/t/about-populations-and-profiles-for-isochrones-on-self-hosted-ors-instance/5560/2 "2023-12-08T12:32:49Z")

</div>

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:

> <https://github.com/GIScience/openrouteservice/issues/881>
>
> I'll see if I find the time to contribute that.
> 
> for now, quick notes:
> 
> \### …Prepare your data
> 
> Source: https://data.jrc.ec.europa.eu/dataset/jrc-ghsl-ghs\_pop\_gpw4\_globe\_r2015a
> 
> \### Crop your raster using a mask if you don't need the whole world
> 
> I am using a shapefile with the USA boundaries in EPSG:54009 \`usa\_54009.shp\` to clip the raster:
> 
> \`\`\`bash
> gdalwarp -of GTiff -co "COMPRESS=LZW" -cutline usa\_54009.shp -multi -r bilinear -wo NUM\_THREADS=ALL\_CPUS -overwrite -crop\_to\_cutline GHS\_POP\_E2015\_GLOBE\_R2019A\_54009\_250\_V1\_0.tif GHS\_POP\_E2015\_GLOBE\_R2019A\_54009\_250\_V1\_0\_USA\_LZW.tif
> 
> gdaladdo GHS\_POP\_E2015\_GLOBE\_R2019A\_54009\_250\_V1\_0\_USA\_LZW.tif 2 4 8 16 32 64
> \`\`\`
> 
> \### Import into postgis
> I am using the target DB \`qgis\_tests\`
> 
> \`\`\`bash
> raster2pgsql -s 954009 -t 1024x1024 -l 2,4,8,16,32 -I -C GHS\_POP\_E2015\_GLOBE\_R2019A\_54009\_250\_V1\_0\_USA\_LZW.tif ghs\_pop\_2015\_esri54009 | psql qgis\_tests
> \`\`\`
> If your postgis is missing EPSG:54009 you can add it with:
> 
> \`\`\`bash
> cat \<\<\<\_TXT\_ 
> INSERT into spatial\_ref\_sys (srid, auth\_name, auth\_srid, proj4text, srtext) values ( 954009, 'esri', 54009, '+proj=moll +lon\_0=0 +x\_0=0 +y\_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no\_defs ', 'PROJCS\["World\_Mollweide",GEOGCS\["GCS\_WGS\_1984",DATUM\["WGS\_1984",SPHEROID\["WGS\_1984",6378137,298.257223563\]\],PRIMEM\["Greenwich",0\],UNIT\["Degree",0.017453292519943295\]\],PROJECTION\["Mollweide"\],PARAMETER\["False\_Easting",0\],PARAMETER\["False\_Northing",0\],PARAMETER\["Central\_Meridian",0\],UNIT\["Meter",1\],AUTHORITY\["EPSG","54009"\]\]');
> \_TXT\_ | psql qgis\_tests
> \`\`\`
> 
> 
> \### Add to \`app.config\` \`services.isochrones\` section:
> \`\`\`json
> "statistics\_providers": {
> "provider1": {
> "enabled": true,
> "provider\_name": "postgresql",
> "provider\_parameters": {
> "host": "\[IP of local db\]",
> "port": 5432,
> "db\_name": "qgis\_tests",
> "user": "my username",
> "password": "my passwor",
> "table\_name": "ghs\_pop\_2015\_esri54009",
> "geometry\_column": "rast"
> },
> "property\_mapping": {
> "total\_pop": "total\_pop"
> },
> "attribution": "European Commission, Joint Research Centre (JRC); Columbia University, Center for International Earth Science Information Network - CIESIN (2015): GHS population grid, derived from GPW4, multitemporal (1975, 1990, 2000, 2015). European Commission, Joint Research Centre (JRC) \[Dataset\] PID: http://data.europa.eu/89h/jrc-ghsl-ghs\_pop\_gpw4\_globe\_r2015a"
> }
> \`\`\`

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

---

<div class="post-metadata">

### Author: ![RaikoPipe](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/raikopipe/32/2711_2.png) [@RaikoPipe](https://ask.openrouteservice.org/u/RaikoPipe)
#### Post date: [January 12, 2024, 4:42pm UTC](https://ask.openrouteservice.org/t/about-populations-and-profiles-for-isochrones-on-self-hosted-ors-instance/5560/3 "2024-01-12T16:42:14Z")

</div>

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

---

<div class="post-metadata">

### Author: ![zacki41](https://ask.openrouteservice.org/letter_avatar_proxy/v4/letter/z/4491bb/32.png) [@zacki41](https://ask.openrouteservice.org/u/zacki41)
#### Post date: [March 12, 2024, 6:55pm UTC](https://ask.openrouteservice.org/t/about-populations-and-profiles-for-isochrones-on-self-hosted-ors-instance/5560/4 "2024-03-12T18:55:07Z")

</div>

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

---

<div class="post-metadata">

### Author: ![zacki41](https://ask.openrouteservice.org/letter_avatar_proxy/v4/letter/z/4491bb/32.png) [@zacki41](https://ask.openrouteservice.org/u/zacki41)
#### Post date: [May 14, 2024, 7:11am UTC](https://ask.openrouteservice.org/t/about-populations-and-profiles-for-isochrones-on-self-hosted-ors-instance/5560/5 "2024-05-14T07:11:33Z")

</div>

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](https://github.com/GIScience/openrouteservice/issues/881) but also get confused by the documentation [ors.endpoints.isochrones | openrouteservice backend documentation](https://giscience.github.io/openrouteservice/run-instance/configuration/ors/endpoints/isochrones#statistics-providers)

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

 ![grafik](https://ask.openrouteservice.org/uploads/default/original/2X/7/7225b7c94663fc41ca300b84501b89936f9da291.png)

Any help is greatly appreciated - thank you for your work

---

<div class="post-metadata">

### Author: ![felipe-notilus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/felipe-notilus/32/3206_2.png) [@felipe-notilus](https://ask.openrouteservice.org/u/felipe-notilus)
#### Post date: [August 8, 2024, 5:20pm UTC](https://ask.openrouteservice.org/t/about-populations-and-profiles-for-isochrones-on-self-hosted-ors-instance/5560/6 "2024-08-08T17:20:06Z")

</div>

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](https://giscience.github.io/openrouteservice/run-instance/configuration/ors/endpoints/isochrones#statistics-providers)) I cannot manage to get the docker compose up and running. On start up I get the following error:

```auto
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:

```auto
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 !

---

<div class="post-metadata">

### Author: ![amandus](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/amandus/32/669_2.png) [@amandus](https://ask.openrouteservice.org/u/amandus)
#### Post date: [August 16, 2024, 1:46pm UTC](https://ask.openrouteservice.org/t/about-populations-and-profiles-for-isochrones-on-self-hosted-ors-instance/5560/7 "2024-08-16T13:46:40Z")

</div>

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

```auto
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
