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

Brett Henderson brett at bretth.com
Wed Mar 3 01:21:00 GMT 2010


Hi Ævar,

Can you provide the full error output from Osmosis.  I suspect there's a
"caused by" nested exception that provides the root cause for the error.

As for SQLite support, it's a nice idea but a non-trivial amount of work.
I'm happy to give somebody guidance on adding it, but I don't have time
myself.

Brett

On Tue, Mar 2, 2010 at 11:07 PM, Ævar Arnfjörð Bjarmason
<avarab at gmail.com>wrote:

> I maintain some statistics on the country dump for Iceland so as part
> of a daily cronjob I do:
>
>    * drop database osm_iceland;
>    * cd rails_port && rake db:migrate
>    * osmosis import Iceland.osm
>
> Is it possible to to skip the step where I have to maintain a database
> copy of the rails port? I've tried script/contrib/apidb_0.6.sql in the
> osmosis distribution as well as using
> examples/pgsql_simple_schema_0.6.sql with the appropriate
> createdb/createlang statements & a postgis setup but I always get
> "Unable to check if user with id -1 exists in the database." from
>
> org.openstreetmap.osmosis.core.apidb.v0_6.impl.UserManager.doesUserExistInDb(UserManager.java:96).
>
> It would be really nice if there was an option in osmosis that I could
> use to tell it to create a simple database from a given .osm file from
> scratch, I.e. do the required CREATE TABLE operations to populate
> something like an apidb with nodes/ways/relations and their tags.
>
> It would be even better if it could write to an SQLite database, then
> it would be trivial to turn a .osm file into a .sqlite file for easy
> querying of the data. There's a lot of tools in the OSM SVN that could
> use something like this but right now they just implement their own
> ad-hoc XML parsing in a while (<>) {}.
>
> Consider this mainly a feature request. If someone's interested in
> implementing SQLite support I can help with that, I'm just lost with
> Java.
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100303/acbc70ab/attachment.html>


More information about the dev mailing list