Displaying 20 results from an estimated 26 matches for "rasterlayer".
2012 May 15
0
Problem with legend and RasterLayer
Dear,
I can't plot legend over a Rasterlayer.
My system is MAC OS Lion.
See my problem:
####### Data
> img
class : RasterLayer
dimensions : 5, 5, 25 (nrow, ncol, ncell)
resolution : 0.002245, 0.002245 (x, y)
extent : -48.33875, -48.32753, -20.35756, -20.34634 (xmin, xmax,
ymin, ymax)
coord. ref. : +proj=longlat +da...
2010 Jul 28
2
Beginner stucked with raster + geoR package.
Hello everyone.
I am trying to build up understanding in R by trying to develop just some simple
scenarios.
I would like to explain you what I am trying to do and what I did so far.
I would like to put inside a RasterLayer (raster package) a Gaussian field (for
given covariance) using grf function (geoR package)
1. First I created a Raster Layer object
r <- raster() # Default values are ok
2. Then I set some values to test how if setValues worked
r <- setValues(r,1:ncell(r)/100) # Every cell of the RasterL...
2013 Jan 18
2
How to re-project ease( Equal Area Scalable Earth) grid with a ~25 km cylindrical projection to WGS84 0.25 degree?
...A =
get.var.ncdf(nc=f,varid="Soil_Moisture",verbose=TRUE)
I tried this:
d
<-raster("C:\\Users\\aalyaari\\Desktop\\SM_RE01_MIR_CLF31D_20100812T000000_20100812T235959_246_001_7.nc",
varname = "Soil_Moisture")
d:
class : RasterLayer
dimensions : 586, 1383, 810438 (nrow, ncol, ncell)
resolution : 0.2603037, 0.2916659 (x, y)
extent : -180, 180, -85.4581, 85.4581 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84
names : Retrieved.soil.moisture.value...
2010 Aug 26
1
Passing arguments between S4 methods fails within a function:bug? example with raster package.
Dear all,
This problem came up initially while debugging a function, but it
seems to be a more general problem of R. I hope I'm wrong, but I can't
find another explanation. Let me illustrate with the raster package.
For an object "RasterLayer" (which inherits from Raster), there is a
method xyValues defined with the signature
(object="RasterLayer",xy="matrix"). There is also a method with
signature (object="Raster",xy="vector"). The only thing this method
does, is change xy into a matrix and...
2017 Sep 06
2
rgdal error when trying to import raster
...jpolo/NRI/nlcd_nri5000.tif")
And I keep getting an error like this:
"Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE,
logical.return = TRUE,? :
? there is no package called 'rgdal'
Error in .rasterObjectFromFile(x, band = band, objecttype =
"RasterLayer",? :
? Cannot create RasterLayer object from this file; perhaps you need to
install rgdal first
Calls: raster -> raster -> .local -> .rasterObjectFromFile
Execution halted"
This is the session info:
"R version 3.2.5 (2016-04-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Run...
2012 Oct 21
1
[newbie] failure to plot a RasterLayer with raster::plot or fields::image.plot
summary: spatial data to be input to a regional-scale environmental
model must (1) be converted to netCDF and then (2) "regridded" (cropped,
projected, increased resolution). In a public git repository
https://github.com/TomRoche/GEIA_to_NetCDF
I have R code (with bash drivers) that does the conversion step, and
plots the converted output, apparently correctly. However attempts to
plot
2010 Jul 02
2
S4 classes and debugging - Is there a summary?
...("xyValues") for currently available ones.
> showMethods("xyValues")
Function: xyValues (package raster)
object="Raster", xy="data.frame"
object="Raster", xy="SpatialPoints"
object="Raster", xy="vector"
object="RasterLayer", xy="matrix"
object="RasterStackBrick", xy="matrix"
And now...?
Is there an overview that actually explains how you get the
information you're looking for without strolling through the complete
source? Sorry if I sound frustrated, but this is costing me hug...
2018 May 24
2
Problem with adding a raster and a brick
Hi,
I seem to be having a problem adding the following two raster objects
together - one is a rasterLayer, the other is a rasterBrick. The extent,
resolution, and origin are the same, so according to my understand it
should work. The objects look like so:
> obs.clim
class : RasterLayer
dimensions : 60, 200, 12000 (nrow, ncol, ncell)
resolution : 0.5, 0.5 (x, y)
extent : -70, 30, 50,...
2018 Mar 28
2
Fwd: netCDF to GeoTIFF by layer in r
...layer. This code converts the netCDF file to
one GeoTIFF layer, i.e. unclear which soil depth.
file.nc <- "C:/Soil_Weather_data/Agro/VMC21/VMC21.nc"
file.tiff <- "C:/Soil_Weather_data/Agro /VMC21/VMC21"
importnetcdf <- raster(file.nc)
> importnetcdf
class : RasterLayer
band : 1 (of 4 bands)
#the bands here are the four soil layers
dimensions : 16800, 43200, 725760000 (nrow, ncol, ncell)
resolution : 0.00833333, 0.00833333 (x, y)
extent : -180, 179.9998, -56, 83.99995 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS8...
2011 Jan 24
0
writeRaster with raster package
Hello,
I have a problem writing a raster with the raster package.
I have the raster object "mask" which has the following geoinformation:
---- R output
> mask
class : RasterLayer
filename :
E:/Daten/FE/HyMAP/Luxembourg_2010/Kehlen_Useldange/mosaik/LUX_LC_noOverlap_mask
nrow : 5198
ncol : 2813
ncell : 14621974
min value : 0
max value : 255
projection : +proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs
+towgs84=0,0,0
extent...
2013 Mar 21
0
Problems of exporting raster to ArcGIS
Hello:
I am using R raster package to replace ArcGIS when processing multiple shp files. However, when I export R raster back to ArcGIS, it couldn't recognize R raster file correctly. For example, I used {raster} package and got a RasterLayer as followed.
class : RasterLayer
dimensions : 8280, 18480, 153014400 (nrow, ncol, ncell)
resolution : 0.008333334, 0.008333334 (x, y)
extent : -169, -14.99999, 6.000003, 75.00001 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +ellps=WGS84 +no_defs
data source : G:\_RESEARCH...
2018 Mar 28
0
netCDF to GeoTIFF by layer in r
...one GeoTIFF layer, i.e. unclear which soil depth.
>
> file.nc <- "C:/Soil_Weather_data/Agro/VMC21/VMC21.nc"
>
> file.tiff <- "C:/Soil_Weather_data/Agro /VMC21/VMC21"
>
> importnetcdf <- raster(file.nc)
>
>> importnetcdf
> class : RasterLayer
> band : 1 (of 4 bands)
> #the bands here are the four soil layers
> dimensions : 16800, 43200, 725760000 (nrow, ncol, ncell)
> resolution : 0.00833333, 0.00833333 (x, y)
> extent : -180, 179.9998, -56, 83.99995 (xmin, xmax, ymin, ymax)
> coord. ref. : +proj=lo...
2017 Sep 06
0
rgdal error when trying to import raster
...)
>
> And I keep getting an error like this:
>
> "Warning message:
> In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
> there is no package called 'rgdal'
> Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
> Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
> Calls: raster -> raster -> .local -> .rasterObjectFromFile
> Execution halted"
>
> This is the session info:
>
> "R version 3.2.5 (2016-04-14)
> Plat...
2018 Nov 03
1
odd NOTE in R CMD check of data; Rcpp module related
...;spmod", what = TRUE, env = ns, loadNow = TRUE): Unable to load module
"spmod": object of type 'closure' is not subsettable
Error in .requirePackage(package) :
unable to find required package ?raster?
# but all is OK the second time around
> gSSURGO.chunk
class : RasterLayer
dimensions : 106, 137, 14522 (nrow, ncol, ncell)
resolution : 4, 4 (x, y)
The error message suggests that something goes wrong with the Rcpp module
that raster is using. The module was newly introduced, and coincides with
this new behavior. Do you have any idea about what I could do to avoid t...
2017 Sep 06
1
rgdal error when trying to import raster
...ing an error like this:
>>
>> "Warning message:
>> In library(package, lib.loc = lib.loc, character.only = TRUE,
>logical.return = TRUE, :
>> there is no package called 'rgdal'
>> Error in .rasterObjectFromFile(x, band = band, objecttype =
>"RasterLayer", :
>> Cannot create RasterLayer object from this file; perhaps you need
>to install rgdal first
>> Calls: raster -> raster -> .local -> .rasterObjectFromFile
>> Execution halted"
>>
>> This is the session info:
>>
>> "R vers...
2012 Feb 28
1
colour by z value, persp in raster package
...length = 30)
y <- seq(-1.95, 1.95, length = 35)
z <- outer(x, y, function(a,b) a*b^2)
r1 <- raster(nrows=35, ncols=30, xmn=0, xmx=30, ymn = 0, ymx = 35)
r1[] <- c(z)
persp(r1)
There already exist some function to produce persp plot for anothe classes, but I have no idea how deal with RasterLayer object.
Thanks all!
OV
[[alternative HTML version deleted]]
2018 May 24
0
Problem with adding a raster and a brick
On Thu, 24 May 2018 at 18:41 Mark R Payne <markpayneatwork at gmail.com> wrote:
Hi,
I seem to be having a problem adding the following two raster objects
together - one is a rasterLayer, the other is a rasterBrick. The extent,
resolution, and origin are the same, so according to my understand it
should work. The objects look like so:
> obs.clim
class : RasterLayer
dimensions : 60, 200, 12000 (nrow, ncol, ncell)
resolution : 0.5, 0.5 (x, y)
extent : -70, 30, 50, 80 (xmin, xmax,...
2018 Jun 01
0
Problem with adding a raster and a brick
...ay 2018 at 20:08 Michael Sumner <mdsumner at gmail.com> wrote:
>
>
>
> On Thu, 24 May 2018 at 18:41 Mark R Payne <markpayneatwork at gmail.com>
> wrote:
>
> Hi,
>
> I seem to be having a problem adding the following two raster objects
> together - one is a rasterLayer, the other is a rasterBrick. The extent,
> resolution, and origin are the same, so according to my understand it
> should work. The objects look like so:
>
> > obs.clim
> class : RasterLayer
> dimensions : 60, 200, 12000 (nrow, ncol, ncell)
> resolution : 0.5, 0.5 (x, y)
>...
2023 Feb 21
1
Interpolación IDW
Emilio, muchas gracias. Tuve que rehacer el código para entender mejor
todo, pero me sale el siguiente error:
*Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce
class ?structure("RasterLayer", package = "raster")? to a data.frame*
El código es el siguiente:
*for (i in 1:nrows_mt) { data_it_mt <-
as.numeric(as.vector(data_y_mt[i,])) it_data_mt <- idw(data_it_mt,
sta_mt, grid, p = 1) grid <- data.frame(grid, valores = it_data_mt...
2013 Jul 17
2
Using RasterBricks
Dear listers,
I am trying to create a RasterLayer of the values of a rasterbrick object.
The rasterbrick object has, for example, 100cells
library(raster)
r <- raster(ncol=10, nrow=10)
r[]=1:ncell(r)
s <- brick(r,r,r)
s <- s * 1:3
Each cell of the rasterfinal will have the AREA UNDER CURVE formed by the
values in each cell of the thre...