Message-ID: <1279608376915-5315475.post@n2.nabble.com>
Date: 2010-07-20T06:46:16Z
From: Agustin Lobo
Subject: Bug in rasterToPoints() ?
In-Reply-To: <625212.38870.qm@web23707.mail.ird.yahoo.com>
While
test <-rasterToPoints(Br025,fun=function(x){x>0},asSpatialPoints=T)
does not work, the following works:
> test <-rasterToPoints(Br025,fun=function(x){x>0},asSpatialPoints=F)
> test <- as.data.frame(test)
> coordinates(test) <- c("x","y")
> class(test)
[1] "SpatialPointsDataFrame"
attr(,"package")
[1] "sp"
> test at proj4string <- CRS(projection(Br025))
> projection(test)
[1] "+proj=longlat +ellps=WGS84"
> summary(test)
Object of class SpatialPointsDataFrame
Coordinates:
min max
x -8.75 28.00
y 41.50 59.75
Is projected: FALSE
proj4string : [+proj=longlat +ellps=WGS84]
Number of points: 2576
Data attributes:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.50 7.00 33.75 178.00 152.10 3638.00
although the value of slot "Is projected:" indicates some problem.
Agus
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Bug-in-rasterToPoints-tp5294219p5315475.html
Sent from the R-sig-geo mailing list archive at Nabble.com.