[GRASSLIST:10571] Making a two-band x,y file

Is there an easy way in grass to make a "GLT" file for a given input raster,
a two-band file where band 1 is the x location of the corresponding pixel in
the input, and band 2 is the corresponding y location?

-j

--

Jonathan A. Greenberg, PhD
NRC Research Associate
NASA Ames Research Center
MS 242-4
Moffett Field, CA 94035-1000
Office: 650-604-5896
Cell: 415-794-5043
AIM: jgrn3007
MSN: jgrn3007@hotmail.com

Is there an easy way in grass to make a "GLT" file for a given input
raster, a two-band file where band 1 is the x location of the
corresponding pixel in the input, and band 2 is the corresponding y
location?

g.region rast=map
r.mapcalc 'x_vals=x()'
r.mapcalc 'y_vals=y()'

?

http://grass.ibiblio.org/grass61/manuals/html61_user/r.mapcalc.html

or for list of cell coords:

r.stats -g

http://grass.ibiblio.org/grass61/manuals/html61_user/r.stats.html

?

Hamish