]> git.openstreetmap.org Git - nominatim.git/blobdiff - docs/develop/Postcodes.md
fix typo
[nominatim.git] / docs / develop / Postcodes.md
index c52f0b81e072d3fede82ac356176ef72c25838ae..343b8de3d6829ec9138d9e30be5606932e53edc1 100644 (file)
@@ -1,6 +1,7 @@
 # Postcodes in Nominatim
 
-The blog post [Nominatim and Postcodes](https://www.openstreetmap.org/user/lonvia/diary/43143)
+The blog post
+[Nominatim and Postcodes](https://www.openstreetmap.org/user/lonvia/diary/43143)
 describes the handling implemented since Nominatim 3.1.
 
 Postcode centroids (aka 'calculated postcodes') are generated by looking at all
@@ -13,7 +14,7 @@ country's format, e.g. if Swiss postcodes are 4 digits.
 ## Regular updating calculated postcodes
 
 The script to rerun the calculation is
-`build/utils/update.php --calculate-postcodes`
+`nominatim refresh --postcodes`
 and runs once per night on nominatim.openstreetmap.org.
 
 
@@ -22,8 +23,9 @@ and runs once per night on nominatim.openstreetmap.org.
 In the Nominatim database run
 
 ```sql
-SELECT osm_type, osm_id, class, type,
-       st_x(centroid) as lon, st_y(centroid) at lat
+SELECT address->'postcode' as pc,
+       osm_type, osm_id, class, type,
+       st_x(centroid) as lon, st_y(centroid) as lat
 FROM placex
 WHERE country_code='fr'
   AND upper(trim (both ' ' from address->'postcode')) = '33210';