You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@otoolem what was the solution here? i'd also like to use the SE metrics as an error estimate around predicted locations. ideally, i'd get the SE metrics into lat/lon space.
Hi Ian
I want to use x.se and y.se, from the fit_ssm output to calculate the edge of the error ellipse around each data point.
grab output
out <- foieGras::fit_ssm(...)
ssm <- foieGras::grab(out, “predicted”, as_sf = FALSE)
track coordinates
ssm$lon # or ssm$x
ssm$lat # or ssm$y
find edges of ellipse
ssm$lon2 <- ssm$x+ssm$x.se
ssm$lat2 <- ssm$y+ssm$y.se
xy <- as.matrix(ssm[c('lon2', 'lat2')])
proj4string <- as.character(CRS('+init=EPSG:4326'))
ssm$lon2 <- project(xy, proj4string, inv=TRUE)[,1] # edge of ellipse along lon axis
ssm$lat2 <- project(xy, proj4string, inv=TRUE)[,2] # edge of ellipse along lat axis
However, the track data and coordinates of the 'ellipse boundaries' appear to have different projections.
Any help is greatly appreciated
Cheers
Malcolm
The text was updated successfully, but these errors were encountered: