[OSM-dev] Osmosis import to postgis - speed

S Knox roxyknox at yahoo.co.uk
Sat Dec 6 16:46:59 GMT 2008


For information, setting the variable DEFAULT_IN_MEMORY_LINESTRING in PostgreSqlDatasetWriterFactory.java to true caused the import to run much faster - about 1.5 hours. It may also have helped that I set the geometry correctly with the new geometry column, i.e:

SELECT AddGeometryColumn('ways', 'linestring', 4326, 'LINESTRING', 2);

Which I hadn't done before.

Regards

Steve

-----------------------------------------------------------------------------------------------------------------------
I'm using Osmosis to import a recent UK extract of the planet file into a database, and I used the simple schema here: http://svn.openstreetmap.org/applications/utils/osmosis/script/pgsql_simple_schema_0.6.sql

This took around 1 hour.

I then found that this schema didn't give way geometries so re-ran the query, adding a geometry column 'linestring' so that way objects would be created.

This import has taken 24 hours so far and isn't yet finished. Is this normal or has something gone wrong? It would be useful to have some sort of counter to find out how far into the process osmosis is - for example roughly what line of the XML it is on, as a percentage of the whole file.

Admittedly I am going against advice and using .bz2 files, but it appears postgresql is causing all the overhead.

Thanks

Steve


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20081206/29d61747/attachment.html>


More information about the dev mailing list