#635 closed defect (fixed)
v.kernel and r.surf.fractal overwriting
Reported by: | pcav | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.4.0 |
Component: | Vector | Version: | svn-trunk |
Keywords: | v.kernel | Cc: | |
CPU: | All | Platform: | All |
Description
Several GRASS modules in QGIS (I found v.kernel and r.surf.fractal) don't check if a layer exist before overwriting it. It appears a GRASS bug, not a QGIS one. See also http://trac.osgeo.org/qgis/ticket/1616
Change History (12)
follow-up: 2 comment:1 by , 15 years ago
Component: | default → Vector |
---|---|
CPU: | Unspecified → All |
Keywords: | v.kernel added |
Platform: | Unspecified → All |
Version: | unspecified → svn-develbranch6 |
follow-up: 3 comment:2 by , 12 years ago
Replying to hamish:
the problem with v.kernel is that the output option is used somehow for both raster and vector maps. And since the gisprompt definition can only be set to one or the other it is not set at all. In this case the module should include its own 'already exists' check and check for --overwrite to decide if that will be a fatal error or just a warning.
Just was confronted to this problem (no check on overwrite) in v.kernel (all versions) and found this very old bug report. I think the solution is rather that output raster or vector maps should become optional with a check that at least one of them is given. Then you can use the gisprompt for each type and thus trigger the check.
Or is there something that counter-indicates such a solution ?
Moritz
comment:3 by , 12 years ago
Replying to mlennert:
I think the solution is rather that output raster or vector maps should become optional with a check that at least one of them is given. Then you can use the gisprompt for each type and thus trigger the check.
Indeed. A single option shouldn't be used for different purposes, which includes different output formats.
comment:4 by , 9 years ago
Milestone: | 6.4.0 → 6.4.6 |
---|
follow-up: 6 comment:5 by , 8 years ago
Milestone: | 6.4.6 → 7.4.0 |
---|---|
Version: | svn-develbranch6 → svn-trunk |
This bug is still present. The solution is to split the options. Ideally, we keep 'output' for raster output and the more specialized vector output could be something like 'net_output'. I don't think we can do it now this way for backwards compatibility reasons. Or we can say that since most users are interested in the raster output anyway, we do the change for 7.4. Any opinion?
follow-up: 7 comment:6 by , 8 years ago
Replying to annakrat:
This bug is still present. The solution is to split the options. Ideally, we keep 'output' for raster output and the more specialized vector output could be something like 'net_output'. I don't think we can do it now this way for backwards compatibility reasons. Or we can say that since most users are interested in the raster output anyway, we do the change for 7.4. Any opinion?
+1 for introducing new option net_output
.
follow-up: 9 comment:7 by , 8 years ago
Replying to martinl:
+1 for introducing new option
net_output
.
The module could set net_output
based on output
if net
is given and print warning. This could avoid breaking backward compatibility.
comment:9 by , 8 years ago
comment:11 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Backported, so I am closing this.
Replying to pcav:
the problem is that their option description miss the gisprompt field which says if it will be and old or new map. For new maps the parser does the overwrite check.
AFAICT Martin fixed this for r.surf.fractal in December by changing the custom option definition to using a standard defined output one, but for v.kernel it is still missing.
the problem with v.kernel is that the output option is used somehow for both raster and vector maps. And since the gisprompt definition can only be set to one or the other it is not set at all. In this case the module should include its own 'already exists' check and check for --overwrite to decide if that will be a fatal error or just a warning.
Hamish