[OSM-dev] Empty Keys, possible planet.c problem?

Frederik Ramm frederik at remote.org
Sun Sep 30 15:53:30 BST 2007


> > If it's not too much work cleaning up always sounds best.
> Looks like this effects 431 entries:
> $ bzip2 -dc planet-070919-070928.diff.xml.bz2 | grep -c k=\"\"
> 431

Funny that I only found that little then, maybe something was wrong
with my approach. 

> A few more than I'd be willing to do by hand but it should be possible
> to extract the IDs, download the objects and upload the fixes.

What I did to dump the broken objects was I used a "grep" like you did
but added something like "-A20 -B20" to get 40 lines of context, than
ran the following script on the results:

    if (/^\s*<(node|way|segment)/)
    elsif (/^\s*<\/(node|way|segment)/)
        $buf .=$_;
        print $buf if ($pr);
        $pr=1 if (/k=""/);


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

More information about the dev mailing list