Hi Sandra, (adding Luca Delucchi, author, in cc)
back to the full problem: On Wed, May 21, 2014 at 12:08 PM, Sandra MacFadyen <[email protected]> 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 <[email protected]> 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 _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
