0
2 spatialLinesを作成しました。関数gdistance :: shortestpathを使用しました。私はそれらを単一のSLDFにマージしたいと思いますが、両方のspatiallinesのIDを保持してください。希望の出力は1 SLDFと2の機能です!私はRでそれを完成させる簡単な方法があるはずだと確信していますが、私はどのように見つけられません。 私の2 SpatialLines:は2つのspatiallinesを1つのSpatiallineDataframeに結合します
mergedSpatialLines
#class : SpatialLines
#features : 1
#extent : 421965.7, 480965.7, 791904.1, 863268.1 (xmin, xmax, ymin, ymax)
#coord. ref. : +proj=laea +lat_0=30 +lon_0=-30 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs
mergedSpatialLine2815
#class : SpatialLines
#features : 1
#extent : 466965.7, 482965.7, 823204.1, 833846.1 (xmin, xmax, ymin, ymax)
#coord. ref. : +proj=laea +lat_0=30 +lon_0=-30 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs
unidos<-gUnion(mergedSpatialLine,mergedSpatialLine2815)
unidos
#class : SpatialLines
#features : 1
#extent : 421965.7, 482965.7, 791904.1, 863268.1 (xmin, xmax, ymin, ymax)
#coord. ref. : +proj=laea +lat_0=30 +lon_0=-30 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs
、再現性の例を提供してください。 – nicola
https://drive.google.com/open?id=0BwqSBe1Yq-FBenlQSVFYYkVwbzg – Marta
ドライブリンク内の空間線データフレームの名前を変更しました。このファイルはspldfおよびspldf2という名前です。 – Marta