osmfilter and convert create empty osm files

Hello My objective is to create a csv file of all the shops in graz located in the country of austria.

Since I don’t have enough space to unzip the austria osm file so I used bzcat to unzip from the terminal.

i used the graz.poly file to help me filter the shops in graz.

this is how my command with pipes looks like.


bzcat 2018-austia-latest.osm.bz2 | osmconvert - -B=Graz.poly -o=mys.osm | ./osmfilter mys.osm --keep= --nodes="shops=" -o=graz_shops.osm | ./osmconvert graz_shops.osm --all-to-nodes --csv="@id @lon @lat name" -o=grazshops.csv

however when i enter this in the terminal

I get osmfilter error: file empty: graz_shops.osm osmconvert error: file empty: mys.osm

can anyone tell me what I am doing wrong? thank you in advance

I think osmfilter cannot read from a pipe, besides that you tell osmcomvert to write the output to file mys.osm.
Not sure what you need on *nix to execute osmfilter after osmconvert, is it & instead of | ?

You should also use mys.o5m instead, it is much faster and neds less space.

i asked our tutor from university and he said we can only use osm files and then we have to convert it to csv.

this time i unzipped the osm file and used this command


osmfilter 2018-austria-latest.osm --keep= --keep-nodes="shops=graz" -o=grazshops.osm |osmconvert - -B=Graz.poly -o=grazshops.osm |osmconvert - --all-to-nodes --csv="@id @lon @lat name" -o=grazshops.csv

i still get empty files

we have to use unix command line to complete this task.
no matter how much I try i always get empty files.
really don’t know how to solve this

“shops=graz” doesn’t seem right. There’s probably no OSM object with key “shop” and value “graz”.

You can use the following query in overpass turbo to validate your results: https://overpass-turbo.eu/s/DWu