[OSM-dev] Applying changes to partial import of db? (was: Problems with Planet-Excerpt Import into apidb)
Holger Schöner
numenor at ancalime.de
Fri May 22 17:31:19 BST 2009
Hi,
Am Fr, 22. Mai 2009 schrieb Holger Schöner:
[...]
> I have now succeeded in importing the Europe extract (I think at least, I
> have not used it for anything ...). If my further usage of the database
> is going to work well and nobody has objections or knows a better way, I
> can put the steps into the wiki. The sequence of steps I used is
I was under the impression (having read that somewhere?), that the change
files could also be used to update a previous import of only part of the
planet. I remember reading, that this would also introduce nodes outside the
bounding box of the original import, which could then be removed from the db
later on (if it should stay restricted to the bounding box).
Unfortunately, I seem not to be able to update the Europe-import with change
files, because (obviously ...) nodes are missing for ways which are to be
imported (which are probably outside the bounding box). Is there a way to do
this?
The only idea I have left is to completely leave out all constraints from
the database (which would need another day at least for testing, I guess),
such that osmosis does not fail with the way (and relation?) updates. Is
that, how people are handling partial imports? Could this break further
actions in the database (inside the original bounding box that is; outside I
am sure, this will break ...), like extracting smaller parts into xml-files?
The error I got when trying to apply an osc-file is:
numenor at ancalime:~/data/gps/osm/osmosis$ JAVACMD_OPTIONS='-Xmx1048m' osmosis
--read-xml-change-0.6 20090508-20090509.osc.gz compressionMethod=gzip --
write-apidb-change-0.6 validateSchemaVersion=no database=osm user=***
password=***
22.05.2009 17:01:09 org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.31.1
22.05.2009 17:01:09 org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
22.05.2009 17:01:09 org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
22.05.2009 17:01:09 org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
22.05.2009 17:58:04
org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager
waitForCompletion
SCHWERWIEGEND: Thread for task 1-read-xml-change-0.6 failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to insert
current way node with way id=3154287 and node id=14754788.
at
org.openstreetmap.osmosis.core.apidb.v0_6.impl.ChangeWriter.write(ChangeWriter.java:755)
at
org.openstreetmap.osmosis.core.apidb.v0_6.impl.ActionChangeWriter.process(ActionChangeWriter.java:56)
at
org.openstreetmap.osmosis.core.container.v0_6.WayContainer.process(WayContainer.java:60)
at
org.openstreetmap.osmosis.core.apidb.v0_6.ApidbChangeWriter.process(ApidbChangeWriter.java:67)
at
org.openstreetmap.osmosis.core.xml.v0_6.impl.ChangeSourceElementProcessor$ChangeSinkAdapter.process(ChangeSourceElementProcessor.java:134)
at
org.openstreetmap.osmosis.core.xml.v0_6.impl.WayElementProcessor.end(WayElementProcessor.java:108)
at
org.openstreetmap.osmosis.core.xml.v0_6.impl.OsmChangeHandler.endElement(OsmChangeHandler.java:94)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1774)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
at
org.openstreetmap.osmosis.core.xml.v0_6.XmlChangeReader.run(XmlChangeReader.java:107)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.postgresql.util.PSQLException: FEHLER: Einfügen oder
Aktualisieren in Tabelle »current_way_nodes« verletzt Fremdschlüssel-
Constraint »current_way_nodes_node_id_fkey«
Detail: Schlüssel (node_id)=(14754788) ist nicht in Tabelle
»current_nodes« vorhanden.
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:343)
at
org.openstreetmap.osmosis.core.apidb.v0_6.impl.ChangeWriter.write(ChangeWriter.java:752)
... 20 more
22.05.2009 17:58:04 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)
--
Holger Schoener numenor at ancalime.de
More information about the dev
mailing list