1
빈 SpatialLines 객체를 만들려고합니다. 다각형으로는 간단하다빈 공간 선 객체 만들기
SpatialPolygons(list())
는 공간 라인의 경우이 작동하지 않습니다
는SpatialLines(LinesList = list())
Error in bb[1, ] : incorrect number of dimensions
SpatialLines(LinesList = Lines(list(),ID = "a"))
Error in as.list.default(X) :
no method for coercing this S4 class to a vector
SpatialLines(LinesList = Lines(slinelist = Line(coords = cbind(x = c(), y = c())), ID = c()))
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘coordinates’ for signature ‘"NULL"’
사람은 내가 빈 SpatialLines 개체를 만들 수있는 방법을 알고 있나요?
해결 어쩌면 그 일을하는 가장 좋은 방법이 아닌 해결 방법을 발견했다. 나는 길이가없는 공간 선을 생성한다 :
SpatialLines(list(Lines(Line(coords = cbind(x = c(0,0), y = c(0,0))), ID = "A")))