[GRASSLIST:1034] Re: srtm

Hamish hamish_nospam at yahoo.com
Tue Aug 26 23:34:18 EDT 2003


> What I usually do is convert a states/countries/landmass shapefile (or
> vector) into a grid with ones (1) and zeros (or nulls). I use this
> grid as a mask for r.mapcalc calculations.


Yes, I've done this too and it works well.

Get your bathymetery data into raster form using:
  - s.surf.rst or s.surf.idw  from a sites file
  - v.to.rast & r.surf.contour from vector contours (or v.surf.rst)

Then use the new bathymetry map as a MASK.
You can use r.mask or r.mapcalc to do this.

The r.mapcalc way might look somthing like:
r.mapcalc landonly="if(ocean<0, null(), land)"


You could also use r.patch to merge the two; indicate preference
for the bathymetry map by listing it first:
r.patch in=bathy,land out=bathy_and_land



Hamish




More information about the grass-user mailing list