Importing post boxes from Dracos
The Locating Postboxes site asks people to locate postboxes on an OSM map, based on the brief descriptions in a file obtained via Freedom of Information request from the Royal Mail. You can either match up an existing OSM postbox with an entry in the file, or click on the map to add a new postbox not in OSM. If the OSM node exists and has the 'ref' tag then it will be matched automatically.
The lat,lon information for these post boxes is considered to be in the public domain; it was found by hand and not extracted from the Royal Mail file, which gives only a street address. See the legal-talk thread. The 'ref' number for each post box is just a single number (which many people also like to enter by copying it from the notice displayed on the front of the box) and should also be fine to add. It would also be useful to store the postcode of each box and its street address taken from the file. That might need further clarification from the legal-talk list.
So far I have imported data for two postcode areas near me: E10 and E17. This includes all data available in the file, including postcodes and addresses. Before importing the rest of the country we need to decide whether this information can be included.
You can get the code from Github. You will need to download the exported TSV file from the Dracos site, and then run the script giving a postcode prefix such as E10 as its argument. It produces OsmChange format on standard output, which you can review and upload using balrog's upload.py. It tries to only add new nodes (if there are no existing OSM amenity=post_box nodes nearby) or add new tags. If there are conflicts between the OSM and Dracos data, a warning is printed on stderr. By default, it makes use of all information in the TSV file, but the --cautious flag makes it just process lat,lon and ref. Processing heavily-mapped postcode areas such as N1 may cause the script to run out of memory.
It adds the following tags:
dracos:verified=no (on newly added nodes)
addr:housenumber (where available, and not in --cautious mode)
addr:street (not in --cautious mode)
postal_code (not in --cautious mode)
-- Ed Avis <firstname.lastname@example.org> 07:06, 9 November 2009 (UTC)