[GRASS-user] tiling and 'cliping' DEMs

Nikos Alexandris nik at nikosalexandris.net
Wed Sep 11 02:19:05 PDT 2019


* Helmut Kudrnovsky <hellik at web.de> [2019-09-10 20:12:09 -0700]:

>Rich Shepard wrote
>> I am downloading and importing 1m LiDAR DEMs for a 667 mi^2 (1727.5 km^2)
>> drainage basin. These are all in 7.5' topographic quad sections. The files
>> take up a lot of disk space and memory when working with them.
>>
>> I assume that by careful setting of the region I can display the
>> individual
>> maps as a single map, and I can set a computational mask using the vector
>> basin watershed (boundary). Is there way to 'clip' the DEM using the
>> watershed map in the way that v.clip works with two vector maps? While the
>> workstation has 32G RAM and 2T of disk space I would like to limit the DEM
>> to the drainage basin itself and exclude all areas outside it.
>>
>> Looking at all the r.* modules in core and extensions none strikes me as
>> the
>> appropriate tool.
>>
>> I'm open to advice on working with huge raster files.
>>
>> Regards,
>>
>> Rich
>> _______________________________________________
>> grass-user mailing list
>
>> grass-user at .osgeo
>
>> https://lists.osgeo.org/mailman/listinfo/grass-user
>
>To save diskspace,, build a virtual raster with your tiles outside GRASS  by
>GDAL's  buildvrt, do r.external yourvirtual.vrt.
>
>No import is needed for raster calculations, r.external to link the virtual
>raster works nicely..

If there is no need for a GDAL VRT, then, alternatively, link all tiles
as pseudo-raster maps in GRASS GIS' data base, of course using
`r.external`. Then, build a GRASS GIS virtual raster data set using
`r.buildvrt`. Clipping or "extracting" parts of this VRT will expectedly
work.

Nikos

>regarding to clip a raster to  vector extent, there a several ways. One may
>be: g.region  -a raster=yourraster vector=yourvector followed by a r.mask
>vector=yourvector then r.mapcal clippedraster=yourraster


More information about the grass-user mailing list