Exporting Dsurface map into GIS

questions concerning anlysis/theory using program DENSITY and R package secr. Focus on spatially-explicit analysis.

Re: Exporting Dsurface map into GIS

Postby murray.efford » Wed Mar 28, 2018 4:48 pm

So you want to bias your sampling towards those turtles you've already caught? I don't get it.

plot(fxsurface, covariate='D.fx') and plot(r) look about the same to me - just different colour scales, which you can control.
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: Exporting Dsurface map into GIS

Postby cowzrgr8 » Tue Apr 03, 2018 1:31 pm

I want to see what extrinsic factors (such as wetland depth, elevation, distance to roads, etc.) are affecting trap success using the probability density. It sounds like I just want to use the covariate "D.fx" to just show turtles that were actually caught.

I tried using the script you suggested but had the same problem where the rasterized version of the plot looked nothing like the density:
fxsurface <- fx.total(pawtuckaway_secrPoly100)
plot(fxsurface, "D.fx")
print(fxsurface)
r <- raster(fxsurface, 'D.fx')
plot(r)
# or, if that doesn't work
plot(r, useRaster = FALSE)
writeRaster(r, "r.raster", overwrite = TRUE)

I think it may have something to do with the warning I get immediately after "r <-raster(fxsurface, 'D.fx'): Warning message:
In matrix(tmp, nrow = ny, ncol = nx, byrow = TRUE) :
data length [6237] is not a sub-multiple or multiple of the number of rows [82]

I'm assuming this means something is wrong with the format of my data, but I'm not sure what.

Thank you for the quick response
Becca
cowzrgr8
 
Posts: 3
Joined: Wed Feb 21, 2018 6:31 pm

Re: Exporting Dsurface map into GIS

Postby murray.efford » Tue Apr 03, 2018 3:07 pm

Hi
I'm still not convinced that you have a legitimate use, but will zip it for now. (Use models with trap covariates to formally evaluate habitat effects, but can be painfully slow).

That warning message is a good clue. I wonder whether there is a bug in the raster() method for non-rectangular masks... I can check if you send me the fxsurface offline as an Rdata file - save (fxsurface, file="fxsurf.RData").

Murray
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Previous

Return to analysis help

Who is online

Users browsing this forum: No registered users and 10 guests