Hi everyone,
I installed locally nominatim via docker image, using the following docker-compose
services:
nominatim:
container_name: nominatim
image: mediagis/nominatim:4.2
volumes:
- ./volumes/sources:/nominatim/sources
- nominatim-data:/var/lib/postgresql/14/main
environment:
- PBF_PATH=/nominatim/sources/freiburg-regbez-latest.osm.pbf
- REVERSE_ONLY=true
ports:
- "8080:8080"
restart: always
shm_size: 4gb
the image is the latest available and the pbf file is fresh new.
I realized that the query https://nominatim.openstreetmap.org/reverse?lat=48.45851286058211&lon=7.885465667596962&format=json&accept-language=en online shows the field "address.state" and enriches also the "display_name" with the same information, while the local one doesn't.
Online response:
{
"place_id": 181685288,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"osm_type": "way",
"osm_id": 318873074,
"lat": "48.45858375",
"lon": "7.8852782999999995",
"display_name": "12, Vogesenstraße, Schutterwald, Verwaltungsgemeinschaft Offenburg, Ortenaukreis, Baden-Württemberg, 77746, Germany",
"address": {
"house_number": "12",
"road": "Vogesenstraße",
"village": "Schutterwald",
"municipality": "Verwaltungsgemeinschaft Offenburg",
"county": "Ortenaukreis",
"state": "Baden-Württemberg",
"ISO3166-2-lvl4": "DE-BW",
"postcode": "77746",
"country": "Germany",
"country_code": "de"
},
"boundingbox": [
"48.4585076",
"48.4586599",
"7.8851729",
"7.8853837"
]
}
Local response:
{
"place_id": 814300,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"osm_type": "way",
"osm_id": 318873074,
"lat": "48.45858375",
"lon": "7.8852782999999995",
"display_name": "12, Vogesenstraße, Schutterwald, Verwaltungsgemeinschaft Offenburg, Ortenaukreis, 77746, Germany",
"address": {
"house_number": "12",
"road": "Vogesenstraße",
"village": "Schutterwald",
"municipality": "Verwaltungsgemeinschaft Offenburg",
"county": "Ortenaukreis",
"postcode": "77746",
"country": "Germany",
"country_code": "de"
},
"boundingbox": [
"48.4585076",
"48.4586599",
"7.8851729",
"7.8853837"
]
}
Does anybody know why I'm missing the "state" information locally? I double-checked on the general configuration of the docker image, but I couldn't find anything relevant related to Germany addresses.
Thanks for your help! Roberto
asked 22 Dec '22, 16:15

RMeloni00
16●1●1●3
accept rate: 0%
Hi lonvia,
thank you very much for your answer, indeed it was that.
Out of curiosity, where can I find some doc to better understand how it works? I mean...that extract doesn't have the full boundary of Germany either, but the country is displayed anyway. Of course, it's the country, so that might be differently handled but still I'm curious of how it works!
Thanks again for your help!
Nominatim has a fallback for countries but that's all. For any other boundaries, you either need to make sure your extract covers all of it or manually add the boundaries to the extract before import. Sadly, the latter requires some level of insight into how OSM works. I can't offer a simple solution.