]> git.openstreetmap.org Git - nominatim.git/commitdiff
some reformatting of documentation changes and typo fixes
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 6 Nov 2019 21:34:43 +0000 (22:34 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 6 Nov 2019 21:34:43 +0000 (22:34 +0100)
The newest mkdocs is more demanding when it comes to code block
formatting.

docs/develop/Documentation.md
docs/develop/Postcodes.md

index eb3c99d8578df5243100775146a6ff6ccc13cb6e..df8d2b1a84f05a8dab945f3b100d9935deea5b1a 100644 (file)
@@ -1,32 +1,36 @@
 # Documentation Pages
 
-The [Nominatim documentation](https://nominatim.org/release-docs/develop/) is built using the [MkDocs](https://www.mkdocs.org/) static site generation framework. The master branch is automatically deployed every night on under [https://nominatim.org/release-docs/develop/]()
+The [Nominatim documentation](https://nominatim.org/release-docs/develop/) is built using the [MkDocs](https://www.mkdocs.org/) static site generation framework. The master branch is automatically deployed every night on under [https://nominatim.org/release-docs/develop/](https://nominatim.org/release-docs/develop/)
 
-To preview local changes:
+To preview local changes, first install MkDocs
 
-1. Install MkDocs
+```
+pip3 install --user mkdocs
+```
 
-    ```
-    pip3 install --user mkdocs 
-    ```
 
+Then go to the build directory and run
 
-2. In build directory run
+```
+make doc
+INFO - Cleaning site directory
+INFO - Building documentation to directory: /home/vagrant/build/site-html
+```
 
-        make doc
-        INFO - Cleaning site directory
-        INFO - Building documentation to directory: /home/vagrant/build/site-html 
+This runs `mkdocs build` plus extra transformation of some files and adds
+symlinks (see `CMakeLists.txt` for the exact steps).
 
-    This runs `mkdocs build` plus extra transformion of some files and adds symlinks (see `CMakeLists.txt` for the exact steps).
+Now you can start webserver for local testing
 
+```
+build> mkdocs serve
+[server:296] Serving on http://127.0.0.1:8000
+[handlers:62] Start watching changes
+```
 
-3. Start webserver for local testing
+If you develop inside a Vagrant virtual machine:
 
-        mkdocs serve
-        [server:296] Serving on http://127.0.0.1:8000
-        [handlers:62] Start watching changes
-
-    If you develop inside a Vagrant virtual machine:
-    * add port forwarding to your Vagrantfile, e.g. `config.vm.network "forwarded_port", guest: 8000, host: 8000`
-    * use `mkdocs serve --dev-addr 0.0.0.0:8000` because the default localhost
-       IP does not get forwarded.
+ * add port forwarding to your Vagrantfile,
+   e.g. `config.vm.network "forwarded_port", guest: 8000, host: 8000`
+ * use `mkdocs serve --dev-addr 0.0.0.0:8000` because the default localhost
+   IP does not get forwarded.
index 8b532162abe92e2d3c93bb2348697cf6302009ef..c52f0b81e072d3fede82ac356176ef72c25838ae 100644 (file)
@@ -1,18 +1,20 @@
 # Postcodes in Nominatim
 
 The blog post [Nominatim and Postcodes](https://www.openstreetmap.org/user/lonvia/diary/43143)
-describes the new handling in Nominatim 3.1.
+describes the handling implemented since Nominatim 3.1.
 
-Postcode centroids (aka 'calculated postcodes') are generated by looking at all postcodes of
-a country, grouping them and calculating the geometric centroid. There is currently no logic
-to deal with extreme outliers (typos or other mistakes in OSM data). There is also no check
-if a postcodes adhere's to a countries format, e.g. if Swiss postcodes are 4 digits.
+Postcode centroids (aka 'calculated postcodes') are generated by looking at all
+postcodes of a country, grouping them and calculating the geometric centroid.
+There is currently no logic to deal with extreme outliers (typos or other
+mistakes in OSM data). There is also no check if a postcodes adheres to a
+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` and
-runs once per night on nominatim.openstreetmap.org.
+The script to rerun the calculation is
+`build/utils/update.php --calculate-postcodes`
+and runs once per night on nominatim.openstreetmap.org.
 
 
 ## Finding places that share a specific postcode
@@ -20,10 +22,11 @@ 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
-  FROM placex 
-  WHERE country_code='fr'
-    AND upper(trim (both ' ' from address->'postcode')) = '33210';
+SELECT osm_type, osm_id, class, type,
+       st_x(centroid) as lon, st_y(centroid) at lat
+FROM placex
+WHERE country_code='fr'
+  AND upper(trim (both ' ' from address->'postcode')) = '33210';
 ```
 
 Alternatively on [Overpass](https://overpass-turbo.eu/) run the following query