[GRASS-dev] [GRASS GIS] #1726: r.plane
GRASS GIS
trac at osgeo.org
Sun Sep 9 18:43:21 PDT 2012
#1726: r.plane
-------------------------+--------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Python | Version: svn-trunk
Keywords: r.plane | Platform: All
Cpu: All |
-------------------------+--------------------------------------------------
Hi,
The r.plane script (all versions) does a bit of a funny thing, it takes as
input azimuth as degrees CCW from north.
Which is a bit weird, as it's neither the nautical compass convention
(degrees CW from north), nor the mathematical convention that grass
usually uses (theta measured CCW from the +x axis).
before I change it, does anyone know why it might intentionally be weird
like that?
as with d.barb and some other modules, the updated version would give you
the alternate option to work in nautical convention.
{{{
type_opt = G_define_option();
type_opt->key = "aspect_type";
type_opt->type = TYPE_STRING;
type_opt->required = NO;
type_opt->answer = "cartesian";
type_opt->options = "cartesian,compass";
type_opt->description = _("Direction map aspect type");
}}}
the test case I'm working with is to make a generalized background trend
map by taking some raster data, use r.slope.aspect + r.univar to find the
average slope,dx,dy maps, then use atan2(dy,dx) to find the mean azimuth.
then use raster map's center x,y,z value as the pivot point for r.plane.
(probably should use median(z) instead of center-z for that?)
another point of refinement is to take the center-of-gravity center cell
as the pivot point not the center of the region, as there may be block of
null cells not contributing to the mean. To find the COG there is the
v.points.cog addon script, but I suspect the method may be a bit
inefficient. any other modules that could do that?
thoughts?
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1726>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list