[AniMov] export home range image to google earth (alternatively a shapefile)

Eric Patterson eric.m.patterson at gmail.com
Mon Nov 12 15:44:23 CET 2012

Hi Tagmarie,

Try the writeOGR function in the rgdal package.  It has many export options
(e.g. shp, kml, etc) type ogrDrivers() once the package is installed to see
all your options and ?writeOGR to see the syntax for exporting.

in your example...
kudl  <-  kernelUD(puechabonsp$relocs[,  1],  h  =  "LSCV")
kernelcontours<-getverticeshr(kudl,percent=90) #decide on the contour you
want to export
writeOGR(kernelcontours,dsn="/your directory", layer="your file
name",driver="ESRI Shapefile") # for a shapefile.

If you want multiple contours perhaps use getverticeshr multiple times and
merge the objects, either in R or your GIS software? Maybe someone else
knows a better solution. If you want an actual raster to display underneath
and not just the contour the estUDm2spixdf() function will convert your
estUDm into a *SpatialPixelsDataFrame which can then be exported like above
using writeOGR into various formats (e.g. geotiff)  Hope this helps!*

Eric Patterson
PhD Candidate
Department of Biology
Georgetown University
Phone: 303-913-2755
Email: eric.m.patterson at gmail.com
 <eric.m.patterson at gmail.com>

On Mon, Nov 12, 2012 at 7:57 AM, Ramgad <Ramgad82 at gmx.net> wrote:

> Hello,
> I am completely new to this list and also fairly new to R. I searched for
> hours (days actually) on the internet to solve my problem but couldn't find
> an answer. Maybe you can help?
> I calculated a homerange using the adehabitatHR-packaged, "plotted" it
> like nicely described in the vignette and now I want to export the image
> (image with the contourlines) to google maps. I just don't get how to do
> that. Alternatively I'd also take a shapefile.
> My data look most like the ones in the vignette:
> library(adehabitatHR)
> kudl  <-  kernelUD(puechabonsp$relocs[,  1],  h  =  "LSCV")
> vud  <-  getvolumeUD(kudl)
> image(vud[[1]])
> xyzv  <-  as.image.SpatialGridDataFrame(**vud[[1]])
> contour(xyzv,  add=TRUE)
> Any ideas?
> That would be so helpful!
> Best regards,
> Tagmarie
> ______________________________**_________________
> AniMov mailing list
> AniMov at faunalia.it
> http://lists.faunalia.it/cgi-**bin/mailman/listinfo/animov<http://lists.faunalia.it/cgi-bin/mailman/listinfo/animov>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.faunalia.it/pipermail/animov/attachments/20121112/a68f7eeb/attachment.html>

More information about the AniMov mailing list