2016-05-25 7 views
1

У меня есть SpatialLinesDataFrame, содержащий три контура 0.2, 0.5 и 0.95 и хочу иметь возможность выбрать один единственный уровень для дальнейших вычислений (например, over, gIntersect и т. Д.).Split SpatialLinesDataFrame контуры по уровню

Я попытался с помощью [email protected]$level[[1]] для выбора первого уровня, но это не работает

class  : SpatialLinesDataFrame 
features : 3 
extent  : 11.44765, 11.51037, 62.11384, 62.13572 (xmin, xmax, ymin, ymax) 
coord. ref. : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0 
variables : 1 
names  : level 
min values : 0.2 
max values : 0.95 

Formal class 'SpatialLinesDataFrame' [package "sp"] with 4 slots 
    [email protected] data  :'data.frame': 3 obs. of 1 variable: 
    .. ..$ level: Factor w/ 3 levels "0.2","0.5","0.95": 1 2 3 
    [email protected] lines  :List of 3 
    .. ..$ :Formal class 'Lines' [package "sp"] with 2 slots 
    .. .. .. [email protected] Lines:List of 6 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:9, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:7, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:11, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:7, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:25, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:21, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. [email protected] ID : chr "C_1" 
    .. ..$ :Formal class 'Lines' [package "sp"] with 2 slots 
    .. .. .. [email protected] Lines:List of 10 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:31, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:51, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:13, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:55, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:19, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:25, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:11, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:31, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:11, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:37, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. [email protected] ID : chr "C_2" 
    .. ..$ :Formal class 'Lines' [package "sp"] with 2 slots 
    .. .. .. [email protected] Lines:List of 2 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:173, 1:2] 11.4 11.4 11.4 11.4 11.4 ... 
    .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slot 
    .. .. .. .. .. .. [email protected] coords: num [1:693, 1:2] 11.5 11.5 11.5 11.5 11.5 ... 
    .. .. .. [email protected] ID : chr "C_3" 
    [email protected] bbox  : num [1:2, 1:2] 11.4 62.1 11.5 62.1 
    .. ..- attr(*, "dimnames")=List of 2 
    .. .. ..$ : chr [1:2] "x" "y" 
    .. .. ..$ : chr [1:2] "min" "max" 
    [email protected] proj4string:Formal class 'CRS' [package "sp"] with 1 slot 
    .. .. [email protected] projargs: chr "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0" 

ответ

 Смежные вопросы

  • Нет связанных вопросов^_^