[GRASS-dev] r.cog module for center of gravity and planar trend

Hamish hamish_b at yahoo.com
Tue Sep 11 14:54:05 PDT 2012


Hamish wrote:
> > The module will also allow you to calculate the average
> > azimuth and dip angle of the 2.5D raster surface, and
> > optionally use that information, together with the above pivot
> > point, to create a new planar-trend raster surface generalizing
> > the DEM using the r.plane module.
> ...
> > There's a bug in the dip angle method though, in so far as I
> > haven't figured out the best way to calculate that yet.
> 
> ok, I've improved on the previous method a bit, but it's still
> not right.
> 
> the latest idea to get the overall trend dip angle is to take
> the slope map, and for each cell do some trig using tan(slope)
> angle and the cell width to find a dz. Then use r.univar to sum
> up all of the dz to find the residual overall "z", then use
> atan() to get back to an angle. But the result is still off.

slope from r.slope.aspect is really the magnitude of the slope,
so always positive, and all of the little dz's become additive
instead of canceling each other out to come up with a residual
value ...


> any ideas?
> 
> 
> thanks,
> Hamish



More information about the grass-dev mailing list