[osm-goettingen] osmosis
Torsten Lange
tlange at gwdg.de
Wed Jul 27 17:40:11 CEST 2011
Hi,
nach dem letzten Einfuehrungskurs in OSM (nochmal Danke!) kommt nun schneller
als erwartet meine erste Anwendung. D.h. Nutzung von OSM-Daten in einem GIS
Projekt zur Lageausweisung von Orten etc.
Ziel war das Zusammenführen zweier OSM-Datensaetze, die Extraktion eines
Subsets (bounding box) und das Schreiben in eine Postgis-Datenbank. Bis auf
letzteres klappt alles. Es gibt allerdings zwei Warnings:
--------------------------------------------------------
log4j:WARN No appenders could be found for logger
(org.java.plugin.ObjectFactory).
log4j:WARN Please initialize the log4j system properly.
--------------------------------------------------------
Hat jemand eine Idee?
Beim Schreiben in die Datenbank (siehe Task 3) gibt es allerdings irgend einen
boesen Fehler. Ich habe es auch mit einem pgsql file dump versucht.
Sieht/vermutet irgend jemand was verdaechtiges/typisches?
Dank und Gruss,
Torsten
Task1: Merge zwei Datensatze (Niedersachsen/Nordrhein-Westfalen Quelle:
Geofabrik-Seite)
#######################################################################
osmosis --rx niedersachsen.osm --rx nordrhein-westfalen.osm --merge --wx
niesachs_nordrhein_merge.osm
27.07.2011 16:21:27 org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.34
log4j:WARN No appenders could be found for logger
(org.java.plugin.ObjectFactory).
log4j:WARN Please initialize the log4j system properly.
27.07.2011 16:21:28 org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
27.07.2011 16:21:28 org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
27.07.2011 16:21:28 org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
27.07.2011 16:27:34 org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
27.07.2011 16:27:34 org.openstreetmap.osmosis.core.Osmosis run
INFO: Total execution time: 367204 milliseconds.
Task2: Extrahiere Subset aus zusammengefügten Datensatz (klappt)
#######################################################################
osmosis --read-xml enableDateParsing=no file=niesachs_nordrhein_merge.osm --
bounding-box top=52.25 left=6.15 bottom=51.25 right=8.95 --write-xml
file=niesachs_nordrhein_reduced.osm
27.07.2011 16:39:49 org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.34
log4j:WARN No appenders could be found for logger
(org.java.plugin.ObjectFactory).
log4j:WARN Please initialize the log4j system properly.
27.07.2011 16:39:49 org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
27.07.2011 16:39:49 org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
27.07.2011 16:39:49 org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
27.07.2011 16:43:42 org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
27.07.2011 16:43:42 org.openstreetmap.osmosis.core.Osmosis run
INFO: Total execution time: 233482 milliseconds.
#######################################################################
Task3:
Lade den neuen Datensatz in eine PostGIS-Datenbank weder Option [--write-
pgsql-dump] noch [--write-pgsql] funktionieren (siehe print out)
#######################################################################
Version mit --write-pgsql-dump
#######################################################################
osmosis --read-xml file="niesachs_nordrhein_reduced.osm" --write-pgsql-dump
database="XXXX" user="XXXX"
ODER
osmosis --read-xml file="niesachs_nordrhein_reduced.osm" --write-pgsql-dump
file="niesachs_nordrhein_reduced.sql"
ODER
osmosis --read-xml file="niesachs_nordrhein_reduced.osm" --write-pgsql-dump
database="XXXX" user="XXXX" file="niesachs_nordrhein_reduced.sql"
LIEFERN GLEICHEN FEHLER:
27.07.2011 17:10:26 org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.34
log4j:WARN No appenders could be found for logger
(org.java.plugin.ObjectFactory).
log4j:WARN Please initialize the log4j system properly.
27.07.2011 17:10:26 org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
27.07.2011 17:10:26 org.openstreetmap.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Argument user for task
2-write-pgsql-dump was not recognised.
at
org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory.createTaskManager(TaskManagerFactory.java:64)
at
org.openstreetmap.osmosis.core.pipeline.common.Pipeline.buildTasks(Pipeline.java:50)
at
org.openstreetmap.osmosis.core.pipeline.common.Pipeline.prepare(Pipeline.java:112)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:79)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:328)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
#######################################################################
#######################################################################
Version mit --write-pgsql
#######################################################################
osmosis --read-xml file="niesachs_nordrhein_reduced.osm" --write-pgsql
host="XXXX" database="XXXX" user="XXXX"
27.07.2011 17:21:37 org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.34
log4j:WARN No appenders could be found for logger
(org.java.plugin.ObjectFactory).
log4j:WARN Please initialize the log4j system properly.
27.07.2011 17:21:37 org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
27.07.2011 17:21:37 org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
27.07.2011 17:21:37 org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
27.07.2011 17:21:37
org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager
waitForCompletion
SCHWERWIEGEND: Thread for task 1-read-xml failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to read the
schema version from the schema info table.
at
org.openstreetmap.osmosis.core.pgsql.common.SchemaVersionValidator.validateDBVersion(SchemaVersionValidator.java:92)
at
org.openstreetmap.osmosis.core.pgsql.common.SchemaVersionValidator.validateVersion(SchemaVersionValidator.java:52)
at
org.openstreetmap.osmosis.core.pgsql.v0_6.PostgreSqlWriter.initialize(PostgreSqlWriter.java:237)
at
org.openstreetmap.osmosis.core.pgsql.v0_6.PostgreSqlWriter.process(PostgreSqlWriter.java:875)
at
org.openstreetmap.osmosis.core.xml.v0_6.impl.NodeElementProcessor.end(NodeElementProcessor.java:117)
at
org.openstreetmap.osmosis.core.xml.v0_6.impl.OsmHandler.endElement(OsmHandler.java:107)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:604)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1320)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2732)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:741)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at
org.openstreetmap.osmosis.core.xml.v0_6.XmlReader.run(XmlReader.java:108)
at java.lang.Thread.run(Thread.java:636)
Caused by: org.postgresql.util.PSQLException: FEHLER: Relation »schema_info«
existiert nicht
Position: 21
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:252)
at
org.openstreetmap.osmosis.core.pgsql.common.SchemaVersionValidator.validateDBVersion(SchemaVersionValidator.java:73)
... 20 more
27.07.2011 17:21:37 org.openstreetmap.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks
failed.
at
org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:85)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:328)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
###########################################################################
More information about the Goettingen
mailing list