I am just starting to use R.
I came across R function -alphahull- and believe it is the best option to turn gps points into a polygon (3 or 4 days worth of gps points across residence/neighborhood for each of 300 subjects).
How do I remove duplicate points?
I am getting the following error: "Error in tri.mesh(X) : duplicate data points" after running:
library(sp)
library(alphahull)
library(maptools)
#define projection
project2<-"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
read point shapefile
data.shape <- readShapePoints("D:/clayera/UWO/msthesistake2/tesisGIS/D1001_GPS_WalkExtSel.shp",proj4string=CRS(project2))
plot(data.shape)
summary(data.shape)
extract coordinates
x.coords <- coordinates(data.shape) #this way we get duplicate coordinates
alpha-shape: 100 meter threshold
x.as <- ashape(x.coords[,1], x.coords[,2], alpha=100)