Ticket #545 (closed defect: fixed)

Opened 4 years ago

Last modified 9 months ago

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:
Platform: Unspecified CPU: 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

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

Change History

  Changed 4 years ago by neteler

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

?

Changed 4 years ago by neteler

patch to catch negative cells

  Changed 4 years ago by neteler

  Changed 4 years ago by martinl

  • keywords r.cost added
  • component changed from default to Raster

follow-up: ↓ 5   Changed 9 months ago by neteler

  • milestone changed from 6.4.0 to 6.4.3

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

in reply to: ↑ 4   Changed 9 months ago by mmetz

  • status changed from new to closed
  • resolution set to fixed

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.