[GRASSLIST:1029] Re: srtm

Sandro Klippel sandro.klippel at talha-mar.com.br
Tue Aug 26 16:45:05 EDT 2003


Ian, 

You can use 'grdlandmask' from GMT tools to create a 'grid mask'.
Then, import it with 'grdreformat' and 'r.in.bin'.

Like this:

# create gmt grid with 0/1 30" resolution for 54W-50W 28S-34S region
 
grdlandmask -Gmask.grd -I30c -R-54/-50/-34/-28 -Df -N0/1/1/1/1

# convert from netcdf to binary format

grdreformat mask.grd=0 mask.bin=1

# import it to grass

r.in.bin -h input=mask.bin output=mask

# and set it as a mask with 'r.mask'

# or

# import directly to a mask

r.in.bin -h input=mask.bin output=MASK

# then clip the raster with 'r.mapcalc'

r.mapcalc "srtm.clipped=srtm"


On Tue, 2003-08-26 at 13:20, Ian Macmillan wrote:
> Hi all, you all have been very helpful in the past, so I am hoping you keep your
> patience with me.
> 
> I have downloaded some SRTM data from the USGS web site, and it so happens that
> my data is near the coast.  My trouble is that SRTM actually records some
> anomalous data out in the oceans.  I have bathymetry data that i would like to
> view along with topography, but the ocean data is a bit difficult to get rid of
> from the SRTM.  My thought is that I might be able to take the coast lines
> generated from GMT, import those into GRASS, and then somehow mask out all data
> from the SRTM that lies outside of those coastlines.
> 
> Does anyone have any experience with this?  Is there another way that I am
> ignoring?
> 
> I thought I saw an email about this recently, but I couldn't find it in the
> archives.
> 
> thanks, Ian
-- 
Sandro Klippel <sandro.klippel at talha-mar.com.br>

talha-mar projetos ambientais
Conselheiro d'Avila 190 
Porto Alegre,RS 91040-450
+55 (51) 3344-7451

w w w . t a l h a - m a r . c o m . b r




More information about the grass-user mailing list