[OSM-dev] AND upload almost ready
Brett Henderson
brett at bretth.com
Sat Aug 25 01:32:23 BST 2007
One thing I should mention though which may be useful.
Osmosis has a --sort-change task which may be useful for ordering
changes in such a way that they don't violate referential integrity.
osmosis --read-xml-change file=mychanges.osc --sort-change type=seekable
--write-xml-change file=mychanges-sorted.osc
The "type" argument specifies how the data is to be sorted. "streamable"
is the default and orders changes by type then id suitable for applying
to a sorted "stream" based dataset (ie. an osm xml file). "seekable"
orders the changes in such a way that they can be applied to a
"seekable" dataset (ie. a database) without failing referential
integrity. The names probably aren't the most intuitive.
seekable orders changes in the following order.
* node creates
* segment creates
* way creates
* way modifications
* segment modifications
* node modifications
* way deletes
* segment deletes
* node deletes
It's all done using file based merge sorting so RAM usage is minimal and
can handle any sized file.
More information about the dev
mailing list