Sorry, that was stupid,
This:
xyinv <- project(xysin, "+proj=longlat", inv=TRUE)
had to be:
xyinv <- project(xysin, "+proj=sinu", inv=TRUE)
problem solved
Robert
On Tue, May 19, 2009 at 10:29 AM, Robert Hijmans wrote:
> I am confused about this behavior of rgdal
>
>> require(rgdal)
>> #
I am confused about this behavior of rgdal
> require(rgdal)
> # make a matrix of coordinates
> xygeo <- rbind(c(-180, 0), c(180,0), c(0,0), c(0,20), c(0,90))
> # project to sinusoidial
> xysin <- project(xygeo, "+proj=sinu", inv=FALSE)
> # project back to longlat
> xyinv <- project(xysin, "+proj=l
Dear all,
I have a SpatialGridDataFrame which I read from grass
myrast<-readRAST6("DRENVAL")
Now I attrib a sequential number for each pixel with:
myrast @ data[[1]]<-1:dim(myrast @ data)[1]
Now I need to select record by record, from 1 to N, get the bbox()
from each record, set the g.reg
Tim,
Thanks, that is a bug. It has been fixed in Version 0.8.9-20
(19-May-2009). Automatic install should be available from r-forge in
24 hours.
Robert
On Tue, May 19, 2009 at 7:28 AM, Tim Sippel wrote:
> I'm using the raster package version 0.8.9-17 on R2.9.0. While using the
> function projectR
Agus,
> Is there a way
> of assigning the tif file to an R raster object and then just use
> reclass() and R would
> read the file by pieces as needed? That's what I would like to...
That is exactly what is intended with reclass(). Something like this :
r <- raster('mytiffile.tif')
m <- matrix(0
I'm using the raster package version 0.8.9-17 on R2.9.0. While using the
function projectRaster I'm projecting my data and need to output a new ESRI
grid (.asc). The following code I think should do the job, but it is
writing two different files (.grd and .gri) instead of the .asc I need. Is
this
I have to reclassify a large (> 8000x8000 pixels) geotif raster. I normally
would do it through grass (or saga) but would like to try the raster
package in R.
The problem is that I'm a bit confused on how to do it. My understanding
of the package
is that it provides a way to operate in the rasters