[GRASS-user] Some questions about DEMs

David Townshend aquavitae69 at gmail.com
Fri Jul 9 07:53:29 EDT 2010


On Fri, Jul 9, 2010 at 12:50 PM, Hamish <hamish_b at yahoo.com> wrote:
>
> 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
>

Thanks for the reply.

I don't entirely understand what you mean by on-the-fly resampling.
Surely the raster needs to be created at a high resolution to start
with, which means quite a lot of processing? I'm considering areas of
several hundred square kilometers at less than 5m res. Would the best
approach, then, be to patch the contours and points, and create a
single hi-res raster?

I understand how to create the mask from a polygon, the problem is
that I don't have the area or coastline.  What I'd like to do is to
automatically generate a polygon covering, for example, all the
contours, but without extending far past them.

David


More information about the grass-user mailing list