Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

CRS issue with RSFs

52 views
Skip to first unread message

Chris MacColl

unread,
Feb 10, 2025, 11:03:02 PMFeb 10
to ctmm R user group
Hi, I'm working with a movement dataset of 23 individuals spread over all of northern Australia, so a very large geographic area. Im working with large scale raster datasets which are in GDA94 / Albers Equal Area projection (EPSG:3577). This is a projected CRS so units are in metres which is particularly important for some of the environmental co-variates Im interested in such as distance to water (m) and elevation (m). 

I imported my movement data as a csv, converted to an sf object, and then reprojected to Albers CRS. I then subsetted each individual from this dataset and converted to a telemetry object using <- as.telemetry. My thinking being this will spatially align my movement data with my environmental data in order to run RSF's for each of my individuals. I calculated their AKDE's and used these as rasters to form the grid in rsf.fit() so my predictions would be limited to the bounding box of the animals AKDE given Im using large-scale rasters in order to encompass all of my animals. 

However, Im running into several issues and I've noticed that despite projecting my movement data to Albers it defaults back to WGS84 when converted to a telemetry object, as does the corresponding AKDE output. Therefore, the movement and home range data is misaligned with my environmental data when running the RSF. 

Obviously I could reproject my rasters to WGS84 but wouldnt this change my unit of measurement from metres to degrees? Ive also aligned the resolution of all my rasters to 100m so theyre standardised and can run efficiently with the Riemann integrator. How are other folks dealing with this issue? 

Hopefully Im not missing something super obvious. Thank you in advance. 
Chris 


Chris MacColl

unread,
Feb 11, 2025, 7:19:26 PMFeb 11
to ctmm R user group
Also FYI Im having no luck aligning the CRS of the movement data with the environmental rasters using the following step as outlined in the animove tutorial: 

projection(buffalo) <- crs(buffalo_env) # project buffalo tracks to projection of raster layers

I get the error: 

Error in (function (cl, name, valueClass) : ‘crs’ is not a slot in class “telemetry”

Christen Fleming

unread,
Mar 5, 2025, 10:52:18 PMMar 5
to ctmm R user group
Hi Chris,

as.telemetry() works from the long-lat data regardless of any projection you might do beforehand, though you can project afterwards or specific a projection within as.telemetry(). There's also a datum argument in as.telemetry() so that the long-lat coordinates are interpreted correctly.

What you're trying: projection(buffalo) <- crs(buffalo_env) should work if buffalo_env is a class with a crs() slot and ctmm's projection()<- assignment method is being called. If you have other packages loaded, they may steal the projection()<- method from ctmm and ctmm::projection()<- might then work.

Additionally, in newer versions of the package you can just do projection(buffalo) <- 3577  to project to EPSG:3577.

Best,
Chris
Reply all
Reply to author
Forward
0 new messages