[GRASS-user] [GRASS-dev] execGRASS("r.diversity"): [Error 3] Cannot find path specified \\.grass7\\r.li
Sandra MacFadyen
sandramf at live.co.za
Thu May 22 03:06:41 PDT 2014
Hi Markus,
No, when run directly in GRASS, I get the same error:
r.diversity --overwrite input=s1993_tm5_rad.1 at test1 prefix=s1993_div_ alpha=0.5 size=5
ERROR: Illegal areas disposition
ERROR: Illegal areas disposition
ERROR: Illegal areas disposition
ERROR: Illegal areas disposition
Done.
I also doubled checked my projection as region settings, which appear fine:
> execGRASS("g.proj", flags="p")
-PROJ_INFO-------------------------------------------------
name : Universal Transverse Mercator
proj : utm
datum : wgs84
ellps : wgs84
zone : 36
south : defined
no_defs : defined
-PROJ_EPSG-------------------------------------------------
epsg : 32736
-PROJ_UNITS------------------------------------------------
unit : meter
units : meters
meters : 1
> execGRASS("g.region", flags=c("p","m"))
projection: 1 (UTM)
zone: -36
datum: wgs84
ellipsoid: wgs84
north: 7389715
south: 7179985
west: 272685
east: 506715
nsres: 30
ewres: 30
rows: 6991
cols: 7801
cells: 54536791
>
I removed the config files I created and still the same error :(
If I run r.li.shannon instead, the text file is created but it's empty.
> execGRASS("r.li.shannon", parameters=list(input="s1993_tm5_rad.1", config="conf_diversity_5.0", output="s1993_tm5_rad_shan.1"))
RLISHA~1 complete. Result written to text file
<C:\Users\LFoxcroft\AppData\Roaming\GRASS7\r.li\output\s1993_tm5_rad_shan.1>
Warning message:
running command 'r.li.shannon.exe input=s1993_tm5_rad.1 config=conf_diversity_5.0 output=s1993_tm5_rad_shan.1' had status 1
>
Thanks
Sandra
-----Original Message-----
From: neteler.osgeo at gmail.com [mailto:neteler.osgeo at gmail.com] On Behalf Of Markus Neteler
Sent: 22 May 2014 10:48 AM
To: Sandra MacFadyen
Cc: Glynn Clements; GRASS user list; Luca Delucchi
Subject: Re: [GRASS-dev] [GRASS-user] execGRASS("r.diversity"): [Error 3] Cannot find path specified \\.grass7\\r.li
Hi Sandra,
(adding Luca Delucchi, author, in cc)
back to the full problem:
On Wed, May 21, 2014 at 12:08 PM, Sandra MacFadyen <sandramf at live.co.za> wrote:
...
> I am new to GRASS and have a problem executing the r.diversity
> function via R 3.1.0 and GRASS 7beta2:
>
> When running the code:
>
> # Calculate spectral diversity per band with windows size 5x5
> execGRASS("r.diversity",flags="overwrite",
> parameters=list(input="name.1", prefix="name_divers.1", alpha=0.5,
> size=5))
Could you run the command directly in GRASS (rather than R) for a test?
On Thu, May 22, 2014 at 9:31 AM, Sandra MacFadyen <sandramf at live.co.za> wrote:
...
> I have the correct update of r.diversity.py in the correct directory but now I am getting an error, " Illegal areas disposition"
>
>> execGRASS("r.diversity",flags="overwrite",
>> parameters=list(input="s1993_tm5_rad.1",
>> prefix="s1993_tm5_rad_divers.1", alpha=0.5, size=5))
> ERROR: Illegal areas disposition
> ERROR: Illegal areas disposition
> ERROR: Illegal areas disposition
> ERROR: Illegal areas disposition
> Done.
>
>
> As replied to Glynn earlier. I created a configuration file using r.li.setup in this directory as follows:
The command r.diversity does not require the creation of a config file. This is done automatically for the indices calculated by the command (on the contrary to the r.li.* commands which do need such a config file).
> "conf_diversity_5.0"
> SAMPLINGFRAME 0|0|1|1
> SAMPLEAREA -1|-1|0.010526315789473684|0.009487666034155597
> MOVINGWINDOW
>
> This file disappears after the error occurs above.
You just named it by chance as the internal file name of the command.
@author: Perhaps a PID or something random (urandom?) might be added to avoid this non-issue :)
If you want to control everything, probably you need to pick the
r.li.* command of interest which accepts configuration files.
Best
Markus
More information about the grass-user
mailing list