How to convert a set of point coordinates from a concave hull into a polygon in R?
问题 I have an alphahull::ashape() result that I need to convert with spatstat::owin() for subsequent spatial analyses. Is there an elegant solution how to order the points from the concave hull and convert the shape to an owin object or any Spatial* object? With ordered points in a hypothetical matrix coords the polygon is defined as: geo.owin=try(owin(poly=list(x=coords[,1],y=coords[,2])),silent=T) if(class(geo.owin)=="try-error") geo.owin=owin(poly=list(x=rev(coords[,1]),y=rev(coords[,2])))