2

So many tools support chaining, or piping in data from standard input. This can decrease times needed for disk writing and also better use the memory of a machine. Examples of chaining: GDAL - "Chaining", and osmconvert. For example:

bzcat europe.osm.bz2 | osmconvert - -o=europe.o5m

How can I do similar operations to include osmfilter? Something like this:

cat input.osm | osmfilter > output.osm
2

One potential non-answer, from the Ubuntu man page for osmfilter

The input file name must be supplied as command line argument.

The file must not be a stream.

Redirections from standard input will not work because the program needs random access to the file.

  • 2
    Interestingly the source code of osmfilter.c, specifically read_open(), contains code for reading from stdin. Possibly some old, obsolete code. I don't have a copy of osmfilter here but you could try if it works. Looks like just omitting the input filename is enough for triggering this code. – scai Mar 19 '18 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.