[GRASS-user] raster data to ascii
Glynn Clements
glynn at gclements.plus.com
Wed Jun 4 18:51:33 EDT 2008
Martina Schaefer wrote:
> I have another question regarding raster data.
> I have some raster data on a 1000x1000 grid. I would like to export it
> with various gridspacings, for ex. 500x500 or 200x500.
> I'm bit lost between r.statsm r.out.ascii, the interpolation methods and
> r.resample.
> Either I don't get an ascii output, or I can't change the resolution..
r.out.ascii exports the data after it has been resampled according to
the current region. IOW, the output will have as many rows and columns
as the current region.
If you wish the output data to be resampled by nearest-neighbour, you
can just change the region resolution with g.region then use
r.out.ascii.
If you want some other form of resampling, first change the region,
then explicitly resample the map with e.g. r.resamp.interp or
r.resamp.stats, then export the resampled map with r.out.ascii.
r.resample makes a direct copy of its input, resampled using GRASS'
built-in nearest-neighbour resampling, so r.resample only has limited
utility.
[AFAICT, it's primary use is to reduce disk space and/or CPU usage. If
you will be reading a map repeatedly at a significantly reduced
resolution, using a resampled copy may be faster than having GRASS
continually resample the higher resolution version.]
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list