[AniMov] first passage time: format of coordinates

Sergio Vignali vignalisergio30 at gmail.com
Sat Feb 2 17:04:31 CET 2013


I don't know the fpt function but I think that the problem is the choose of
the radius.
Look at

http://lists.faunalia.it/pipermail/animov/2010-August/000646.html

Do you know the reference system of your location? Is WGS84?

2013/2/2 Santiago Guallar <sguallar a yahoo.com>

> Thank you very much, Sergio. I'll check the package's documentation.
> xy <- Xloc[,c("lat","long")] selects the two columns where the coordinates
> are (latitude and longitude), so I don't think there's any problem there.
> My coordinates are in the decimal system and I'm checking most of the
> Atlantic Ocean. Distance is in Km.
>
> Have a good weekend!
>
> Santi
>
>    *From:* Sergio Vignali <vignalisergio30 a gmail.com>
> *To:* Santiago Guallar <sguallar a yahoo.com>; Animal Movement <
> animov a faunalia.it>
> *Sent:* Friday, February 1, 2013 7:35 PM
>
> *Subject:* Re: [AniMov] first passage time: format of coordinates
>
> I think the problem is in the line 4 of your code. You wrote:
> xy <- Xloc[,c("lat","long")]
> but you have to select only the coordinates, not all the object Xloc.
>
> What's the reference system of your coordinates? What's your area of study?
> You have to use metric system if you want metric distance in the ltraj
> object.
> See also AdehabitatLT package and the relative documentation
>
>
> https://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CD4QFjAB&url=http%3A%2F%2Fcran.r-project.org%2Fweb%2Fpackages%2FadehabitatLT%2Fvignettes%2FadehabitatLT.pdf&ei=wAgMUcClKKiR4ATDxYCIBg&usg=AFQjCNEQPXZ8fO_qNTPyyR7BDnViFGbmWg&sig2=vv3VeQ-lr4Hhkiavq3Uujw&bvm=bv.41867550,d.bGE
>
> When I opened your link I didn't see anything, it's empty, there's not
> your tr1.txt file.
>
> 2013/2/1 Santiago Guallar <sguallar a yahoo.com>
>
> Hi Sergio,
>
> No, I don't use qgis just R.
>
> It's too bad that you can't open the link. Let me show you the head of
> object Xloc, see if you can figure out if the the format of the coordinates
> xy:
>
>        fix       date    hm     secs  trn1  trn2   lat complat  long   dist
> 1     noon 07/06/2007 13:15 39240.55 06:18 20:12 20.25   20.25 19.05
> 0.00
> 2 midnight 08/06/2007 00:59 39241.04 05:46 20:12 27.27   24.31 15.03   0.00
> 3     noon 08/06/2007 13:03 39241.54 05:46 20:20 28.81   28.02 16.00 228.65
> 4 midnight 09/06/2007 01:03 39242.04 05:46 20:20 28.76   28.76 15.98  44.41
> 5     noon 09/06/2007 12:59 39242.54 05:46 20:12 27.12   27.92 14.96  73.77
> 6 midnight 10/06/2007 00:59 39243.04 05:46 20:12 27.07   27.07 14.93  51.02
>    head veloc conf   jul                Date     ind
> 1  0.00  0.00    9 13671 2007-06-07 13:15:00 2298001
> 2  0.00  0.00    9 13672 2007-06-08 00:59:00 2298001
> 3 13.21 18.95    9 13672 2007-06-08 13:03:00 2298001
> 4 -1.36  3.70    9 13673 2007-06-09 01:03:00 2298001
> 5 46.90  6.18    9 13673 2007-06-09 12:59:00 2298001
> 6  1.79  4.25    9 13674 2007-06-10 00:59:00 2298001
> tr1 seems to be fine:
>
> *********** List of class ltraj ***********
> Type of the traject: Type II (time recorded)
> Irregular traject. Variable time lag between two locs
> Characteristics of the bursts:
>        id   burst nb.reloc NAs          date.begin            date.end
> 1 2298001 2298001      587   0 2007-06-07 15:15:00 2008-04-30 03:10:00
> But object F is full of NAs:
> List of 1
>  $ :'data.frame':       587 obs. of  30 variables:
>   ..$ r1 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
>   ..$ r2 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
>   ..$ r3 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
>   ..$ r4 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
>   ..$ r5 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
>   ..$ r6 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
>   ..$ r7 : num [1:587] NA NA NA NA NA NA NA NA NA NA ...
> .
> .
> .
> .
> Do you think coordinates format is the problem here?
>
> Thank you,
>
> Santi
>
>
>    *From:* Sergio Vignali <vignalisergio30 a gmail.com>
> *To:* Santiago Guallar <sguallar a yahoo.com>; Animal Movement <
> animov a faunalia.it>
> *Sent:* Thursday, January 31, 2013 7:41 PM
> *Subject:* Re: [AniMov] first passage time: format of coordinates
>
> Hi,
> do you usually use QGIS?
> You can convert your coordinates with qgis of course!
> PS I can't open your link.
>
> Regards
> 2013/1/31 Santiago Guallar <sguallar a yahoo.com>
>
>
>  Hello,
>
>  I am trying to create a ltraj object to obtain first passage times (with
> the aim to reveal stopover sites of migratory seabirds) using package
> adehabitat, My code is:
>
>  require(adehabitat)
> Xloc$Date <- paste( Xloc$date, Xloc$hm)
> Xloc$Date <- as.POSIXct( Xloc$Date, format = "%d/%m/%Y %H:%M", tz = "GMT"
> )
> xy <- Xloc[,c("lat","long")]
> id= Xloc$ind
> tr1 <- as.ltraj( xy, Xloc$Date, id )
> F <- fpt(tr1, seq(300,1000, length=30))
> plot(F, scale = 500, warn = FALSE)
>
> However, I only obtain NAs. I think the problem lies in the format of the
> coordinates. I'm using a decimal format but function fpt() apparently works
> with UTM coordinates. How can I convert them into this format?
> Here is a link to a dput() to file tr1.txt:
>  http://file-manager.000webhost.com/file-manager/index.php
>
> Thank you for your help!
>
> Santi
>
>
>
>
> _______________________________________________
> AniMov mailing list
> AniMov a faunalia.it
> http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov
>
>
>
>
> --
> Sergio Vignali
> CERM Centro Rapaci Minacciati
> (Endangered Raptors Centre)
>
>
>
>
>
>
>
> --
> Sergio Vignali
> CERM Centro Rapaci Minacciati
> (Endangered Raptors Centre)
>
>
>


-- 
Sergio Vignali
CERM Centro Rapaci Minacciati
(Endangered Raptors Centre)
-------------- parte successiva --------------
Un allegato HTML ? stato rimosso...
URL: <http://lists.faunalia.it/pipermail/animov/attachments/20130202/5518e6e6/attachment.html>


More information about the AniMov mailing list