Opened 11 years ago

Closed 6 years ago

Last modified 6 years ago

#1788 closed defect (fixed)

r.viewshed binary flag (-b) not working correctly

Reported by: cmbarton Owned by: grass-dev@…
Priority: normal Milestone: 7.4.0
Component: Raster Version: svn-trunk
Keywords: r.viewshed Cc:
CPU: Unspecified Platform: Unspecified

Description

The binary flag for r.viewshed makes viewed areas = 1 but unviewed areas = null(). Unviewed areas are supposed to be = 0.

For example:

r.viewshed -b input=elevation@PERMANENT output=a_view coordinate=634681,221947
GRASS 7.0.svn (nc_spm_08):~ > r.info -r a_view
min=1
max=1

Attachments (1)

viewshed.diff (2.7 KB ) - added by annakrat 9 years ago.
viewshed patch

Download all attachments as: .zip

Change History (12)

by annakrat, 9 years ago

Attachment: viewshed.diff added

viewshed patch

comment:1 by annakrat, 9 years ago

I attached a patch for this. If there are no objections, I will commit it.

in reply to:  1 ; comment:2 by annakrat, 9 years ago

Replying to annakrat:

I attached a patch for this. If there are no objections, I will commit it.

Done in r62467. The failing tests should be fixed tomorrow, I will backport it then.

in reply to:  2 comment:3 by annakrat, 9 years ago

Resolution: fixed
Status: newclosed

Replying to annakrat:

Replying to annakrat:

I attached a patch for this. If there are no objections, I will commit it.

Done in r62467. The failing tests should be fixed tomorrow, I will backport it then.

Done in 62497. Tests are running fine, so I take it as fixed.

comment:4 by annakrat, 9 years ago

Resolution: fixed
Status: closedreopened

Reopened because it works only when using internal memory. When using external memory mode, binary output gives 1 and nulls. It doesn't seem to be so easily fixable as the in-memory case, because I can't find an easy way to find out which cell should be 0 and which should be null.

comment:5 by martinl, 8 years ago

Milestone: 7.0.07.0.5

comment:6 by martinl, 8 years ago

Still the issue?

in reply to:  6 ; comment:7 by annakrat, 8 years ago

Milestone: 7.0.57.3.0

Replying to martinl:

Still the issue?

I don't think anything changed in r.viewshed, so yes.

comment:8 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

in reply to:  7 ; comment:9 by mmetz, 6 years ago

Replying to annakrat:

Replying to martinl:

Still the issue?

I don't think anything changed in r.viewshed, so yes.

Fixed in trunk r71681. Binary output is now for all modes 1 = visible, 0 = not visible, NULL = input elevation is NULL.

in reply to:  9 comment:10 by mmetz, 6 years ago

Resolution: fixed
Status: reopenedclosed

Replying to mmetz:

Replying to annakrat:

Replying to martinl:

Still the issue?

I don't think anything changed in r.viewshed, so yes.

Fixed in trunk r71681. Binary output is now for all modes 1 = visible, 0 = not visible, NULL = input elevation is NULL.

Closing as fixed.

comment:11 by neteler, 6 years ago

Backported to relbranch72 in r71686.

Note: See TracTickets for help on using tickets.