# Orphaned holes in LoCoH K

I am trying to estimate the home range of wolves and would like to use LoCoH to do that. However I am running into a orphaned hole problem that I really do not know how to solve.

var <- read.csv("Varåa1708_2018.csv", sep = ";")

str(var)

IndividId   : Factor w/ 1 level "M17-08": 1 1 1 1 1 1 1 1 1 1 ...
$ProjectCode : int 12950000 12950000 12950000 12950000 12950000 12950000 12950000 12950000 12950000 12950000 ...$ SpeciesCode : int  5 5 5 5 5 5 5 5 5 5 ...
$SexCode : int 1 1 1 1 1 1 1 1 1 1 ...$ AgeInMonths : Factor w/ 12 levels "Minst 34","Minst 35",..: 1 1 1 1 1 1 1 1 1 1 ...
$DateTime : Factor w/ 4265 levels "01.01.2019 00:00",..: 2018 2019 2020 2021 2022 2023 2121 2122 2123 2124 ...$ Latitude    : num  61.1 61.1 61.1 61.1 61.1 ...
$Longitude : num 12.4 12.4 12.4 12.4 12.4 ...$ Northing    : int  6780152 6780160 6779922 6779893 6779899 6779904 6779904 6779905 6779917 6779912 ...
$Easting : int 360914 360893 360426 360492 360489 360480 360491 360475 360432 360426 ...$ UTMZone     : int  33 33 33 33 33 33 33 33 33 33 ...
$UTMX : int 360914 360893 360426 360492 360489 360480 360491 360475 360432 360426 ...$ UTMY        : int  6780152 6780160 6779922 6779893 6779899 6779904 6

v18data.xy = var[c("Longitude","Latitude")]

v18xysp <- SpatialPoints(v18data.xy)
proj4string(v18xysp) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0")



Create a Spatial Data Frame from relocations

spptv18<-data.frame(v18xysp)
idspv18 <- data.frame(vara18\$IndividId)


coordinates(idspv18)<-spptv18

proj4string(idspv18) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0")

locsdf <-as.data.frame(idspv18)

vara18.IndividId Longitude Latitude
1           M17-08  12.41730 61.13125
2           M17-08  12.41691 61.13132
3           M17-08  12.40842 61.12901
4           M17-08  12.40966 61.12877
5           M17-08  12.40960 61.12883
6           M17-08  12.40944 61.12887


LoCoH

var1 <- LoCoH.k.area(idspv18, k=c(16:25))

var2<- LoCoH.k(idspv18, k=24)


Error message I get:

Error in rgeos::createPolygonsComment(oobj) :
rgeos_PolyCreateComment: orphaned hole, cannot find containing polygon
for hole at index 81

Warning messages:

1: In proj4string(xy) : CRS object has comment, which is lost in
output 2: In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
Discarded datum Unknown based on WGS84 ellipsoid in CRS definition,
but +towgs84= values preserved 3: In proj4string(xy) : CRS object has
comment, which is lost in output

I have tried using UTM instead of LatLong, tried to clean the orphaned holes using cleangeo but that showed that I had no issues with my data. I am a bit of a newbie with R.

Geographic Information Systems Asked on November 21, 2021

Consider using the newer t-locoh (https://tlocoh.r-forge.r-project.org/), which functions identically to LoCoH.k when time is ignored.

Answered by user169901 on November 21, 2021

## Related Questions

0  Asked on May 4, 2021

### If there is no spatial autocorrelation, should the spatial cluster detection be performed?

0  Asked on May 4, 2021 by asunray

### “Multi-part geometries do not provide a coordinate sequence” error when extracting the long and lat of start and end points in GeoPandas

2  Asked on May 3, 2021

### Running Lookup tool in ModelBuilder using field that was joined in previous step

0  Asked on May 3, 2021 by christoph-correia

### Mapbox- are sub categories possible?

0  Asked on May 3, 2021 by kat-spitter

### Defining a Python function to calculate a value using multiple fields

1  Asked on May 3, 2021 by 532

### OpenLayers setting opacity without disappearing the edge that marks it

1  Asked on May 3, 2021

### Creating a virtual layer based on a virtual field for dynamic selection in QGIS 3.4?

3  Asked on May 3, 2021 by rexogis

### Spatially merging NetCDF climate grids?

1  Asked on May 3, 2021 by trevor-j-smith

### csv to feature classes not yet geospaced

0  Asked on May 3, 2021 by andrew-peters

### Removing individual Leaflet markers added through L.geoJSON

2  Asked on May 2, 2021

### Split Line by Point (Point-On-Line-Overlayer) for multiple Points

2  Asked on May 2, 2021 by zwornik

### QGIS Server limitations?

2  Asked on May 2, 2021 by artwork21

### Creating new layout using arcpy.mp in ArcGIS Pro

0  Asked on May 2, 2021

### Export MultiPolygon from MultiSurface layer in QGIS

1  Asked on May 2, 2021

### BigQuery GIS table to GeoJSON type Feature Collection with SQL and/or Python

1  Asked on May 2, 2021 by seago

### Is it possible to proceed direct geo-referencing and ortho-rectification for a GeoTIFF with GDAL/OpenCV in one step

0  Asked on May 2, 2021 by huckfinn

### QGIS label text break in data attribute table

2  Asked on May 2, 2021

### Copy/Paste features as a Tool in QGIS

0  Asked on May 2, 2021