[OSM-dev] Using osmosis for a daily from-scratch import into PostgreSQL and SQLite support

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Wed Mar 3 15:57:21 GMT 2010


Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> writes:

> 
> On Wed, Mar 3, 2010 at 01:57, Jochen Plumeyer <jochen <at> plumeyer.org> wrote:

> >
> > The bottlenecks of this rather slow script is conversion from date strings to
> > UNIX epoch seconds, and the whole SQLite latency, although the data is
> > committed in larger chunks.
> 
> That's neat. I hacked it up to use prepared statements & changed the
> schema which brought the runtime from c.a. 4m52.121s to 2m44.241s
> (real).

QGis comes with OSM plugin which seems to convert .osm file first into SQLite
database.  I had a try with some old Finland.osm file which was about 750 MB in
.osm format. The size of the resulting SQLite database was larger, about 950 MB.

Timings 
- Initial loading: 23 minutes
- Creating indexes: 7 minutes
- Post-parsing -nodes: 10 minutes
- Post-parsing -removing incorrect ways: 6 minutes
- Post-parsing -caching ways geometries: 4 minutes

Total time: 50 minutes.

I have no idea about the meaning of these phases nor what the resulting tables
(node, way, way_member, relation, relation_member etc.) are containing. I was
hoping that the database would be something I could use directly with QGis and
other GIS programs, but it is not.  It is strictly meant for the OSM editor
plugin of QGis.  

-Jukka Rahkonen-







More information about the dev mailing list