[OSM-talk] De-Duplication of areas

Frederik Ramm frederik at remote.org
Mon Oct 1 00:53:59 BST 2007


Hi,

   I have a Perl script that is capable of removing duplicate objects
from an area, using the following rules:

* find any nodes with same tags and at same position as other nodes;
  remove them
* if any segments use one of the removed nodes, change the segments
  to use the remaining node at the same position
* find any segments that use the same from and to nodes and have 
  identical tags as another segment; remove them
* if any ways use one of the removed segments, change the way to use
  the remaining segment
* if two or more ways are identical, remove them

This is suitable especially for imports that were run multiple times.
It cannot be used for cases where things were entered twice manually
because two manually entered nodes are almost never at the exact same
position.

I am planning to do big "duplication analysis" on the whole planet
file some time and clean up any duplicates I find but currently the
script cannot be run on such large amounts of data. I'll do a redesign
post-0.5.

I'll not put that script into SVN just yet because it may cause damage
if used carelessly, but anyone who feels confident about his Perl
skills is welcome to ask for a copy e-mailed to him. 

Also, if you are aware of a large area with duplicated objects, or if
you happen to read this in the archives because you just have
accidentally uploaded something twice, give me a shout and I can run
the script on your area.
 
Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00.09' E008°23.33'





More information about the talk mailing list