Opened 11 years ago

Closed 7 years ago

#545 closed defect (fixed)

r.cost warning on negative values

Reported by: pcav Owned by: grass-dev@…
Priority: major Milestone: 6.4.3
Component: Raster Version: 6.3.0
Keywords: r.cost Cc:
CPU: Unspecified Platform: Unspecified

Description

In case ov even a few negative values, r.cost fails badly (running forever). If the cost map contains any negative values, it should either generate a fatal error, or treat such cells as nulls (exclude them or use the null_cost= value) and generate a warning. Thanks Glynn for the hint.

Attachments (1)

r_cost.diff (1.1 KB) - added by neteler 11 years ago.
patch to catch negative cells

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by neteler

Perhaps add a test in the NULL testing section source:grass/trunk/raster/r.cost/main.c@35369#L397

?

Changed 11 years ago by neteler

Attachment: r_cost.diff added

patch to catch negative cells

comment:2 Changed 11 years ago by neteler

comment:3 Changed 10 years ago by martinl

Component: defaultRaster
Keywords: r.cost added

comment:4 Changed 7 years ago by neteler

Milestone: 6.4.06.4.3

Applied to GRASS 6.5.svn in r52740. Needs to be backported to 6.4.

comment:5 in reply to:  4 Changed 7 years ago by mmetz

Resolution: fixed
Status: newclosed

Replying to neteler:

Applied to GRASS 6.5.svn in r52740. Needs to be backported to 6.4.

Done in r52748, also for trunk in r52746.

Markus M

Note: See TracTickets for help on using tickets.