[GRASS-user] r.li circular window and not integer radius

Hi,
I want to use the r.li module in grass with a circular moving window to calculate the Shannon index,
but I need to have a window of 1 km2 so I need of a not integer radius.
This seems not possible, any suggestion to do that?

All the best

Sergio Vignali

the version is the 6.4.4, but I think if I use an integer radius it’s only a little approximation…

···

2014-08-22 12:18 GMT+02:00 Sergio Vignali <vignalisergio30@gmail.com>:

Hi,
I want to use the r.li module in grass with a circular moving window to calculate the Shannon index,
but I need to have a window of 1 km2 so I need of a not integer radius.
This seems not possible, any suggestion to do that?

All the best

Sergio Vignali

Sergio Vignali

On Fri, Aug 22, 2014 at 7:48 PM, Sergio Vignali
<vignalisergio30@gmail.com> wrote:

the version is the 6.4.4, but I think if I use an integer radius it's only a
little approximation...

Could you explain a bit more what you mean with "integer radius"?

2014-08-22 12:18 GMT+02:00 Sergio Vignali <vignalisergio30@gmail.com>:

Hi,
I want to use the r.li module in grass with a circular moving window to
calculate the Shannon index,
but I need to have a window of 1 km2 so I need of a not integer radius.
This seems not possible, any suggestion to do that?

Do you refer to the choices in "Definition of creation of sampling area:"
- Whole map layer: use entire area selected above,
- Regions: select one to many subareas via mouse,
- Sample units: automated selection of sampling area (for details see below)
- Random nonoverlapping,
[...]

(List from http://grass.osgeo.org/grass64/manuals/r.li.setup.html)

Would you like to see also "Circle" there?

Perhaps it could be added to
http://grass.osgeo.org/grass70/manuals/g.gui.rlisetup.html

Markus

Define sampling areas
-Moving window
Use keyboard to define moving window dimension
-Circle
What radius size (in metres)?

Here you can use only an integer radius, if you try with a real number the tool shows an alert window: “Type integer values”

···

2014-08-23 16:38 GMT+02:00 Markus Neteler <neteler@osgeo.org>:

On Fri, Aug 22, 2014 at 7:48 PM, Sergio Vignali
<vignalisergio30@gmail.com> wrote:

the version is the 6.4.4, but I think if I use an integer radius it’s only a
little approximation…

Could you explain a bit more what you mean with “integer radius”?

2014-08-22 12:18 GMT+02:00 Sergio Vignali <vignalisergio30@gmail.com>:

Hi,
I want to use the r.li module in grass with a circular moving window to
calculate the Shannon index,
but I need to have a window of 1 km2 so I need of a not integer radius.
This seems not possible, any suggestion to do that?

Do you refer to the choices in “Definition of creation of sampling area:”

  • Whole map layer: use entire area selected above,
  • Regions: select one to many subareas via mouse,
  • Sample units: automated selection of sampling area (for details see below)
  • Random nonoverlapping,
    […]

(List from http://grass.osgeo.org/grass64/manuals/r.li.setup.html)

Would you like to see also “Circle” there?

Perhaps it could be added to
http://grass.osgeo.org/grass70/manuals/g.gui.rlisetup.html

Markus

Sergio Vignali

On Sat, Aug 23, 2014 at 5:36 PM, Sergio Vignali
<vignalisergio30@gmail.com> wrote:

Define sampling areas
-Moving window
Use keyboard to define moving window dimension
-Circle
What radius size (in metres)?

Here you can use only an integer radius, if you try with a real number the
tool shows an alert window: "Type integer values"

I suppose that the integer test in is wrong as it should exclude the
metric circular buffer:

grass64/raster/r.li/r.li.setup/r.li.windows.tcl
(around line 175)

Likely worth a bug report in http://trac.osgeo.org/grass/

If you have time, please check if it works ok in GRASS GIS 7 (which
can be installed in parallel to GRASS GIS 6).

Markus

PS: unrelated - I have added screenshots etc here:
http://grass.osgeo.org/grass70/manuals/g.gui.rlisetup.html

Ok Markus, I’ll check it in GRASS GIS 7 as soon as possible!
There in another problem now, if I try to run r.li.shannon, r.li.simpson or other r.li module of r.li suite
with a circulare moving window I get the error

“Illegal areas disposition”

I’ve searched and there is a fixed ticked, #2327, but for Windows OS and GRASS GIS 7

Sergio

···

2014-08-23 19:14 GMT+02:00 Markus Neteler <neteler@osgeo.org>:

On Sat, Aug 23, 2014 at 5:36 PM, Sergio Vignali
<vignalisergio30@gmail.com> wrote:

Define sampling areas
-Moving window
Use keyboard to define moving window dimension
-Circle
What radius size (in metres)?

Here you can use only an integer radius, if you try with a real number the
tool shows an alert window: “Type integer values”

I suppose that the integer test in is wrong as it should exclude the
metric circular buffer:

grass64/raster/r.li/r.li.setup/r.li.windows.tcl
(around line 175)

Likely worth a bug report in http://trac.osgeo.org/grass/

If you have time, please check if it works ok in GRASS GIS 7 (which
can be installed in parallel to GRASS GIS 6).

Markus

PS: unrelated - I have added screenshots etc here:
http://grass.osgeo.org/grass70/manuals/g.gui.rlisetup.html

Sergio Vignali

Hi Markus,
I’ve just checked in GRASS 7.
If I use an integer radius or a real number the module doesn’t give an error (see below)

https://www.dropbox.com/s/vv5j0xkzb90j9gv/mv_setting.png?dl=0

but it don’t create the configuration file as you can see in the image below

https://www.dropbox.com/s/5akiej27d9nwxec/mv_edit.png?dl=0

and any tools of r.li module doesn’t work, see the image below

https://www.dropbox.com/s/kbbm5udk81rwwsn/r_li_shannon.png?dl=0

with a square moving window it works fine

What do you suggest?

···

2014-08-23 19:14 GMT+02:00 Markus Neteler <neteler@osgeo.org>:

On Sat, Aug 23, 2014 at 5:36 PM, Sergio Vignali
<vignalisergio30@gmail.com> wrote:

Define sampling areas
-Moving window
Use keyboard to define moving window dimension
-Circle
What radius size (in metres)?

Here you can use only an integer radius, if you try with a real number the
tool shows an alert window: “Type integer values”

I suppose that the integer test in is wrong as it should exclude the
metric circular buffer:

grass64/raster/r.li/r.li.setup/r.li.windows.tcl
(around line 175)

Likely worth a bug report in http://trac.osgeo.org/grass/

If you have time, please check if it works ok in GRASS GIS 7 (which
can be installed in parallel to GRASS GIS 6).

Markus

PS: unrelated - I have added screenshots etc here:
http://grass.osgeo.org/grass70/manuals/g.gui.rlisetup.html

Sergio Vignali

On Sat, Aug 30, 2014 at 1:42 PM, Sergio Vignali
<vignalisergio30@gmail.com> wrote:

Hi Markus,
I've just checked in GRASS 7.
If I use an integer radius or a real number the module doesn't give an error
(see below)

https://www.dropbox.com/s/vv5j0xkzb90j9gv/mv_setting.png?dl=0

but it don't create the configuration file as you can see in the image below

Could you please send us the steps how you generated the circular
window, ideally in the North Carolina location?
This would accelerate to help you...

thanks
Markus

So, here my steps with GRASS 7:
I used the North Carolina mapset, I chose the raster map landuse96_28m and set the region to this map
setup for r.li module: create new configuration file for r.li module

Select maps and define name
Name for new configuration file to create circmw
Raster map to use to select areas landuse96_28m@PERMANENT
Define sampling region(region for analysis Whole map layer
https://www.dropbox.com/s/kbbm5udk81rwwsn/r_li_shannon.png?dl=0

Insert sampling areas moving window
choose a method use keyboard to enter sampling area
https://www.dropbox.com/s/x0p2c1i5hi9021e/grass2.png?dl=0

Set moving windows
select type of shape circle
what radius size(in metres)? 50
name of the circle mask circlemw50
https://www.dropbox.com/s/jp9anfx1kur0qyx/grass3.png?dl=0

the window shows the Summary
https://www.dropbox.com/s/blinm97w90uig7f/grass4.png?dl=0

Do you want to create a r.li configuartion file (circmw)? Yes

The configuration file doesn’t appeare on the GRASS GIS Setup for r.li modules on the list of available sampling area configuration files
https://www.dropbox.com/s/y0mifl4dx872o7v/grass5.png?dl=0

While I’m writing my steps I see an error message on the command console (see below)
https://www.dropbox.com/s/1b5hjmp745wh1hk/grass6.png?dl=0

anyway if I open again the setup module my configuration file is on the list, and then
View/Edit buttom>> the window is empty
https://www.dropbox.com/s/1b5hjmp745wh1hk/grass7.png?dl=0

I hope this can help you to find the error

All the best

Sergio

···

2014-09-01 23:59 GMT+02:00 Markus Neteler <neteler@osgeo.org>:

On Sat, Aug 30, 2014 at 1:42 PM, Sergio Vignali
<vignalisergio30@gmail.com> wrote:

Hi Markus,
I’ve just checked in GRASS 7.
If I use an integer radius or a real number the module doesn’t give an error
(see below)

https://www.dropbox.com/s/vv5j0xkzb90j9gv/mv_setting.png?dl=0

but it don’t create the configuration file as you can see in the image below

Could you please send us the steps how you generated the circular
window, ideally in the North Carolina location?
This would accelerate to help you…

thanks
Markus

Sergio Vignali

Hi Sergio,

Luca has made a fix in GRASS 7.1 for testing in revision r61866.

Could you please test it?

Best
Markus

Hi Markus, I tried to install grass 7.1 but I get this error

Scaricamento di:1 http://ppa.launchpad.net/grass/grass-devel/ubuntu/ precise/main grass70-core amd64 7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1 [8330 kB]
Scaricamento di:2 http://ppa.launchpad.net/grass/grass-devel/ubuntu/ precise/main grass70-gui amd64 7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1 [2100 kB]
Scaricamento di:3 http://ppa.launchpad.net/grass/grass-devel/ubuntu/ precise/main grass70 all 7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1 [12,8 kB]
Scaricamento di:4 http://ppa.launchpad.net/grass/grass-devel/ubuntu/ precise/main grass70-doc all 7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1 [9177 kB]
Recuperati 19,6 MB in 27s (725 kB/s)
Selezionato il pacchetto grass70-core non precedentemente selezionato.
(Lettura del database… 406788 file e directory attualmente installati.)
Estrazione di grass70-core (da …/grass70-core_7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1_amd64.deb)…
Selezionato il pacchetto grass70-gui non precedentemente selezionato.
Estrazione di grass70-gui (da …/grass70-gui_7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1_amd64.deb)…
Selezionato il pacchetto grass70 non precedentemente selezionato.
Estrazione di grass70 (da …/grass70_7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1_all.deb)…
Selezionato il pacchetto grass70-doc non precedentemente selezionato.
Estrazione di grass70-doc (da …/grass70-doc_7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1_all.deb)…
dpkg: errore nell’elaborare /var/cache/apt/archives/grass70-doc_7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1_all.deb (–unpack):
tentata sovrascrittura di “/usr/share/man/man1/v.surf.rst.1grass.gz” presente anche nel pacchetto grass-doc 6.4.4-2~precise4
dpkg-deb: errore: il sottoprocesso paste è stato terminato dal segnale (Pipe interrotta)
Elaborazione dei trigger per bamfdaemon…
Rebuilding /usr/share/applications/bamf.index…
Elaborazione dei trigger per desktop-file-utils…
Elaborazione dei trigger per gnome-menus…
Elaborazione dei trigger per hicolor-icon-theme…
Elaborazione dei trigger per man-db…
Elaborazione dei trigger per doc-base…
Si sono verificati degli errori nell’elaborazione:
/var/cache/apt/archives/grass70-doc_7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

what do you think?

all the best

Sergio

···

2014-09-12 10:10 GMT+02:00 Markus Neteler <neteler@osgeo.org>:

Hi Sergio,

Luca has made a fix in GRASS 7.1 for testing in revision r61866.

Could you please test it?

Best
Markus

Sergio Vignali

Hi,

2014-09-13 16:07 GMT+02:00 Sergio Vignali <vignalisergio30@gmail.com>:

Hi Markus, I tried to install grass 7.1 but I get this error

Scaricamento di:1 http://ppa.launchpad.net/grass/grass-devel/ubuntu/
precise/main grass70-core amd64
7.0.0+0ubuntu3~develppa~2~svn-30303~ubuntu12.04.1 [8330 kB]
Scaricamento di:2 http://ppa.launchpad.net/grass/grass-devel/ubuntu/
precise/main grass70-gui amd64

I checked what's written here:
http://grass.osgeo.org/download/software/linux/#grass71

but it seems that trunk disappeared from the PPA:
https://launchpad.net/~grass/+archive/ubuntu/grass-devel

Rashad, would you mind to check that?

thanks,
Markus

PS: Sergio, it may be way easier for now to just
http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu