osmcode / osmium-tool

Command line tool for working with OpenStreetMap data based on the Osmium library.
https://osmcode.org/osmium-tool/
GNU General Public License v3.0
509 stars 107 forks source link

Read failed when piped (osmium tags-filter) #206

Closed kkdd closed 3 years ago

kkdd commented 3 years ago

Hello, I have encounterd Read failed when using osmium tags-filter with piped:

$ wget https://download.geofabrik.de/asia/japan-latest.osm.pbf
$ osmium tags-filter -f pbf japan-latest.osm.pbf w/highway=motorway,motorway_link,service \
 | osmium tags-filter -R -F pbf - -i w/moped=yes -o motorway.osm.pbf
Read failed: Bad file descriptor
$
$ osmium --version
osmium version 1.13.0
libosmium version 2.16.0
Supported PBF compression types: none zlib

Copyright (C) 2013-2021  Jochen Topf <jochen@topf.org>
License: GNU GENERAL PUBLIC LICENSE Version 3 <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
joto commented 3 years ago

Thanks for the report. This should be fixed in the current master. If you can not use this, the workaround is, of course, to write the result of the first command to a temporary file and use that one.