Opened 8 years ago

Closed 3 years ago

Last modified 3 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 6 years ago.
viewshed patch

Download all attachments as: .zip

Change History (12)

Changed 6 years ago by annakrat

Attachment: viewshed.diff added

viewshed patch

comment:1 Changed 6 years ago by annakrat

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

comment:2 in reply to:  1 ; Changed 6 years ago by 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.

comment:3 in reply to:  2 Changed 6 years ago by annakrat

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 Changed 5 years ago by annakrat

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 Changed 4 years ago by martinl

Milestone: 7.0.07.0.5

comment:6 Changed 4 years ago by martinl

Still the issue?

comment:7 in reply to:  6 ; Changed 4 years ago by annakrat

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 Changed 4 years ago by martinl

Milestone: 7.3.07.4.0

Milestone renamed

comment:9 in reply to:  7 ; Changed 3 years ago by 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.

comment:10 in reply to:  9 Changed 3 years ago by mmetz

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 Changed 3 years ago by neteler

Backported to relbranch72 in r71686.

Note: See TracTickets for help on using tickets.