[OSM-dev] osm2pgsql not appending changeset?

Brett Henderson brett at bretth.com
Thu Dec 8 10:34:34 GMT 2011


On 8 December 2011 18:41, Ákos Maróy <akos at maroy.hu> wrote:

> On 08/12/11 08:23, Andre Joost wrote:
> > Am 08.12.2011 02:00, schrieb Ákos Maróy:
> >> On 07/12/11 01:28, Erik Johansson wrote:
> >>>
> http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.39#Replication_Tasks
> >>>
> >>>
> >>> Or the well written prose version:
> >>>
> http://ksmapper.blogspot.com/2011/04/keeping-database-up-to-date-with.html
> >>>
> >>> or lots of links in
> >>> http://wiki.openstreetmap.org/wiki/Osmosis/Examples
> >>
> >> I tried the above, and I got to the following error message:
> >>
> >> $   osmosis --rri $(pwd) --sc --wpc user="osm" database="osm"
> >> password="osm"
> >> Dec 08, 2011 1:56:12 AM org.openstreetmap.osmosis.core.Osmosis run
> >> INFO: Osmosis Version 0.34
> >
> > ...
> >
> >>
> >> I wonder what I'm doing wrong..
> >>
> >
> > outdated osmosis version?
> > current is 0.40
>
> same error with 0.40.1:
>
> $ ../osmosis-0.40.1/bin/osmosis --rri $(pwd) --sc --wpc user="osm"
> database="osm" password="osm"
> Dec 08, 2011 8:38:45 AM org.openstreetmap.osmosis.core.Osmosis run
> INFO: Osmosis Version 0.40.1
> Dec 08, 2011 8:38:45 AM org.openstreetmap.osmosis.core.Osmosis run
> INFO: Preparing pipeline.
> Dec 08, 2011 8:38:45 AM org.openstreetmap.osmosis.core.Osmosis run
> INFO: Launching pipeline execution.
> Dec 08, 2011 8:38:45 AM org.openstreetmap.osmosis.core.Osmosis run
> INFO: Pipeline executing, waiting for completion.
> Dec 08, 2011 8:39:19 AM
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> loadBeanDefinitions
> INFO: Loading XML bean definitions from class path resource
> [org/springframework/jdbc/support/sql-error-codes.xml]
> Dec 08, 2011 8:39:19 AM
> org.springframework.jdbc.support.SQLErrorCodesFactory <init>
> INFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL,
> MySQL, Oracle, PostgreSQL, Sybase]
> Dec 08, 2011 8:39:19 AM
> org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager
> waitForCompletion
> SEVERE: Thread for task 1-rri failed
> org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad
> SQL grammar [SELECT version FROM schema_info]; nested exception is
> org.postgresql.util.PSQLException: ERROR: relation "schema_info" does
> not exist
>  Position: 21
>        at
>
> org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:233)
>        at
>
> org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
>        at
> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:406)
>        at
> org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:455)
>        at
> org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:463)
>        at
>
> org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:471)
>

Osmosis can't write directly to an osm2pgsql schema.  The --wpc task
supports the Osmosis pgsnapshot schema which is very different.  I think
you'll need to change the --wpc task to be a --wxc task and then pipe the
XML into osm2pgsql.  I don't know what syntax you'll need to provide the
osm2pgsql command, but this wiki page might be helpful.
http://wiki.openstreetmap.org/wiki/Minutely_Mapnik

That page seems to suggest writing to an XML file then reading that into
osm2pgsql separately, but I think piping directly from Osmosis to osm2pgsql
should be simpler and more reliable.

Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20111208/ff4363b1/attachment.html>


More information about the dev mailing list