osm-search / Nominatim

Open Source search based on OpenStreetMap data
https://nominatim.org
GNU General Public License v3.0
3.09k stars 712 forks source link

Official Nominatim vs on premises : ISO3166-2-lvl* fields not available and different place_id ? #2721

Closed renaudk closed 2 years ago

renaudk commented 2 years ago

Describe the bug ISO3166-2-lvlX fields are not displayed on our server. The place_id returned is not the same (as well as postcode)

To Reproduce Just build a new nominatim instance, do planet import using extratags style.

Compare outputs: https://nominatim.openstreetmap.org/reverse?lat=40.86679325&lon=14.239311245971589&addressdetails=1&format=json&accept-language=en

{"place_id":282986258,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"relation","osm_id":7951046,"lat":"40.86679325","lon":"14.239311245971589","display_name":"Arena Cinematografica, Salita Scudillo, Stella, Municipalità 3, Naples, Napoli, Campania, 80100, Italy","address":{"amenity":"Arena Cinematografica","road":"Salita Scudillo","suburb":"Stella","city":"Naples","county":"Napoli","ISO3166-2-lvl6":"IT-NA","state":"Campania","ISO3166-2-lvl4":"IT-72","postcode":"80100","country":"Italy","country_code":"it"},"boundingbox":["40.866473","40.8671025","14.238932","14.2397233"]}

on our private nominatim server, same request:

{"place_id":294552552,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"relation","osm_id":7951046,"lat":"40.86679325","lon":"14.239311245971589","display_name":"Arena Cinematografica, Salita Scudillo, Stella, Municipalità 3, Naples, Napoli, Campania, 80136, Italy","address":{"amenity":"Arena Cinematografica","road":"Salita Scudillo","suburb":"Stella","city":"Naples","county":"Napoli","state":"Campania","postcode":"80136","country":"Italy","country_code":"it"},"boundingbox":["40.866473","40.8671025","14.238932","14.2397233"]}

Is there something to configure to get ISO3166-2 information on our server?

Software Environment (please complete the following information):

Hardware Configuration (please complete the following information):

Postgresql Configuration: Recommended changes in installation process.

Additional context Nothing

lonvia commented 2 years ago

You are running a different version of Nominatim than the official servers. ISO3166-2-lvlX fields are only available in the master version.

renaudk commented 2 years ago

Thank you, so I assume this will be available in next release. About the place_id/postcode difference, do you have an idea?

mtmail commented 2 years ago

Different place_id is expected https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id

For postcode try running the refresh script https://nominatim.org/release-docs/3.7.1/develop/Postcodes/

renaudk commented 2 years ago

Thank you, should we run nominatim refresh --postcodes every night as nominatim.openstreetmap.org do?

mtmail commented 2 years ago

I would run it regularly. How often is up to you.

renaudk commented 2 years ago

Thanks!