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")))