Opened 12 years ago

Closed 6 years ago

#1691 closed defect (invalid)

r.ros and r.spread don't overwrite

Reported by: madi Owned by: grass-dev@…
Priority: normal Milestone: 7.0.7
Component: Raster Version: svn-releasebranch64
Keywords: r.ros, r.spread Cc:
CPU: x86-64 Platform: Linux

Description

Using r.ros and r.spread in a python script I realized that the option "overwrite" doesn't have any effect.. I'm on Linux, grass6.4.3svn.

Change History (6)

comment:1 by hamish, 12 years ago

Keywords: r.ros,r.spread → r.ros, r.spread

perhaps for r.ros because output= is just a prefix for a number of output maps? maybe it needs to setenv() the overwrite flag in that case to work-around? (just an idea)

see also g.copy, g.rename --overwrite ticket #1658 for some info on how it works.

Hamish

in reply to:  1 comment:2 by wenzeslaus, 11 years ago

Milestone: 6.4.37.0.0

Replying to hamish:

perhaps for r.ros because output= is just a prefix for a number of output maps?

See #2136 for the prefix/basename discussion and fix of overwrite for G7:i.pca and G7:r.texture (r58311).

However, from the quick test, this seems to work in the current trunk (r59190):

$ r.ros model=aaa moisture_1h=bbb moisture_live=ccc output=ddd
r.ros complete. Raster maps <ddd.base>, <ddd.max> and <ddd.maxdir> created.

$ r.ros model=aaa moisture_1h=bbb moisture_live=ccc output=ddd
ERROR: Raster map <ddd.base> already exists in mapset <PERMANENT>

$ r.ros --overwrite model=aaa moisture_1h=bbb moisture_live=ccc output=ddd
r.ros complete. Raster maps <ddd.base>, <ddd.max> and <ddd.maxdir> created.

The problem now is that when I already have map named as the prefix/basename, it will not let me proceed:

$ r.mapcalc "eee = 1"
$ r.ros --overwrite model=aaa moisture_1h=bbb moisture_live=ccc output=eee
ERROR: option <output>: <eee> exists.

This may be good for safety but then the error message (or the situation) is confusing because when I do overwrite, it will not overwrite that eee, it will create new ones (eee.*) and I will still have the old eee.

comment:3 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:4 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:5 by neteler, 7 years ago

Milestone: 7.0.67.0.7

comment:6 by martinl, 6 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.