I want to do an extration from rasterdata and add the information to the polygon, but I get this warning and the extration contains only null values
Warning message:
In .local(x, y, ...) :
cannot return a sp object because the data length varies…
I recently stumbled upon the setValues()form the raster package, but I am wondering what the use case of this function is. Is there any advantage compared to normal subsetting and indexing:
r <- raster(ncol=10, nrow=10)
#setValues Function
r …
I am trying to calculate a 72 bands raster. If the first 36 bands value (near infrared band) is greater than the latter 36 bands value (shortwave infrared band), assign it 0; if not then proceed on the following function. I tried other ways of…
I have been working in a list of function to process MODIS vegetation index timeseries and return crop cycle paramenters. It's for PhD thesis and I'll process all South America, so I need to use all forms to reduce the time to process.
I found the…
I am searching for a method to show progress when doing spatial operations in R. I know there are some for working with raster-data. Does anyone know a way to show progress when doing an operation with vactor-data like union{raster}? It would really…
I am new to R. And I already have a SVM model in R. Right now, I have two raster image, one is the elevation, another one is the slope. The elevation and slope would be used as the predictors for SVM. And I also want to plot the results as a…
I am trying to use the code referenced in this post but I can't figure out why it is necessary to run raster.list$fun = mean. (See answers in link) Can anyone tell me what this does?
I need to convert a shape file into a raster and have absolutely no clue where to even start.
If anyone could help me out I'd really appreciate!
Update: I have found out about the 'readOGR'-function, but everytime I use it I get the following…
I have created the following Transition Object from a raster containing altitude values of a landscape in R:
wd <- "C:/Users/LG/Dropbox/Random Walk"
setwd(wd) …
I am currently working on a script, that loads a TIF file into a raster object, crops it and plots two points (starting point and point of destination; selected via the click-function) into that raster. I then want it to get the cell numbers of…
I have been onto this all day but haven't found a satisfying solution yet.
I plotted a raster and created a matrix (="coord_mat"; left column contains X-coordinates, right column the Y-coordinates) that contains the coordinates of multiple points…
I am trying to follow the example give here under "A polar example"
This example uses sea-ice data in .bin format to plot as raster. I am trying the same with a different file available from the original ftp server of the National Snow and Ice Data…
Our office does scanning of data entry forms, and we lack any proprietary software that is able to do automated double-entry (primary entry is done by hand, of course). We are hoping to provide a tool for researchers to highlight regions on forms…
I get an error message when writing compressed netcdf4 files using r raster package ver 2.5-2.
r <- raster(system.file("external/test.grd", package="raster"))
s <- stack(r, r*2)
writeRaster(s,"test.nc",format="CDF",compression=7)
Error:
Error…
How can I crop right raster to extent of left raster below?
I used:
cr <- crop(right, extent(left),snap="out")
fr <- rasterize(left, cr)
r<- mask(x=cr, mask=fr)
but did not succeed.
Thanks for suggesting a work around.