Opened 9 years ago

Closed 4 years ago

#2526 closed enhancement (fixed)

extend r.slope.aspect to compute the values at the edges

Reported by: hellik Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Raster Version: svn-trunk
Keywords: slope Cc:
CPU: All Platform: All

Description (last modified by neteler)

taken from the ML

http://lists.osgeo.org/pipermail/grass-dev/2015-January/072779.html

Helena Mitasova - Sun Jan 4 06:36:27 PST 2015

Another way would be to modify r.slope.aspect to compute the values at the edges - a second order polynomial min.square approximation is used to estimate the derivatives in r.slope.aspect (you get the well known differencing function when you do the math) and it can be used also to compute the values at the edge cells, but I had no luck convincing others that it is the right thing to do.

I believe that any reasonable estimate is better than the current shrinking region (in r.flow we just propagate the same values to the edges), but that does not seem to be the consensus.

Also, implementation for the edges is not straightforward because of how GRASS works with rows, but a smart developer could certainly do it.


It would be nice that r.slope.aspect compute the values at the edges, at least as an option. I agree that any reasonable estimate is better than the current shrinking region.

Attachments (1)

rslopeaspect_output.png (238.7 KB ) - added by veroandreo 5 years ago.
output of r.slope.aspect using -e flag which is supposed to fix the issue of a missing pixel line in all edges

Download all attachments as: .zip

Change History (15)

comment:1 by neteler, 9 years ago

Description: modified (diff)

comment:2 by neteler, 8 years ago

Milestone: 7.1.07.2.0

Milestone renamed

comment:3 by neteler, 7 years ago

Milestone: 7.2.07.2.1

Ticket retargeted after milestone closed

comment:4 by martinl, 7 years ago

Milestone: 7.2.17.2.2

comment:5 by martinl, 7 years ago

Milestone: 7.2.27.4.0

All enhancement tickets should be assigned to 7.4 milestone.

comment:6 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:7 by mmetz, 6 years ago

Implemented in r72653 with a new -e flag to compute values at edges, idea and method from gdaldem -compute_edges.

comment:8 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:9 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:10 by martinl, 5 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:11 by martinl, 5 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

in reply to:  7 ; comment:12 by veroandreo, 5 years ago

Replying to mmetz:

Implemented in r72653 with a new -e flag to compute values at edges, idea and method from gdaldem -compute_edges.

I just discovered the issue of null borders in the output of G7:r.slope.aspect and I tested this flag in grass dev, but nothing changes. Is there anything else that needs to be set?

This is what I do:

g.region vector=firestations align=elev_state_500m
r.slope.aspect -e elevation=elev_state_500m slope=slope_500 aspect=aspect_500

The output still has one pixel less all over the 4 borders. See the attachment.

by veroandreo, 5 years ago

Attachment: rslopeaspect_output.png added

output of r.slope.aspect using -e flag which is supposed to fix the issue of a missing pixel line in all edges

in reply to:  12 comment:13 by mmetz, 4 years ago

Replying to veroandreo:

I just discovered the issue of null borders in the output of G7:r.slope.aspect and I tested this flag in grass dev, but nothing changes. Is there anything else that needs to be set?

You discovered a bug regarding the -e flag, fixed in master 1e46d88 and relbr78 1496ee1.

comment:14 by veroandreo, 4 years ago

Resolution: fixed
Status: newclosed

thanks! looks good now :) Closing this one as fixed.

Note: See TracTickets for help on using tickets.