Opened 12 years ago
Last modified 6 years ago
#1726 new enhancement
r.plane: change azimuth option to be CCW from the +x axis
Reported by: | hamish | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.6.2 |
Component: | Python | Version: | svn-trunk |
Keywords: | r.plane | Cc: | |
CPU: | All | Platform: | All |
Description
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
Change History (9)
comment:1 by , 12 years ago
Summary: | r.plane → r.plane: change azimuth option to be CCW from the +x axis |
---|
comment:2 by , 9 years ago
Milestone: | 7.0.0 → 7.0.5 |
---|
comment:3 by , 8 years ago
Milestone: | 7.0.5 → 7.3.0 |
---|
comment:4 by , 8 years ago
Milestone: | 7.3.0 → 7.4.0 |
---|
comment:6 by , 7 years ago
Milestone: | 7.4.1 → 7.4.2 |
---|
comment:7 by , 6 years ago
Milestone: | 7.4.2 → 7.6.0 |
---|
All enhancement tickets should be assigned to 7.6 milestone.
Milestone renamed