Opened 15 years ago

Closed 12 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 15 years ago.
patch to catch negative cells

Download all attachments as: .zip

Change History (6)

comment:1 by neteler, 15 years ago

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

?

by neteler, 15 years ago

Attachment: r_cost.diff added

patch to catch negative cells

comment:3 by martinl, 15 years ago

Component: defaultRaster
Keywords: r.cost added

comment:4 by neteler, 12 years ago

Milestone: 6.4.06.4.3

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

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

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.