Generating Shape files

162 views
Skip to first unread message

Aidan Branney

unread,
Aug 1, 2023, 12:53:43 PM8/1/23
to ctmm R user group
Hey Chris,

I'm sure this is an easy fix but I'm struggling to produce a shape file from the AKDES I have produced. Is it a syntax issue or is a data frame issue?

UD1_ML <- akde(P24174, FIT1_ML)

UD1_pHREML <- akde(P24174, FIT1_pHREML)

 

plot(UD1_ML)

plot(UD1_pHREML)

 

writeShapefile(UD1_pHREML,"C:Desktop/Rprogramming/Home Range",file="HR1.shp",convex=FALSE,level.UD=0.95,level=0.95)

 

Error in rgdal::writeOGR(SP, dsn = folder, layer = file, driver = "ESRI Shapefile",  :

  Spatial Polygons objects should have valid ordering comments









Christen Fleming

unread,
Aug 2, 2023, 1:10:47 PM8/2/23
to ctmm R user group
Hi Aidan,

Please try updating the package from GitHub, which has now switched from the depreciated rgdal package to the terra package. The new function is writeVector().

remotes::install_github("ctmm-initiative/ctmm")

Best,
Chris
Reply all
Reply to author
Forward
0 new messages