Dear Researchers,

I have two "SpatialPointsDataFrame" layer "p" and "onePLOT"  and I wish to
do an overlay, but I have an error message

> str(p)
Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
  ..@ data       :'data.frame': 980000 obs. of  1 variable:
  .. ..$ V3: num [1:980000] 1 1 1 1 1 1 1 1 1 1 ...
  ..@ coords.nrs : int [1:2] 1 2
  ..@ coords     : num [1:980000, 1:2] 0.5 1.5 2.5 3.5 4.5 5.5 6.5 7.5 8.5
9.5 ...
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : NULL
  .. .. ..$ : chr [1:2] "x" "y"
  ..@ bbox       : num [1:2, 1:2] 0.5 0.5 1399.5 699.5
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr [1:2] "x" "y"
  .. .. ..$ : chr [1:2] "min" "max"
  ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots
  .. .. ..@ projargs: chr NA


> str(onePLOT)
Formal class 'SpatialPolygonsDataFrame' [package "sp"] with 5 slots
  ..@ data       :'data.frame': 1 obs. of  2 variables:
  .. ..$ Id      : Factor w/ 98 levels "LIDAR_Sicily_Area1_Plot1",..: 1
  .. ..$ firecode: num 1
  ..@ polygons   :List of 1
  .. ..$ :Formal class 'Polygons' [package "sp"] with 5 slots
  .. .. .. ..@ Polygons :List of 1
  .. .. .. .. ..$ :Formal class 'Polygon' [package "sp"] with 5 slots
  .. .. .. .. .. .. ..@ labpt  : num [1:2] 59 648
  .. .. .. .. .. .. ..@ area   : num 900
  .. .. .. .. .. .. ..@ hole   : logi FALSE
  .. .. .. .. .. .. ..@ ringDir: int 1
  .. .. .. .. .. .. ..@ coords : num [1:5, 1:2] 39.9 50 78.2 68.1 39.9 ...
  .. .. .. .. .. .. .. ..- attr(*, "dimnames")=List of 2
  .. .. .. .. .. .. .. .. ..$ : NULL
  .. .. .. .. .. .. .. .. ..$ : chr [1:2] "x" "y"
  .. .. .. ..@ plotOrder: int 1
  .. .. .. ..@ labpt    : num [1:2] 59 648
  .. .. .. ..@ ID       : chr "1"
  .. .. .. ..@ area     : num 900
  ..@ plotOrder  : int 1
  ..@ bbox       : num [1:2, 1:2] 39.9 628.7 78.2 667.1
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr [1:2] "x" "y"
  .. .. ..$ : chr [1:2] "min" "max"
  ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots
  .. .. ..@ projargs: chr NA


when I try overlay I have this error message

> p.ov <- overlay[onePLOT["Id"],p]
Error in overlay[onePLOT["Id"], p] :
  object of type 'closure' is not subsettable

thanks for help or suggestions
Gianni

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to