This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

write an osm file to a different path

0

Hi im trying to filter an osm file but i want the created file, to be in different folder rather than one im currently in, the command i use is sudo osmosis --read-pbf "/home/ubuntu/osmosis/bin/andorra-latest.osm.pbf" --tf accept-ways highway=motorway,motorway_link,trunk,trunk_link --tf reject-relation --used-node --write-xml "home/ubuntu/osmosis/bin/andorra-latest.osm"

this is the path i want to write my xml to --write-xml "home/ubuntu/osmosis/bin/andorra-latest.osm"

this is the error i am getting :

Caused by: java.io.FileNotFoundException: home/ubuntu/osmosis/bin/andorra-latest.osm (No such file or directory) any help would be much appreciated

asked 26 Nov '20, 17:42

shafi-as's gravatar image

shafi-as
107712
accept rate: 0%


One Answer:

2

You are missing a / before the "home" in your output path:

/home/ubuntu/osmosis/bin/andorra-latest.osm

answered 26 Nov '20, 17:46

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 26 Nov '20, 17:50

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866

1

Thanks appreciate it :)

(26 Nov '20, 18:05) shafi-as

Source code available on GitHub .