README - osm-zipcodes - Extract (dutch) addresses from OpenStreetMap OSM XML 
 (HTM) git clone git://git.codemadness.org/osm-zipcodes
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       README (1401B)
       ---
            1 Purpose
            2 -------
            3 
            4 Extract (Dutch) zipcode and address data from OpenStreetMap OSM XML files.
            5 
            6 
            7 How to use
            8 ----------
            9 
           10 1. Get the XML OSM from for example: http://download.geofabrik.de/europe/netherlands.html
           11    Tested and intended to be used with The Netherlands.
           12 2. Build program:
           13         make
           14 3. Run program and process data:
           15         ./main netherlands-latest.osm > addr.csv
           16 4. Sort on city, street, housenumber, see the file sort.sh
           17 5. Unique entries, ignore node ID, latitude, longitude, see the file sort.sh
           18 
           19 To save some bandwidth you could also download the .pbf files and run the
           20 osmconvert tool to convert .pbf to .osm. Make sure to preserve the data that is
           21 needed using the command-line flags though.
           22 
           23 osmconvert tool: https://wiki.openstreetmap.org/wiki/Osmconvert
           24 
           25 
           26 Examples
           27 --------
           28 
           29 Count of addresses of numeric part of zipcode:
           30 
           31         awk '{
           32                 a[substr($4, 0, 4)]++;
           33         }
           34         END {
           35                 for (k in a) {
           36                         print k "\t" a[k];
           37                 }
           38         }' addr_sort_uniq.csv
           39 
           40 
           41 Count of addresses of street + city combination:
           42 
           43         awk '{
           44                 a[$5 "|" $7]++;
           45         }
           46         END {
           47                 for (k in a) {
           48                         print k "\t" a[k];
           49                 }
           50         }' addr_sort_uniq.csv
           51 
           52 
           53 Contributing
           54 ------------
           55 
           56 If you think this program is useful, please consider donating money or
           57 other means of contributing to the OpenStreetMap project:
           58 
           59 Project:      https://www.openstreetmap.org/
           60 Donate money: https://donate.openstreetmap.org/
           61 Other means of contributing are welcome too of course.