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

Hello ! I want to read a big pbf file (europe.osm.pbf) only one time and filter tags twice on it, so i'm using --tee 2

time osmosis \
    --read-pbf europe.pbf \
    --log-progress \
    --tee 2 \
    \
          --tag-filter accept-relations route=bus \
          --used-way \
          --tf reject-relations \
          --used-node \
          --tag-filter reject-ways building=yes \
                                   public_transport=platform \
                                   highway=construction \
    outPipe.0="bus_route" \
    \
          --tag-filter reject-relations \
          --tag-filter accept-ways highway=motorway,motorway_link \
          --tag-filter reject-ways disused=yes \
                                   highway=construction \
          --used-node \
    outPipe.0="freeways" \
  --merge inPipe.0="bus_route" inPipe.1="freeways"  --write-pbf bus_route_and_freeways.pbf

but this does not work : no error, but osmosis is running forever.

asked 12 Jan '18, 21:42

djakk's gravatar image

djakk
16112
accept rate: 0%


This problem is explained in https://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.46: "If both inputs for the merge are coming from the same thread (e.g. using the tee task followed by the merge task), Osmosis will experience deadlock and the operation will never finish. One solution to this deadlock problem is to read the data in two separate tasks."

It might be easier to simply read the file twice. If you can use the osmium-tool command line program, that will be even quicker.

permanent link

answered 12 Jan '18, 22:31

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thanks a lot Frederik ! I've just installed osmium this morning, it is very fast indeed :O

(13 Jan '18, 09:58) djakk

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:

×252

question asked: 12 Jan '18, 21:42

question was seen: 3,319 times

last updated: 15 Jan '18, 12:06

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