I'm using spsample() with a second SpatialLinesDataFrame but now I'm geting an error. This is what I do:
fl2300 <- readOGR(dsn="/media/Transcend/MONTSENY2008/MONTSENY_UAV2/flMatagalls300",layer="flMatagalls300")
wpMata300 <- spsample(fl2300[1,],33,offset=0.0,type="regular")
Error in proj4string(x) : proj4string only works for class(es extending) Spatial Nothing looks wrong with fl2300 (at least not different to other SPDFs for which spsample() works fine):
str(fl2)
Formal class 'SpatialLinesDataFrame' [package "sp"] with 4 slots ..@ data :'data.frame': 2 obs. of 2 variables: .. ..$ Code : int [1:2] 1 2 .. ..$ Comment: Factor w/ 2 levels "CarrElBrull700",..: 2 1 ..@ lines :List of 2 .. ..$ :Formal class 'Lines' [package "sp"] with 2 slots .. .. .. ..@ Lines:List of 1 .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slots .. .. .. .. .. .. ..@ coords: num [1:3, 1:2] 445816 449071 449071 4628083 4629045 ... .. .. .. ..@ ID : chr "0" .. ..$ :Formal class 'Lines' [package "sp"] with 2 slots .. .. .. ..@ Lines:List of 1 .. .. .. .. ..$ :Formal class 'Line' [package "sp"] with 1 slots .. .. .. .. .. .. ..@ coords: num [1:3, 1:2] 445983 444326 444326 4628196 4630060 ... .. .. .. ..@ ID : chr "1" ..@ bbox : num [1:2, 1:2] 444326 4628083 449071 4630060 .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:2] "r1" "r2" .. .. ..$ : chr [1:2] "min" "max" ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots .. .. ..@ projargs: chr " +proj=utm +zone=31 +ellps=intl +units=m +no_defs" Is this a bug? Do I have anything wrong in this object? Thanks Agus
begin:vcard fn:Agustin Lobo n:Lobo;Agustin org:Institut de Ciencies de la Terra "Jaume Almera" CSIC adr:;;Lluis Sole Sabris s/n;Barcelona;;08028;Spain email;internet:agustin.l...@ija.csic.es url:http://www.ija.csic.es/gt/obster version:2.1 end:vcard
_______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo