Hi, On 6 December 2012 14:04, Paul Norman <penor...@mac.com> wrote: > Jeff Meyer @ > http://lists.osm.org/pipermail/imports/2012-December/001602.html >> > How will you handle object conflation? >> Manually and methodically. > > Although not a trivial problem there is work underway on code that will > handle the address-address conflation > (https://github.com/pnorman/addressmerge). > Address-POI and address-building conflation remains a purely manual job. > > It shouldn't be too hard to merge addresses with buildings they are within > when the building has only one address within in and the building does > not itself have an address. Addresses placed by building doors outside > the building itself add complications but I expect they are solvable. > Having said that it shouldn't be too hard, it's not trivial.
We've had a few localized address+building outlines imports. I haven't developed clean re-usable tools to do those tasks because the datasets are so different every time, in scope, in data format, accuracy, etc. But usually I wrote simple python scripts for each one, made of similar & re-usable blocks of code. In the case of address nodes placed roughly inside the buildings' outlines you can re-use this scipt: https://gist.github.com/4241509 Call it with two arguments: ./merge-building-addrs.py buildings.osm addresses.osm It'll produce an output.osm file containing the same buildings and addresses, but with the address tags assigned to the outlines where there was exactly one address node contained within it. Everywhere else the nodes and the buildings remain intact. In more complicated cases, e.g. nodes places near the entrances slightly outside the building, as you mention, I found it's easiest to load both datasets into two postgres tables and assign the addresses using a postgis function like ST_DWithin() with a max. distance of a couple of feet. Similarly finding buildings that overlap with existing buildings in osm can be easily done with ST_Intersects(). I'd usually add a boolean column "overlap" containing "true" if the building collides with an existing one. Then in JOSM I'd skip those buildings with overlap=true from upload and deal with each one manually. Address nodes conflation is easier done in python because it requires a little text processing. Cheers _______________________________________________ Imports mailing list Imports@openstreetmap.org http://lists.openstreetmap.org/listinfo/imports