I am trying to deal with some osc (osm change) files, and put them into PostgreSQL database with Osmosis, but it seems that, Osmosis won't work with --read-xml-change and --tag-filter together. I have the following code:

osmosis --read-xml-change file=source/file.osc outPipe.0="SOURCE" \
        --tf accept-ways highway=motorway,primary inPipe.0="SOURCE" outPipe.0="step1" \
        --tag-filter reject-relations \ 
        --used-node inPipe.0="step1" outPipe.0="step2" \               
        --wpc database=mydb user=postgres inPipe.0="step2"

(formatted code in order to be readable)

Then the following error message comes:

Task 2-tf does not support data provided by input pipe SOURCE.

How can I provide a pipe to make it run without errors or how can I apply filters and insert change file into database?

without pipes and filters Osmosis were able to write osc files to the database

I tried only with just read change file and convert it to osm and it also fails with this message:

Task 2-wx does not support data provided by default pipe stored at level 1 in the default pipe stack.

Osmosis version is: 0.45-52-gd4e52fd-SNAPSHOT

asked 11 Sep, 14:48

horvatha's gravatar image

horvatha
1114
accept rate: 0%

edited 11 Sep, 15:07


You cannot do what you are planning to do because the osc file does not contain enough information. For example, consider a motorway with three nodes that exists in the OSM database. Now I move these nodes to another continent. The osc file will contain the information that the nodes have moved, but it will not contain anything about the way (which is, in OSM's data model, unchanged, consisting now as before of the same three nodes). Your filter query would then fail to detect that the three nodes are actually relevant for your motorway subset and drop them.

permanent link

answered 11 Sep, 15:40

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
60.6k74564949
accept rate: 23%

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:

×448
×167
×102
×92
×5

question asked: 11 Sep, 14:48

question was seen: 192 times

last updated: 11 Sep, 15:40

powered by OSQA