[GRASS-user] Fire Simulation bug
Markus Neteler
neteler at osgeo.org
Fri Oct 30 16:46:45 EDT 2009
On Tue, Oct 20, 2009 at 10:16 PM, Adam Dershowitz
<adershowitz at exponent.com> wrote:
> I downloaded the 6.x firesimulation data set and demo script from:
> http://www.hpcc.nectec.or.th/grass/download/data6.php (Yes, I am using the
> script on that page, not the one that is included in the compressed file)
> But, when I run it I get an error:
> It gets as far as this:
> r.random my_spread n=10 raster_output=my_path
> Collecting Stats...
> 100%
> Writing raster map <my_path> ...
> 100%
> But then reports an error here:
> r.spreadpath -v x_input=my_spread.x y_input=my_spread.y \
>> output=my_path
> ERROR: option <output>: <my_path> exists.
> It is correct that my_path exists, because it was created in the prior step.
> But the documentation for r.spreadpath says in part:
> output=name Name of raster map layer to contain output. Also can be used as
> the map layer of the input target points. If so used, the input target point
> map will be overwritten by the output.
> It seems like the script is trying to use this as both the input and output,
> as it says should be allowed. But it is instead giving an error. I also
> tried to add --overwrite to r.spreadpath, but then I just get a completely
> yellow window for the output with no paths at all.
> Is there a bug in the script, or a bug in r.spreadpath?
I am not sure but in main.c I see
/* Set flag according to input */
if (path_mapset != NULL) {
if (head_start_pt == NULL)
/*output layer exists and start pts are not given on cmd line */
flag = 1;
/* output layer exists and starting pts are given on cmd line */
else
flag = 2;
}
else
flag = 3; /* output layer does not previously exist */
which could interfere with the libgis magic to handle overwriting of files.
Perhaps r.spreadpath wasn't updated accordingly?
Markus
More information about the grass-user
mailing list