Opened 10 years ago

Closed 10 years ago

#2621 closed defect (fixed)

r.random.cells should use NULL instead of 0

Reported by: marisn Owned by: grass-dev@…
Priority: normal Milestone: 7.0.1
Component: Raster Version: svn-releasebranch70
Keywords: r.random.cells Cc:
CPU: Unspecified Platform: Unspecified

Description (last modified by neteler)

It seems that r.random.cells is using 0 to mark empty areas instead of using proper NULL values. It is easy fixable by r.null call, still it should be fixed.

If it is a desired behaviour, documentation should be updated to state it.

Change History (6)

comment:1 by neteler, 10 years ago

Description: modified (diff)
Keywords: r.random.cells added
Summary: r.random.cell should use NULL instead of 0r.random.cells should use NULL instead of 0
Version: 7.0.0svn-releasebranch70

comment:2 by neteler, 10 years ago

Priority: minornormal

Hopefully fixed in r65021. Please check.

TODO:

  • update manual page example
  • Backported to relbranch7

in reply to:  2 ; comment:3 by marisn, 10 years ago

Replying to neteler:

  • Backport to relbranch7

I would say - no. It changes behaviour of module. 7.0.x shouldn't change such things as it might break some scripts relaying on consistency of 7.0.

in reply to:  3 ; comment:4 by neteler, 10 years ago

G7.1 manual updated in r65024.

Replying to marisn:

Replying to neteler:

  • Backport to relbranch7

I would say - no. It changes behaviour of module. 7.0.x shouldn't change such things as it might break some scripts relaying on consistency of 7.0.

Maybe. However, the 7.0 manual states "The cells are numbered from 1 to the numbers of cells generated." which is not true.

in reply to:  4 ; comment:5 by marisn, 10 years ago

Replying to neteler:

Maybe. However, the 7.0 manual states "The cells are numbered from 1 to the numbers of cells generated." which is not true.

Then the manual needs to be fixed. (It also doesn't state that empty cells have NULLs thus manual is not contradicting current behaviour.) How about adding a simple sentence "Empty cells are marked with 0 (will be changed to NULL in GRASS GIS 7.1.0 release)."?

I would say - fix documentation, add to GRASS 7.1 changes and close this issue.

in reply to:  5 comment:6 by neteler, 10 years ago

Resolution: fixed
Status: newclosed

Replying to marisn:

I would say - fix documentation, add to GRASS 7.1 changes and close this issue.

While I don't fully agree I have clarified the presence of 0 in r65117 (relbr7). Closing.

Note: See TracTickets for help on using tickets.