[GRASS-user] Some questions about DEMs

Hamish hamish_b at yahoo.com
Fri Jul 9 06:50:35 EDT 2010


David wrote:
> I have a couple of questions about DEMs, and how they work in GRASS.
> My application is hydrological and hydraulic analysis, and at the moment
> I'm investigating using r.sim.water to generate floodlines.
>
> Usually, for this sort of analysis, I would have 5m contours for the
> catchment and a detailed survey (i.e. spot heights, sometimes with
> triangles) for sections of river. So my first question is, what is the
> best way to generate a DEM from this information?

take your pick:
  http://grass.osgeo.org/wiki/Contour_lines_to_DEM

> I know that I can use r.surf.contour to create a DEM from the contours,
> and I'd assume that something like v.surf.rst would be best for the
> points, but I need a single DEM for the analysis.

you will see in the r.surf.contour help page that adding points is well
recommended. Use v.to.rast then r.patch to combine them with the rasterized
contour lines. (make sure points get priority)

> The second problem is that I don't need a highly detailed DEM for the
> catchment, I only need detail along the watercourses - i.e. where I have
> the detailed survey. If I create two DEMs at different resolutions, can
> I patch them without losing detail?

sure. I believe that Helena has an example of that in her & Markus's GRASS
book. Data is resampled to the current resolution on-the-fly though, so
it really doesn't cost you too much to just make the original data source
hi-res everywhere.

> My third question is about creating a mask. If I'm working along the
> coast, or if I'm creating a detailed DEM along the watercourse, I only
> want raster data where there is base data (i.e. contours or points). Is
> there a way to quickly generate a mask for this?

see the r.mask module. or use r.mapcalc to create a MASK map where
elevation > 0.   (the MASK map has value in areas to show, and is 0 or
NULL in areas to hide; and is only applied when reading raster data from
disk). If you have a vector polygon of the area/coastline it's easy to
do 'v.to.rast output=MASK'.


Hamish


      


More information about the grass-user mailing list