Victor Gonzalez | 14 May 2013 12:52
Picon
Gravatar

QGIS Python plugin progress

Hi all,

We've made some progress with the Python plugin. Finally, we made a fork [1] of the previous repository in order to have a more agile development.

We asked in the scipy mailing list about supporting LSCV in scipy and the answer was that we can use statsmodels [2]. It supports the LSCV bandwidth estimation. But the problem is that it's supported in a currently developed version. So maybe we would need to wait for the new release.

Also, we are unsure about how to manage dependencies. We can check if statsmodels is present, or if scipy is present with a version newer than 0.10 (so we can set the bandwidth value manually) and give different options depending on the user's system. Another option is to package the dependencies together with the plugin, but we don't know if there is a standard procedure to do so in QGIS.

Finally, a new algorithm input parameter (boolean) has been added to specify if the raster outputs must be added as layers to the project or not. Thus, you can get all the results or only the contour lines, specified at the same moment as all the input parameters.

Cheers,
Víctor.

-----
_______________________________________________
AniMov mailing list
AniMov@...
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
Jorge Arévalo | 6 May 2013 18:46
Picon

HomeRange plugin and rpy2 in Lubuntu, a dead end?

Hello,

(sorry, I sent the previous message with an unregistered email. This is the valid one)

I'm working with Victor González in the development of AniMove module for Sextante, and I'd like to test
HomeRange plugin. So, I installed it via Plugins Manager. I got this error

"Unable to load the plugin: Unable to load required package rpy2. Please ensure that both R, and the
corresponding version of Rpy2 are correctly installed."

But after that, I got the message "Plugin installed successfully".

So, I tried to test the plugin with this csv: http://www.faunalia.it/animov/scripts/sample.csv, and
following these instructionshttp://linfiniti.com/2009/11/home-range-plugin-in-qgis/

And I got this error: https://dl.dropboxusercontent.com/u/6599273/errors/qgis/homerange_plugin_error.log

Then, I found this old list message: http://lists.faunalia.it/pipermail/animov/2010-January/000545.html

And tried with

import rpy2.robjects as robjects

Getting this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/rpy2/robjects/__init__.py", line 14, in <module>
import rpy2.rinterface as rinterface
File "/usr/local/lib/python2.7/dist-packages/rpy2/rinterface/__init__.py", line 93, in <module>
from rpy2.rinterface._rinterface import *
ImportError: /usr/local/lib/python2.7/dist-packages/rpy2/rinterface/_rinterface.so:
undefined symbol: Rf_PrintWarnings

Finally, I came to this message in Rpy list http://sourceforge.net/mailarchive/message.php?msg_id=30569821

Looks like Rf_PrintWarnings function is not included in my R version:

R version 3.0.0 (2013-04-03) -- "Masked Marvel"

My environment is as follows:

Lubuntu 13.04
QGIS 1.8.0 + HomeRange plugin from official repository
R 3.0.0 + adehabitat library
Python 2.7.4 + rpy2 2.31 (tested with rpy 2.31 from apt, from easy_install and from sources)

As we're working in the removal of R dependence from the plugin, is the current HomeRange plugin
development stopped? Am I really in a dead end with this issue?

Many thanks, and best regards,

--  
Jorge Arevalo
http://geomati.co
Enviado con Sparrow (http://www.sparrowmailapp.com/?sig)

_______________________________________________
AniMov mailing list
AniMov <at> faunalia.it
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
Victor Gonzalez | 2 May 2013 11:28
Picon
Gravatar

AniMove plugin for python

Hello,

First of all, I want to introduce myself. I am Víctor González and I'll be working with Jorge Arévalo in the AniMove plugin for python. We are part of geomati.co and we are very excited for this first collaboration with the Faunalia and QGIS community.

We already started analyzing the task and we have some questions. First, we are going to made a fork of the current animove plugin repository [1] and when we finish we'll do a pull request. Is that ok with you? Anyone has a better idea?

Regarding the kernel analysis algorithm, we found that the gaussian_kde class in scipy [2] has a set_bandwidth method in order to set the bandwidth of the method as a simple scalar. But this is only available from 0.11.0 version. Which version of scipy we assume will be installed in the distribution?

Also, that gaussian_kde class allows 'scotts' and 'silverman' method to calculate the bandwidth, but no LSCV or is available. The only way to have it working is to set the bw_method as a callable and implement the LSCV bandwidth ourselves. The problem is that we are not experts in statistics and we don't know how to implement it. We searched for the formula but it's quite hard to understand and implement at first. Do you know of any python implementation?

Finally, the kernel analysis is supposed to create several probability rasters (one for each animal), right? The problem is that we don't know the number of outputs beforehand, so we cannot specify them in the SEXTANTE algorithm. A solution is to create the rasters in a folder (specified by the user) and then add it to QGIS by hand. Is that ok?

Thanks in advance,
Víctor.

-----
_______________________________________________
AniMov mailing list
AniMov@...
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
Iris Dröscher | 4 Apr 2013 19:47
Picon

Re: Using R: AdehabiatHR: passing a different numeric value for the smoothing parameter to different individuals

Hi Johannes,

I picked up your idea of combining the UDs of several animals into an estUDm.

I crosschecked if kerneloverlap and kerneloverlaphr using the so created estUDm will give the same results.

It works :)

Thank you for your help!
Iris


Message: 2
Date: Thu, 21 Mar 2013 08:55:46 +0100
From: Johannes Signer <j.m.signer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Animal Movement <animov-h12OV65+u/41GQ1Ptb7lUw@public.gmane.org>
Subject: Re: [AniMov] Using R: AdehabiatHR: passing a different
        numeric value for the smoothing parameter to different individuals
Message-ID:
        <CAC8qavvHRrPjQKshBxsu5UZv_=K=pcJy975NPhFHKAQbscetjQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset="iso-8859-1"

You could calculate a home range for each animal individually.

# Data prep
library(adehabitatHR)
data(puechabonsp)
loc <- puechabonsp$relocs

# Split the the data
loc <- split(loc, loc$Name)

# Calculate home ranges
h <- c(10, 20, 30, 40) # vector with your h values

uds <- lapply(seq_along(loc), function(x) kernelUD(loc[[x]], h[x]))


# You will end up with a list of UDs (class estUD) one for each animal,
# but not a multiple estUDm, however as far as I can tell estUDm is also
only
# a list of estUD, so you could do (but probably shouldn't)

class(uds) <- "estUDm"

# Then generic functions such as image will work
image(uds)

Hope this helps
Johannes


On Thu, Mar 21, 2013 at 6:11 AM, Iris Dr?scher <iris.droescher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:

> Hello,
>
>
>
>
>
> I plan to use the root-n bandwidth estimate for my Kernel homerange and
> Kernel overlap calculations and this bandwidth estimate varies between
> individuals.
>
>
>
> How can I pass different numeric values for the smoothing parameters in
> AdehabitatHR to different individuals?
>
>
>
>
>
> A.)
>
>
>
> I created a SpatialPointsDataframe (LiMa):
>
>
>
>
>
>   coordinates      id
>
> 1   (237.5, 186.5)  Lizzy
>
> 2     (233.5, 188)  Lizzy
>
> 3     (230.5, 192)  Lizzy
>
> etc.
>
> 127   (207, 190.5) Malcom
>
> 128   (207, 190.5) Malcom
>
> 129     (214, 176) Malcom
>
> etc.
>
>
>
>
>
>
>
> How could I set a different value for h for each individual (e.g. h=8.2
> for Lizzy, h=9.1 for Malcom)?
>
>
>
>
>
> I tried the following, which unfortunately does not work:
>
>
>
> Kernel  <- kernelUD(LiMa[,1], h=c(8.2, h=9.1))
>
>
>
> kerneloverlap(LiMa[,1], method = "UDOI", percent = 95, h=c(8.2, h=9.1))
>
>
>
>
>
> B.)
>
>
>
> Alternatively, I created a SpatialPointsDataframe (LiMa) with an
> additional column for the smoothing parameter:
>
>
>
>   coordinates      id   h
>
> 1   (237.5, 186.5)  Lizzy 8.2
>
> 2     (233.5, 188)  Lizzy 8.2
>
> 3     (230.5, 192)  Lizzy 8.2
>
> etc
>
> 127   (207, 190.5) Malcom 9.1
>
> 128   (207, 190.5) Malcom 9.1
>
> 129     (214, 176) Malcom 9.1
>
> etc
>
>
>
> I tried the following, which unfortunately does not work either:
>
>
>
> Kernel<-kernelUD(LiMa[,1], h=LiMa[,2])
>
> kerneloverlap(LiMa[,1], method = "UDOI", percent = 95, h=LiMa[,2])
>
>
>
>
>
> I would be very grateful if somebody could help me out with that problem.
>
> Best regards,
>
> Iris
>
> _______________________________________________
> AniMov mailing list
AniMov-h12OV65+u/41GQ1Ptb7lUw@public.gmane.org
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
>
>


--

## ## Contact:
## Johannes Signer, MSc
## PhD-Candidate -- Wildlife Management
## Dept. of Forest Zoology & Forest Conservation
## University of Goettingen
## Buesgenweg 3 (room 85)
## 37077 Goettingen, Germany
## e: jmsigner-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
## p: +49 (0)551 39 3583
## m: +49 (0)176 61 962856
## skype: j.m.signer
## ##
_______________________________________________
AniMov mailing list
AniMov@...
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
Dylan Irion | 28 Mar 2013 14:35
Picon
Gravatar

HR QGIS Error

Hi list,

I'm having the same 'rpy2.rinterface.RNULLType' object has no attribute 
'r_repr' issues that Manuel Spínola had back in November. Seems the 
issue is being worked on, so I was wondering how I could get in touch 
with Damiano Preatoni for his R script? Cheers.

Kind Regards,
Dylan

--

-- 
University of Cape Town (MSc. Candidate)
Oceans Research
PO 1767
Mossel Bay, Western Cape
South Africa 6500
www.oceans-research.com
+27(0)723531503
Picon
Favicon

AniMove for SEXTANTE vers. 1.3.2

Hi all,
I fixed the problem of the version in AniMove for SEXTANTE version 1.3.2.
It works fine also in windows system.
Thanks

Francesco
Iris Dröscher | 21 Mar 2013 06:11
Picon

Using R: AdehabiatHR: passing a different numeric value for the smoothing parameter to different individuals

Hello,

 

 

I plan to use the root-n bandwidth estimate for my Kernel homerange and Kernel overlap calculations and this bandwidth estimate varies between individuals.

 

How can I pass different numeric values for the smoothing parameters in AdehabitatHR to different individuals?

 

 

A.)

 

I created a SpatialPointsDataframe (LiMa):

 

 

  coordinates      id  

1   (237.5, 186.5)  Lizzy

2     (233.5, 188)  Lizzy

3     (230.5, 192)  Lizzy

etc.

127   (207, 190.5) Malcom

128   (207, 190.5) Malcom

129     (214, 176) Malcom

etc.

 

 

 

How could I set a different value for h for each individual (e.g. h=8.2 for Lizzy, h=9.1 for Malcom)?

 

 

I tried the following, which unfortunately does not work:

 

Kernel  <- kernelUD(LiMa[,1], h=c(8.2, h=9.1))

 

kerneloverlap(LiMa[,1], method = "UDOI", percent = 95, h=c(8.2, h=9.1))

 

 

B.)

 

Alternatively, I created a SpatialPointsDataframe (LiMa) with an additional column for the smoothing parameter:

 

  coordinates      id   h

1   (237.5, 186.5)  Lizzy 8.2

2     (233.5, 188)  Lizzy 8.2

3     (230.5, 192)  Lizzy 8.2

etc

127   (207, 190.5) Malcom 9.1

128   (207, 190.5) Malcom 9.1

129     (214, 176) Malcom 9.1

etc

 

I tried the following, which unfortunately does not work either:

 

Kernel<-kernelUD(LiMa[,1], h=LiMa[,2])

kerneloverlap(LiMa[,1], method = "UDOI", percent = 95, h=LiMa[,2])



 

I would be very grateful if somebody could help me out with that problem.

Best regards,

Iris

_______________________________________________
AniMov mailing list
AniMov@...
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
Picon
Favicon

AniMove for SEXTANTE 1.3.1

Hi all,
i'm already uploaded a new version of AniMove for SEXTATE plugin version 
1.3.1.
It fixs some crash in windows system.
Please let me know.

Thanks

Francesco
Paolo Cavallini | 18 Mar 2013 10:39
Picon
Favicon
Gravatar

Fwd: [Quantum-GIS] [FEATURE] Add additional kernels to the Heatmap plugin... (#471)


This is likely of interest.
Perhaps it is worth the while to include it in the new plugin?
All the best.

-------- Messaggio originale --------
Oggetto: 	[Quantum-GIS] [FEATURE] Add additional kernels to the Heatmap
plugin... (#471)
Data: 	Sun, 17 Mar 2013 19:05:41 -0700
Mittente: 	nyalldawson <notifications@...>
Rispondi-a: 	qgis/Quantum-GIS
<reply+i-12118527-e7f077fe4e923f08f345e07781266e8885ab4eeb-691842@...>
A: 	qgis/Quantum-GIS <Quantum-GIS@...>

... and set the default kernel to a Quartic/Biweight kernel.
Fix the maths for triangular kernels.
Move the decay widget into the advanced section and disable it for all
kernel shapes except Triangular. Default to a decay of zero.
Add references for all kernel functions and explanation of how they are
derived.

------------------------------------------------------------------------

        You can merge this Pull Request by running

  git pull https://github.com/nyalldawson/Quantum-GIS heatmap_kernels

Or view, comment on, or merge it at:

  https://github.com/qgis/Quantum-GIS/pull/471

        Commit Summary

  * Move decay radio widget into advanced group box, and set the default
    value to 0. This method of controlling the kernel shape is
    non-standard, and should be achieved instead by giving users a
    choice of standard kernel functions.
  * [FEATURE] Add option to select kernel shape (quartic, triangular or
    uniform) in heatmap plugin
  * Merge heatmap_fixes branch
  * Merge heatmap_fixes branch
  * Change float to double for calculations
  * Merge branch 'master' into heatmap_kernels
  * [FEATURE] Add triweight and Epanechnikov kernels. Make decay
    disabled for all kernels expect Triangular kernel. Fix math for
    triangular kernels.

        File Changes

  * *M* src/plugins/heatmap/heatmap.cpp
    <https://github.com/qgis/Quantum-GIS/pull/471/files#diff-0> (85)
  * *M* src/plugins/heatmap/heatmap.h
    <https://github.com/qgis/Quantum-GIS/pull/471/files#diff-1> (16)
  * *M* src/plugins/heatmap/heatmapgui.cpp
    <https://github.com/qgis/Quantum-GIS/pull/471/files#diff-2> (13)
  * *M* src/plugins/heatmap/heatmapgui.h
    <https://github.com/qgis/Quantum-GIS/pull/471/files#diff-3> (13)
  * *M* src/plugins/heatmap/heatmapguibase.ui
    <https://github.com/qgis/Quantum-GIS/pull/471/files#diff-4> (81)

        Patch Links:

  * https://github.com/qgis/Quantum-GIS/pull/471.patch
  * https://github.com/qgis/Quantum-GIS/pull/471.diff

Picon
Favicon

Animove plugin for SEXTANTE 1.3.0

Hi all,
i already upladed a new version of AniMove plugin for SEXTANTE 1.3.0.
It solves some crash in Windows OS.
I'm waiting you response.

Thanks

Francesco
Manuel Spínola | 13 Mar 2013 23:54
Picon

Kernel module in AniMove 1.2.8 does not respond

Dear list members,

I switched from AniMove 1.2.9 to 1.2.8 because the former didn't work and the 1.2.8 it didn´t work either.  No error message, just not response (hung-up).

QGIS 1.8.0 in Windows 7.

Best,

Manuel

--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola <at> una.ac.cr
mspinola10 <at> gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río
Institutional website: ICOMVIS
_______________________________________________
AniMov mailing list
AniMov@...
http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov

Gmane