From: marc tobias Date: Mon, 11 Nov 2019 22:34:44 +0000 (+0100) Subject: typo in SQL in Postcodes.md X-Git-Tag: v3.5.0~135^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/7503987630050419e7fbe3d8fab098c4aeb42ffa typo in SQL in Postcodes.md --- diff --git a/docs/develop/Postcodes.md b/docs/develop/Postcodes.md index c52f0b81..ff36b0dd 100644 --- a/docs/develop/Postcodes.md +++ b/docs/develop/Postcodes.md @@ -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 @@ -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';