[GRASS-user] raster data to ascii

Martina Schaefer smartina at mun.ca
Fri Jun 13 17:21:03 EDT 2008


thanks for your answer to my raster/ascii questions and sorry for the 
late replay, I had to move to something else for a moment (deadline for 
corrections to a paper) and then I was a bit playing around with the 
commands you showed me.

g.region followed by r.stats or r.out.ascii does indeed what I was 
looking for, but in my Map Display window is still written the old 
resolution and I think the map is also drawn with the old resolution. Is 
there a possibility to do these?
In fact, the simple resampling with the nearest-neighbour is probably 
not good enough, so I was trying r.surf.idw as I can't make your 
commands r.resamp work, and I would like to visualize my interpolation 
without each time exporting to ascii and visualizing with another program!

Is there also a possibility to save the data with the new resolution, so 
that I don't have to do it each time?

And, one last question, I have three sets of raster data of the same 
region (ice thickness, bedrock and surface elevation of a glacier). How 
can I get them into the same grass LOCATION? I would like to have access 
to them at the same time and also make some simple operations like for 
example the difference of two of the datasets!

Thanks again for your help!


> 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.]

More information about the grass-user mailing list