[OSM-dev] good way to do an automated import

Thomas Wood grand.edgemaster at gmail.com
Wed Apr 8 13:35:38 BST 2009

2009/4/8  <marcus.wolschon at googlemail.com>:
> Hello,
> I started writing the tool to do import
> of TMC-LocationCodeLists into OSM (will be used for Germany at
> first but there are lots of other countries with TMC-data so
> I try to make it generic and user-friendly).
> One very fundamental question has come up....
> what is the best or prefered way to have the tool output it's changes?
> * It can download the current state of the changed entities and
>  write an osmChange (full support of the changeset-comment+generator)
>  http://wiki.openstreetmap.org/wiki/OsmChange
> * It can download the current state of the changed entities and
>  write a josm-file (could be easy to review)
>  http://wiki.openstreetmap.org/wiki/JOSM_file_format

For the UK NaPTAN import, I've used a mixture of these two. I've used
the JOSM format for any initial bulk imports using the perl script.
I've also tweaked a few nodes which I messed up on the original import
of a region using the osmChange format to modify the nodes that had
been uploaded in error.

> * It can upload it's changes directly to the API (no review)
> I would like to be able to run it, then review the changes it
> wants to make in an editor and only apply them if a large enough
> sample looks fine.
> I also need to deal with users changing entities between the time
> I download them and I upload my changes.
> Should I make this one large changeset or one changeset per type
> (roads, segments, points) or one changeset per imported entity
> (e.g. a motorway, some segments and a number of points)?

This is something I've yet to tackle, but will have to in order to
merge fields I missed from the original import by accident.

> I will have my tool store localy what elements have already been
> imported and would like it to store the IDs assigned to them
> by the API0.6 and the changeset-id (in case I need to rollback
> something later). How could I do that?

I use the bulk_upload.pl script, it stores the original and new ids of
files in its own file format, the dumper tool can output this list to
a Old: New style output which I then parsed to modify the data as

> Marcus
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev

Thomas Wood

More information about the dev mailing list