[Imports] ogr2osm updates

Paul Norman penorman at mac.com
Thu Nov 1 07:40:57 GMT 2012


I have completed a number of updates to ogr2osm in the last few weeks that
might be of interest to the list. 

My branch of ogr2osm is available at https://github.com/pnorman/ogr2osm

- The XML output backend has been changed from SimpleXMLWriter.py to lxml,
cutting the runtime in half or better across all file sizes of output up to
about 25 GB (the limits of my testing). It should fall back to alternative
xml libraries if lxml is missing but will not be optimized for them.

- What should be true UTF-8 support. I haven't tested this in any detail,
but the limitations from SimpleXMLWriter.py's assumptions of ascii should be
gone. I welcome testcases

- A test framework so I can avoid breaking stuff with changes. I don't have
many tests in it yet, but this should make maintenance much easier. Some
additional dependencies are required to run the tests but they do not impact
normal usage.

- Some ogr multipolygon (not OSM multipolygon) fixes

I am currently working on verifying that ogr2osm will scale up to the
largest NHD basins. So far I have gotten 25 GB output .osm files out of
ogr2osm without any problems. It only took about 30 minutes too. Of course
what you do with the files once they're generated is another issue
entirely...

Upcoming features (I hope) are

- Speed/memory improvements for large files

- Support of non-file ogr datasources (e.g. PostGIS)

- Less cryptic output while running

As always, use responsibly.




More information about the Imports mailing list