NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I successfully installed the rail port following the official tutorial on ubuntu but i can't import my country in my db. Somewhere else i read that this is not the user's fault but more of an inconsistency in my .osm file. But if so, then how can i avoid it? Is there a way to make osmosis ignore these errors. How do other people install the rail port with such things going on?

INFO: Pipeline executing, waiting for completion.
    Oct 25, 2011 10:01:41 AM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-xml-0.6 failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to load current way nodes.
    at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.populateCurrentWays(ApidbWriter.java:975)
    at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.populateCurrentTables(ApidbWriter.java:1026)
    at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.complete(ApidbWriter.java:1051)
    at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:110)
    at java.lang.Thread.run(Thread.java:679)
Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "current_way_nodes" violates foreign key constraint "current_way_nodes_node_id_fkey"
  Detail: Key (node_id)=(26069636) is not present in table "current_nodes".
    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:367)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360)
    at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.populateCurrentWays(ApidbWriter.java:972)
    ... 4 more
Oct 25, 2011 10:01:41 AM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: 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:92)
    at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
    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:329)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:31)

asked 25 Oct '11, 08:18

alexz's gravatar image

alexz
225212226
accept rate: 0%

edited 26 Oct '11, 07:45


It's an inconsistency in your .osm file, as you put in your question.

The most likely cause of this is that you have an extract which was created with the standard osmosis settings - which means that if a way references nodes outside of the bbox requested, the extra nodes are not included and so the extract has "incomplete" ways. Or the same thing with relations.

See the Detailed Usage description of the bbox tasks of osmosis for more details.

To solve this, you will either need to obtain an extract with completed ways and relations, or make your own with the "completeWays" and "completeRelations" flags set to true. Alternatively, you can use the "clipIncompleteEntities" to alter the ways and relations in order that they won't refer to missing entities.

permanent link

answered 26 Oct '11, 09:47

Andy%20Allan's gravatar image

Andy Allan
12.5k23128153
accept rate: 28%

Thanks i'll try that as soon as possible. Meanwhile, i can add that i was importing a country downloaded from cloudmade.com . Do you happen to know if they practice such things as not including the extra nodes?

(26 Oct '11, 10:16) alexz
1

I believe that's the case. You can try downloading from www.geofabrik.de instead - the extracts from there have completeWays set to true.

(26 Oct '11, 10:48) Andy Allan

I beleve geofabrik uses clipIncompleteEntities set and not completeWays. This means that you can not export the geofabrik data back to OSM.

(26 Oct '11, 11:25) Gnonthgol ♦
1

That's not the case - I checked with frederik before posting, and that matches what he's previously said on the mailing lists.

(26 Oct '11, 11:59) Andy Allan

Geofabrik has moved the planet splitting from osmosis to a program called 'history-splitter'.

(26 Oct '11, 12:13) ajoessen
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×293
×252

question asked: 25 Oct '11, 08:18

question was seen: 7,350 times

last updated: 26 Oct '11, 12:13

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum