[R-sig-Geo] Exporting from R to use in ArcMap

Sarah Papworth sarah.papworth06 at imperial.ac.uk
Wed May 25 17:48:20 CEST 2011


Dear all,
I have made a map of home ranges from lat-long data using the function
BRB from the package adehabitatHR (see code below) What I can't work
out how to do is to export the image (which is made up of cells with
probability UD and contours) in a way in which it is georeferenced for
import into ArcMap. I would really appreciate it if anyone knows how
to do this!
Sarah


library(adehabitatHR)
datetime <- as.POSIXct(paste(hunter1$Date,hunter1$Time), format =
"%d/%m/%Y %H:%M:%S","GMT")
##make data.frame of lat and long in meters
coord<-data.frame(hunter1$POINT_X,hunter1$POINT_Y)
## make ltraj split by person
huntGPS2<-as.ltraj(coord,datetime,hunter1$Person,burst=hunter1$Person,typeII=TRUE)
summary(huntGPS2)
#get smoothy parameter
a2<-BRB.D(huntGPS2, Tmax = 300*60, Lmin = 0)
#make the HR estimates
best2<-BRB(huntGPS2, a2, Tmax=300*60, Lmin=0, hmin=68, grid = 125, b = FALSE,
same4all = TRUE, extent=0.1,tau=10)

#make the map for each person
# Hunter4
person4<-getvolumeUD(best2[[4]])
 par(mar=c(0,0,2,0))
image(person4)
#nice title
title("Utilisation distribution Hunter 4")
#add contours
xyzv<-as.image.SpatialGridDataFrame(person4)
contour(xyzv,add=TRUE)
#work out a way to export image

-- 
Imperial College London
http://www.iccs.org.uk/sarahpapworth.htm



More information about the R-sig-Geo mailing list