OpenStreetMap logo OpenStreetMap

bash script to get all the nodes ref-ed in one way.

h4ck3rm1k3 ಅವರಿಂದ 31 ಜುಲೈ 2009 ರಂದು English ನಲ್ಲಿ ಪೋಸ್ಟ್ ಮಾಡಲಾಗಿದೆ

export WAY=12345

#get the way
wget osm.org/api/0.6/way/$WAY

# rename the way to be way
mv $WAY $WAY.way

#get all the reffed nodes and get them
for x in `grep ref *.way | cut -d\" -f2`;
do echo $x;
#get them
wget osm.org/api/0.6/node/$x ;
#renamed them to node
mv $x $x.node;
done

#look at all the nodes
cat *.node | sort

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

TomHಅವರಿಂದ 07:52 ರಲ್ಲಿ 31 ಜುಲೈ 2009ರಂದು ಅಭಿಪ್ರಾಯ

onionಅವರಿಂದ 11:43 ರಲ್ಲಿ 31 ಜುಲೈ 2009ರಂದು ಅಭಿಪ್ರಾಯ

You can write directly to a given file with wget:
-O, --output-document=FILE write documents to FILE.

ಲಾಗಿನ್ ಅಭಿಪ್ರಾಯ ತಿಳಿಸಲು