bash script to get all the nodes ref-ed in one way.
ߊ߬ ߟߊߦߟߍ߬ߣߍ߲߬ ߦߋ߫ h4ck3rm1k3 ߓߟߏ߫ 31 July 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
Discussion
ߡߙߌߣߊ߲ ߞߊ߬ ߝߘߊ߫ TomH ߟߊ߫ 31 July 2009 at 07:52 ߘߐ߫
You find find http://api.openstreetmap.org/api/0.6/way/$WAY/full a bit simpler ;-)
ߡߙߌߣߊ߲ ߞߊ߬ ߝߘߊ߫ onion ߟߊ߫ 31 July 2009 at 11:43 ߘߐ߫
You can write directly to a given file with wget:
-O, --output-document=FILE write documents to FILE.