2009/7/6 Mikel Maron <[email protected]>: > Recently uploaded the Arabic names for all countries. Rather than updating > the existing nodes as expected, it created new nodes. > > http://www.openstreetmap.org/browse/changeset/1707270 > http://www.openstreetmap.org/browse/changeset/1725949 > > I used bulk_upload.py, processing an osmChange file, with all the nodes > wrapped inside a "modify" tag. > > Does this not work as expected??! How should it be done? >
Don't use bulk_upload.py would be a good start. >From looking at the code it doesn't take osm change files at all -- it takes JOSM style osm files, which it assumes contains entirely original content. It then proceeds to do no input validation and arbitrarily tree walks the XML file you give it looking for <node> <way> <relation> elements to upload by creating new objects if they have no "action" attribute, or it doesn't say "modify" or "delete", and doing modifies and deletes where the action attribute says to. Basically it looks like it was hacked up to do a particular job, by someone who knew how it worked and therefore didn't bother with all of the fun you need when you let something like that loose with the population at large. > Once the proper method is sorted out, I'll delete these duplicate nodes. So you have 5 choices: - rewrite your input into the format expected by bulk_upload.py (and test it on a dev server or something first) - rewrite bulk_upload.py to not be so crap - use bulk_upload.php (also doesn't take osmChange files though) - write your own bulk uploader that takes osmChange - wait till someone else does that (I was working on one but got distracted by potlatch2) Dave _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

