[GRASS-user] raster data to ascii

Glynn Clements glynn at gclements.plus.com
Fri Jun 13 23:37:28 EDT 2008


Martina Schaefer wrote:

> 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?

The GUI has its own set of region settings, so you need to change the
region from within the GUI to affect how a map is displayed within the
GUI.

Or you can explicitly resample the map with r.resamp, r.resamp.interp,
or r.resamp.stats, then display the resampled map in the GUI.

> 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,

Which version of GRASS are you using? r.resamp.interp and
r.resamp.stats aren't present in 6.2.3, only in 6.3.x.

> and I would like to visualize my interpolation 
> without each time exporting to ascii and visualizing with another program!

You can view the resampled maps in the GUI, or with d.rast.

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

Explicitly resampling the data will create a new map.

> 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!

Data is normally imported into the current location, unless you
explicitly import into a new location with e.g. r.in.gdal's location=
option.

If the rasters have different projections, you will need to import
each one into a separate location, then switch to the target location
and re-project the data with r.proj.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list