Hello, we got an issue with private instance using official docker image. We have issue with some postal codes. For example the public api returns correct data (the issue also occurs with street name and number) for the city:

https://nominatim.openstreetmap.org/search.php?postalcode=89-501&format=jsonv2

but our instance returns empty reply. However, when refering to county postcode:

https://nominatim.openstreetmap.org/search.php?postalcode=89-500&format=jsonv2

we do get proper reply from our selfhosted instance, including detailed query with street name/number (we get correct geolocation using the general county post-code)

Our instance configuration is as follows (deployed using docker compose):

POSTGRES_SHARED_BUFFERS: "2GB"

POSTGRES_MAINTENANCE_WORK_MEM: "10GB"

POSTGRES_AUTOVACUUM_WORK_MEM: "2GB"

POSTGRES_WORK_MEM: "50MB"

POSTGRES_EFFECTIVE_CACHE_SIZE: "8GB"

PBF_URL: "https://download.geofabrik.de/europe/poland-latest.osm.pbf" REPLICATION_URL: "https://download.geofabrik.de/europe/poland-updates/" IMPORT_STYLE: "address"

Docker image we use is: mediagis/nominatim:4.0.

Checked for update using:

sudo -u nominatim nominatim replication -v --check-for-updates --project-dir /nominatim

and its up-to-date. Any hints on what may be the issue here? Can too low level import style have anything to do with it?

The 89-500 is general county code https://znajdzkodpocztowy.pl/szukaj/mk-89-500/, the 89-501 is strictly city code https://znajdzkodpocztowy.pl/szukaj/mk-89-501/ . The issue extends to other cities as well. If address is specified with general county code everything works, but when local city code is used, reply is empty. The issue does not occur on public api - all local city codes give correct rply. Anything in config we should change?

asked 12 May, 08:53

mzaw9's gravatar image

mzaw9
102
accept rate: 0%

edited 12 May, 10:57

1

When was the initial import?

(12 May, 09:19) lonvia

around 2 months ago. replication is working once/day the issue is wide - it has county codes, but missing local city-codes; however, it works on public api.

can this: https://github.com/osm-search/Nominatim/blob/2d1a22705f7f2f067f2c839c32caf55941a37b01/settings/import-full.style#L18 difference between address and full import be a culprit?

(12 May, 09:22) mzaw9

Quick answer: You need to update the postcode data on your instance with the following command: nominatim refresh --postcode. Make sure that there are no updates running at the same time. The update takes between 20min and an hour, depending on your hardware.

Background: Postcode data is not directly available in OSM. There are only postcodes as part of addresses. To make search for postcodes work, Nominatim takes the postcodes from all the address and computes a centroid point for each of them. This is a rather expensive process, so it is not done as part of the regular updates. You have to occasionally run the process manually using the command above.

Addresses with the postcode '89-501' were first entered in OSM only a couple of weeks ago. That's why your instance does not have them yet. If you have regularly applied updates, the data is there. Recomputing the postcode centroids will make them searchable.

permanent link

answered yesterday

lonvia's gravatar image

lonvia
5.9k25384
accept rate: 38%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×670
×119
×65
×52
×9

question asked: 12 May, 08:53

question was seen: 115 times

last updated: yesterday

powered by OSQA