[R-sig-Geo] How to export kde object in ArcGIS?
Robert Hijmans
r.hijmans at gmail.com
Sat Jan 8 05:51:52 CET 2011
Jean,
I do not know anything about this object, so perhaps there are better
solutions. But a quick inspection with str(kd) suggest you can do the below:
library(raster)
library(rgdal)
r <- raster(kd$estimate, xmn=min(kd$eval.points[[1]]),
xmx=max(kd$eval.points[[1]]), ymn=min(kd$eval.points[[2]]),
ymx=max(kd$eval.points[[2]]))
plot(r)
contour(r, add=TRUE)
# you can save the raster values
r <- writeRaster(r, 'filename.tif')
# and the contours, but to get the contours you want you may
# need to scale the raster and add arguments to rasterToContour
x = rasterToContour(r)
writeOGR(x, ...
Robert
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/How-to-export-kde-object-in-ArcGIS-tp5899887p5901748.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list