I want to filter the map of Denmark downloaded from Geofabrik.

What I would like are the following ways:


And also, I'd like the following nodes:


I've been trying using the filter options in osmosis using the following setup created in OSMembrane:

osmosis.bat ^
--read-pbf file=Dropbox/Documents/P6/Data/denmark-latest.osm.pbf outPipe.0=1 ^
--tee 2 inPipe.0=1 outPipe.0=2 outPipe.1=3 ^
--way-key-value keyValueList=highway.motorway,highway.motorway_link,highway.trunk,highway.trunk_link,highway.primary,highway.primary_link,highway.secondary,highway.unclassified,highway.tertiary inPipe.0=2 outPipe.0=4 ^
--node-key-value keyValueList=amenity.fuel inPipe.0=3 outPipe.0=5 ^
--merge inPipe.0=5 inPipe.1=4 outPipe.0=6 ^
--write-xml file=Dropbox/Documents/P6/Data/Output.osm.xml inPipe.0=6

However, when I run this, osmosis start, but never finishes. When I look in my Windows Task Manager, it looks the the task is not even running at all. No CPU is being used. It just stays at the state "INFO: Pipeline executing, waiting for completion.".

Any ideas?

asked 23 Feb '14, 10:21

A_Strandfelt's gravatar image

accept rate: 0%

edited 23 Feb '14, 10:22

Read the Osmosis wiki page for the --tag-filter option which explains the deadlock problem. You are not using --tag-filter but the issue is the same.

permanent link

answered 23 Feb '14, 11:00

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 24%


Thanks. I tried using the structure from the suggested example and replaced them with my code. However, I now get an exception: "The following named pipes (nodes, ways) and 0 default pipes have not been terminated with appropriate output sinks.". The setup can be seen here: http://pastebin.com/Gm4J20XB

Do I need to make it wait for the tasks to be completed before merging or something? If so, how?

(23 Feb '14, 11:42) A_Strandfelt

Your command looks all right but I am not familiar with the caret character at the end of line; if this means "line continues" then the empty line (newline) just before --merge might be the problem since the shell believes that the command terminates there.

(23 Feb '14, 18:44) Frederik Ramm ♦
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 23 Feb '14, 10:21

question was seen: 3,794 times

last updated: 23 Feb '14, 18:44

powered by OSQA