[R-sig-Geo] Bug in rasterToPoints() ?

Agustin Lobo alobolistas at gmail.com
Wed Jul 21 12:38:37 CEST 2010


Thanks!
Agus

2010/7/20 Robert J. Hijmans [via R-sig-geo]
<ml-node+5317401-2030277865-197315 at n2.nabble.com>:
> Thanks Agus, I fixed this in raster version 1.3-0. Robert
>
> On Mon, Jul 19, 2010 at 11:46 PM, Agustin Lobo <[hidden email]> wrote:
>>
>> 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.
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
> ________________________________
> View message @
> http://r-sig-geo.2731867.n2.nabble.com/Bug-in-rasterToPoints-tp5294219p5317401.html
> To unsubscribe from Re: Bug in rasterToPoints() ?, click here.
>

-- 
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Bug-in-rasterToPoints-tp5294219p5320543.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list