Fire Simulation bug

2 messages Options
Embed this post
Permalink
Adam Dershowitz, Ph.D., P.E.

Fire Simulation bug

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
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 using William Kyngesburye's Grass 6.4RC5 on a Mac OS 10.5.

Thanks,

--Adam




_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Markus Neteler

Re: Fire Simulation bug

Reply Threaded More More options
Print post
Permalink
On Tue, Oct 20, 2009 at 10:16 PM, Adam Dershowitz
<[hidden email]> 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
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user