Opened 12 years ago

Last modified 5 years ago

#1726 new enhancement

r.plane: change azimuth option to be CCW from the +x axis

Reported by: hamish Owned by: grass-dev@…
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 hamish, 12 years ago

Summary: r.planer.plane: change azimuth option to be CCW from the +x axis

comment:2 by martinl, 8 years ago

Milestone: 7.0.07.0.5

comment:3 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:4 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:5 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:6 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:7 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:8 by martinl, 5 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:9 by martinl, 5 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.