<div>Thanks for the feedback.</div><div><br></div>@Brian - The script is filtering to only include closed ways, although I wasn't sure whether to restrict it to just ones with building=xxx, as this would mean some of the amenity=XXX type tags would get missed. It's trivial to do though should this go ahead. Had not thought of the postcode being already set, would probably simply ignore those ways and not overwrite the data.<div>
<br></div><div>@Chris, yes I've seen your tiles, and have been using them to verify some of the output. I agree many of the centroids are not accurate, however ONS includes in the data a field called "Grid Reference positional Quality Indicator". The highest quality status indicator is "Within the building of the matched address closest to the postcode". If an import was done, it would need to filter out all the postcodes which don't have that quality indicator set to that value which I'm already doing. That in combination with limiting to closed ways with building=* seems like it would result in an accurate import?</div>
<div><br></div><div><br><div class="gmail_quote">On 13 January 2013 18:38, Chris Hill <span dir="ltr"><<a href="mailto:osm@raggedred.net" target="_blank">osm@raggedred.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 13/01/13 15:21, Aidan McGinley wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Been toying with some ideas for how to use the ONS Postcode data[1]. One idea that I have been exploring is to check if the value for the centre of the postcode is inside a closed way, and if so then tag that way with the appropriate addr:postcode. I mocked up a script to check this using the overpass API. Some sample output is in the attached link [2]. Essentially the output shows the postcode and the associated way or ways that enclose it if more than one. I've excluded ways tagged landuse=*. The script is pretty inefficient at the moment, and needs to be optimised, but before I do that I wanted to check with the wider community that this is a viable approach, and if so the best way to do the import.<br>
<br>
Worth noting that if the data were imported, then ways that map to multiple postcodes would need to be excluded, as discussed previously on the mailing list[3]<br>
<br>
[1] <a href="http://www.ons.gov.uk/ons/guide-method/geography/products/postcode-directories/-nspp-/index.html" target="_blank">http://www.ons.gov.uk/ons/<u></u>guide-method/geography/<u></u>products/postcode-directories/<u></u>-nspp-/index.html</a><br>
[2] <a href="http://paste.ubuntu.com/1527642/" target="_blank">http://paste.ubuntu.com/<u></u>1527642/</a><br>
[3] <a href="http://lists.openstreetmap.org/pipermail/talk-gb/2013-January/014336.html" target="_blank">http://lists.openstreetmap.<u></u>org/pipermail/talk-gb/2013-<u></u>January/014336.html</a><br>
<br>
<br>
</blockquote></div></div>
In case you haven't seen it, I produce and maintain a postcode layer based on ONS data that can be used in the editors. It helps determine the postcode, but always as a manual process. You can see info here [1] I doubt importing the data is practical and certainly would not be welcomed by many. The resolution of the postcode centroids leaves doubt as to the edge cases. The closest postcode centroid is sometimes related to the properties on a different road, easy to spot by eye.<br>
<br>
[1] <a href="http://onspd.raggedred.net/" target="_blank">http://onspd.raggedred.net/</a><span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Cheers, Chris<br>
user: chillly</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
______________________________<u></u>_________________<br>
Talk-GB mailing list<br>
<a href="mailto:Talk-GB@openstreetmap.org" target="_blank">Talk-GB@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/talk-gb" target="_blank">http://lists.openstreetmap.<u></u>org/listinfo/talk-gb</a><br>
</div></div></blockquote></div><br></div>