Re: [GRASS-dev] r.diversity.py for GRASS 7

2014-01-08 Thread Luca Delucchi
On 8 January 2014 15:46, Markus Neteler  wrote:

>
> Please try first the patch
>

test it

> http://trac.osgeo.org/grass/ticket/2024
> r_li_bug_2024.diff (15.9 KB) - added by rashadkm 2 weeks ago.r.li.* fixes

the patch probably fix other problems ;-)

>
> Markus


-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] r.diversity.py for GRASS 7

2014-01-08 Thread Markus Neteler
On Wed, Jan 8, 2014 at 11:41 AM, Luca Delucchi  wrote:
...
> I think this is a bug of r.li modules in GRASS7.
> I try to create the same configuration file with GRASS7 and GRASS6 and
...

> I'm going to open a ticket in the next hours/days.

Please try first the patch

http://trac.osgeo.org/grass/ticket/2024
r_li_bug_2024.diff (15.9 KB) - added by rashadkm 2 weeks ago.r.li.* fixes

Markus
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] r.diversity.py for GRASS 7

2014-01-08 Thread Luca Delucchi
On 8 January 2014 11:41, Luca Delucchi  wrote:
>
> Hi Paulo
>

Hi Devs,

>
> I think this is a bug of r.li modules in GRASS7.
> I try to create the same configuration file with GRASS7 and GRASS6 and
> they are identical but in GRASS6 I don't obtain any error instead in
> GRASS7 I obtain your same error.
>

I was wrong, also GRASS6 has the same problem (maybe in GRASS6 is
worst because it continue to print the message for all row outside
region)
I open a new thread/ticket

> I'm going to open a ticket in the next hours/days.
>
> Thanks
>

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] r.diversity.py for GRASS 7

2014-01-08 Thread Paulo van Breugel

OK, thanks

On Wed 08 Jan 2014 11:41:56 AM CET, Luca Delucchi wrote:

On 7 January 2014 07:35, Paulo van Breugel  wrote:

Hi Luca



Hi Paulo


Great, thanks!

I just tried to run the function, but initially got the error:

ERROR: Reading raster map  request for row
68 is outside region

This was with a region smalller than the input map. After setting the region
to cover the whole map, the function ran without problems. Which brings me
to the question, does the function (or the underlying r.li) not respect the
region settings or is this a bug?



I think this is a bug of r.li modules in GRASS7.
I try to create the same configuration file with GRASS7 and GRASS6 and
they are identical but in GRASS6 I don't obtain any error instead in
GRASS7 I obtain your same error.

I'm going to open a ticket in the next hours/days.

Thanks


Cheers,

Paulo




___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] r.diversity.py for GRASS 7

2014-01-08 Thread Luca Delucchi
On 7 January 2014 07:35, Paulo van Breugel  wrote:
> Hi Luca
>

Hi Paulo

> Great, thanks!
>
> I just tried to run the function, but initially got the error:
>
> ERROR: Reading raster map  request for row
> 68 is outside region
>
> This was with a region smalller than the input map. After setting the region
> to cover the whole map, the function ran without problems. Which brings me
> to the question, does the function (or the underlying r.li) not respect the
> region settings or is this a bug?
>

I think this is a bug of r.li modules in GRASS7.
I try to create the same configuration file with GRASS7 and GRASS6 and
they are identical but in GRASS6 I don't obtain any error instead in
GRASS7 I obtain your same error.

I'm going to open a ticket in the next hours/days.

Thanks

> Cheers,
>
> Paulo
>

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] r.diversity.py for GRASS 7

2014-01-06 Thread Paulo van Breugel

Hi Luca

Great, thanks!

I just tried to run the function, but initially got the error:

ERROR: Reading raster map  request for 
row 68 is outside region


This was with a region smalller than the input map. After setting the 
region to cover the whole map, the function ran without problems. Which 
brings me to the question, does the function (or the underlying r.li) 
not respect the region settings or is this a bug?


Cheers,

Paulo



On Tue 07 Jan 2014 01:39:47 AM CET, Luca Delucchi wrote:

On 6 January 2014 11:13, Paulo van Breugel  wrote:

Hi Markus,



Hi


Thanks, I was able to install it. Running it gave me the error :

Traceback (most recent call last):
  File "/home/paulo/.grass7/addons/scripts/r.diversity",
line 284, in 
sys.exit(main())
  File "/home/paulo/.grass7/addons/scripts/r.diversity",
line 139, in main
checkAlpha(methods,alpha_value)
UnboundLocalError: local variable 'alpha_value' referenced
before assignment



thanks, you discovered a bug ;-)
Fixed


After filling in an alpha value (1) it runs but I get the next error message
(but the alpha value should be optional, right?):



it is not optional if you use the renyi and by default all methods are
used (before it was not specify, now yes ;-)


ERROR: Cannot find configuration file

[1.0]
All works are terminated

Indeed, in the given folder there is not such conf file.



yes, because the directory change from grass6 to grass7, fixed.

Now it should work, please try 58632


Cheers,

Paulo





___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] r.diversity.py for GRASS 7

2014-01-06 Thread Luca Delucchi
On 6 January 2014 11:13, Paulo van Breugel  wrote:
> Hi Markus,
>

Hi

> Thanks, I was able to install it. Running it gave me the error :
>
> Traceback (most recent call last):
>  File "/home/paulo/.grass7/addons/scripts/r.diversity",
> line 284, in 
>sys.exit(main())
>  File "/home/paulo/.grass7/addons/scripts/r.diversity",
> line 139, in main
>checkAlpha(methods,alpha_value)
> UnboundLocalError: local variable 'alpha_value' referenced
> before assignment
>

thanks, you discovered a bug ;-)
Fixed

> After filling in an alpha value (1) it runs but I get the next error message
> (but the alpha value should be optional, right?):
>

it is not optional if you use the renyi and by default all methods are
used (before it was not specify, now yes ;-)

> ERROR: Cannot find configuration file
> 
> [1.0]
> All works are terminated
>
> Indeed, in the given folder there is not such conf file.
>

yes, because the directory change from grass6 to grass7, fixed.

Now it should work, please try 58632

> Cheers,
>
> Paulo
>


-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] r.diversity.py for GRASS 7

2014-01-06 Thread Paulo van Breugel

Hi Markus,

Thanks, I was able to install it. Running it gave me the error :

Traceback (most recent call last):
 File "/home/paulo/.grass7/addons/scripts/r.diversity",
line 284, in 
   sys.exit(main())
 File "/home/paulo/.grass7/addons/scripts/r.diversity",
line 139, in main
   checkAlpha(methods,alpha_value)
UnboundLocalError: local variable 'alpha_value' referenced
before assignment

After filling in an alpha value (1) it runs but I get the next error 
message (but the alpha value should be optional, right?):


ERROR: Cannot find configuration file 


[1.0]
All works are terminated

Indeed, in the given folder there is not such conf file.

Cheers,

Paulo


On Mon 06 Jan 2014 12:57:28 AM CET, Markus Neteler wrote:

Hi Paulo,
(cc Luca)

On Sun, Jan 5, 2014 at 10:50 PM, Paulo van Breugel
 wrote:

Hi,

I just tried to install the r.diversity addon in GRASS 7, but it doesn't
seem to work. Are there any plans to port this in the near future to GRASS
7?  I had a look myself, but my Python skills are too limited.


Done in r58619 (easy since it was already written in Python) and r58621.

You may try with g.extension to install and use it but I think it
needs a bit more finetuning (I didn't get the examples running yet,
but it will be rather easy for a Python programmer).

Markus

___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] r.diversity.py for GRASS 7

2014-01-05 Thread Markus Neteler
Hi Paulo,
(cc Luca)

On Sun, Jan 5, 2014 at 10:50 PM, Paulo van Breugel
 wrote:
> Hi,
>
> I just tried to install the r.diversity addon in GRASS 7, but it doesn't
> seem to work. Are there any plans to port this in the near future to GRASS
> 7?  I had a look myself, but my Python skills are too limited.

Done in r58619 (easy since it was already written in Python) and r58621.

You may try with g.extension to install and use it but I think it
needs a bit more finetuning (I didn't get the examples running yet,
but it will be rather easy for a Python programmer).

Markus
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


[GRASS-dev] r.diversity.py for GRASS 7

2014-01-05 Thread Paulo van Breugel

Hi,

I just tried to install the r.diversity addon in GRASS 7, but it doesn't 
seem to work. Are there any plans to port this in the near future to 
GRASS 7?  I had a look myself, but my Python skills are too limited.


Rgds

Paulo
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev