[GRASS-user] Resample DEM to larger cells

I have a DEM built with 68 raster maps (attached) developed from LiDAR (1m)
data and reprojected using lanczos_f (which might have been a poorer choice
for this type of raster, but I wasn't aware of this at the time). There's
still a source map missing (I've contacted the source about this) but I want
to resample the maps to 5m x 5m cell size. I think that would eliminate some
of the sharp discrepancies in the assembled map.

There are five or six flavors of r.resample and I would appreciate advice on
which would be most appropriate for me to use on these data. I don't know
enough about the underlying algorithms to make an intelligent choice.

TIA,

Rich

(attachments)

draft-basin-dem.png

Hi Rich,

Please have a look at:
https://grass.osgeo.org/grass76/manuals/r.resamp.stats.html

With g.search.modules (https://grass.osgeo.org/grass76/manuals/g.search.modules.html) you can search for modules using keywords.

Also https://grass.osgeo.org/grass76/manuals/rasterintro.html has a section on resampling and you can get a brief overview over available options on: https://grass.osgeo.org/grass76/manuals/raster.html

Cheers
Stefan

-----Original Message-----
From: grass-user <grass-user-bounces@lists.osgeo.org> On Behalf Of Rich Shepard
Sent: onsdag 25. september 2019 21:26
To: grass-user@lists.osgeo.org
Subject: [GRASS-user] Resample DEM to larger cells

I have a DEM built with 68 raster maps (attached) developed from LiDAR (1m) data and reprojected using lanczos_f (which might have been a poorer choice for this type of raster, but I wasn't aware of this at the time). There's still a source map missing (I've contacted the source about this) but I want to resample the maps to 5m x 5m cell size. I think that would eliminate some of the sharp discrepancies in the assembled map.

There are five or six flavors of r.resample and I would appreciate advice on which would be most appropriate for me to use on these data. I don't know enough about the underlying algorithms to make an intelligent choice.

TIA,

Rich

On Wed, 25 Sep 2019, Stefan Blumentrath wrote:

Please have a look at:
https://grass.osgeo.org/grass76/manuals/r.resamp.stats.html

Stefan,

I don't need statistics on the raster map

Also https://grass.osgeo.org/grass76/manuals/rasterintro.html has a
section on resampling and you can get a brief overview over available
options on: https://grass.osgeo.org/grass76/manuals/raster.html

Yes, this information is also found elsewhere. It tells us what methods are
available and how they work but do not explain for what type of raster map
each is best suited; or, why should I select this one?

I'm looking to understand the situations for which each interpolation method
is best suited. Or, when more than one is possible, what criteria should be
applied to the choice.

Thank you,

Rich

Hi Rich,

Copy and paste from the raster commands overview:
"r.resamp.stats Resamples raster map layers to a coarser grid using aggregation."
I thought that was what you were up to, aggregate a higher resolution raster to 5m resolution, no?
Which aggregation method to use depends on your use case of course. For Hydrological applications I would probably use low percentiles (5 or 10%)...
If that was not the case, please reformulate your initial question.

In addition to r.resamp.stats, also in the manuals of r.resamp.filter, r.resamp.interp as well as r.resamp there is a description of the purpose the modules are intended for. Do I thus understand you correctly, that you ask for additional clarifications in the rasterintro?

Cheers
Stefan

-----Original Message-----
From: grass-user <grass-user-bounces@lists.osgeo.org> On Behalf Of Rich Shepard
Sent: torsdag 26. september 2019 00:50
To: grass-user@lists.osgeo.org
Subject: Re: [GRASS-user] Resample DEM to larger cells

On Wed, 25 Sep 2019, Stefan Blumentrath wrote:

Please have a look at:
https://grass.osgeo.org/grass76/manuals/r.resamp.stats.html

Stefan,

I don't need statistics on the raster map

Also https://grass.osgeo.org/grass76/manuals/rasterintro.html has a
section on resampling and you can get a brief overview over available
options on: https://grass.osgeo.org/grass76/manuals/raster.html

Yes, this information is also found elsewhere. It tells us what methods are available and how they work but do not explain for what type of raster map each is best suited; or, why should I select this one?

I'm looking to understand the situations for which each interpolation method is best suited. Or, when more than one is possible, what criteria should be applied to the choice.

Thank you,

Rich

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On Thu, Sep 26, 2019 at 12:49 AM Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Wed, 25 Sep 2019, Stefan Blumentrath wrote:

...

> Also https://grass.osgeo.org/grass76/manuals/rasterintro.html has a
> section on resampling and you can get a brief overview over available
> options on: https://grass.osgeo.org/grass76/manuals/raster.html

Yes, this information is also found elsewhere. It tells us what methods are
available and how they work but do not explain for what type of raster map
each is best suited; or, why should I select this one?

For an overview, there is:
https://grasswiki.osgeo.org/wiki/Interpolation

As usual, text snippets for manuals/raster.html are appreciated (via PR in
https://github.com/OSGeo/grass/blob/master/raster/rasterintro.html
). There is an easy "edit" symbol for casual contributors.

Maybe some info should be transferred from the Wiki page to rasterintro.html.

Markus

On Thu, 26 Sep 2019, Markus Neteler wrote:

For an overview, there is:
https://grasswiki.osgeo.org/wiki/Interpolation

As usual, text snippets for manuals/raster.html are appreciated (via PR in
https://github.com/OSGeo/grass/blob/master/raster/rasterintro.html
). There is an easy "edit" symbol for casual contributors.

Maybe some info should be transferred from the Wiki page to rasterintro.html.

Markus/Stefan,

I've worked on other analyses waiting for a missing DEM file to become
available.

Rather than resampling I'll stick with the 1m DEMs for now; perhaps will
find that aggregating to 5m would be better.

For this project, Stefan, the topographic analyses are geomorphic, not
hydrologic. I've a vector line map of the river network and for the intended
audience and project objective that's quite adequate.

However, I have a question (for anyone to answer) about working with this
basin topography.

There are 70 individual raster maps within the mask of the basin's watershed
boundary. Am I correct that speed-issues aside, I need to run r.buildvrt so
I have a single map as input to modules such as r.info (to identify the
highest elevation), r.slope, and others? While I understand that a mask
limits analyses to its area that is based on a single map extending beyond
the mask and not a collection of 70 'tiles'. Am I correct?

Are there alternatives to a virtual raster for situations like this?

Regards,

Rich

On 2019-10-01 at 17:48 -04, Rich Shepard <rshepard@appl-ecosys.com> wrote...

There are 70 individual raster maps within the mask of the basin's
watershed boundary. Am I correct that speed-issues aside, I need to
run r.buildvrt so I have a single map as input to modules such as
r.info (to identify the highest elevation), r.slope, and others? While
I understand that a mask limits analyses to its area that is based on
a single map extending beyond the mask and not a collection of 70
'tiles'. Am I correct?

r.univar can take multiple multiple maps as input and from that you could get max. r.slope and others would work best on a VRT or r.patch from the individual rasters.

Are there alternatives to a virtual raster for situations like this?

r.patch? Or for loop over all the individual rasters w/ r.info to find the max? That won't work for r.slope because of edge effects.

A VRT is probably easiest / best.

  -k.

On Tue, 1 Oct 2019, Ken Mankoff wrote:

r.univar can take multiple multiple maps as input and from that you could
get max. r.slope and others would work best on a VRT or r.patch from the
individual rasters.

Ken,

Thank you.

Are there alternatives to a virtual raster for situations like this?

r.patch? Or for loop over all the individual rasters w/ r.info to find the
max? That won't work for r.slope because of edge effects.
A VRT is probably easiest / best.

I'm trying r.patch. Wrote a script following the bash-format example and
it's not working. New thread for that.

Regards,

Rich

On Tue, 1 Oct 2019, Rich Shepard wrote:

I'm trying r.patch. Wrote a script following the bash-format example and
it's not working. New thread for that.

Now that Markus N pointed out that I left spaces around the equal sign in my
script I fixed that and it runs as intended.

Regards,

Rich