Questions tagged [r-raster]

raster is an R package for geographic data analysis and modeling.

Other resources

Related tags

1217 questions
-1
votes
1 answer

How to project raster and observation points with ggplot

He all! I'm new in R world and I think that this will be a stupid error: I would like to project a raster representing my "study area" adding observations take from rgbif. First, I've take specie observations in the "study area" using a polygon: wkt…
Bacone
  • 1
-1
votes
1 answer

Looping 'raster' package functions over each multi-polygon feature in R

I am trying to loop several functions from the 'raster' package, namely, crop(), mask(), reclassify() and unstack()/as.list(). I have ten raster layers that share the same extent and data type; they correspond to land cover over 10 time-points. I…
Johanness
  • 101
  • 4
-1
votes
1 answer

Raster over a vector with a given resolution in kilometers

I would like to know how to create a raster with a resolution of 10km X 10km that could cover the whole extension of the Brazilian territory in R.
morebru
  • 175
  • 1
  • 9
-1
votes
1 answer

Extracting max pixel value inside polygons in R

I have been using extract(raster,polygons,na.rm=TRUE, fun=max) This generates pixel values from the pixel with max area inside polygons, i would like to extract the values from the pixel with max raster value inside each polygon, any suggestions?
MANY
  • 1
  • 2
-1
votes
2 answers

Dissolve Overlapping Polygons using difference and union in R

Have the shape file which has multiple polygons with logical division of Zones and Plots. Plots are overlapping over Zones. The task is to dissolve / merge plots with Zones with no overlapping. Here is spplot of the shape file. Here plots are on…
string
  • 787
  • 10
  • 39
-1
votes
1 answer

Calculation of 1st and 3rd quadrilles for a stack of raster using quantile function in Raster package in R

I am using following code for quartile calculation in R using quantile function in raster package. My raster image stack has 307 images and all images have some No Data values. I just want the output without considering No Data values. I tried…
BetterCallMe
  • 636
  • 7
  • 15
-1
votes
1 answer

Covariance of two images using 3x3 moving wndow

I have a raster with 2 bands and I want to compute covariance in 3x3 moving window and replace the focal value with vlue of covariance. I am looking into focal function of raster package and also got some hint to use getValuesBlock with for loop. I…
gis.rajan
  • 517
  • 3
  • 20
-1
votes
1 answer

Loading ArcGIS vector and raster layers in R (for ipdw package; Inverse Path Distance Weighting)

I am trying to interpolate landscape influences in the coastal/marine environment by inverse distance weighting while accounting for land barrier, and am excited to find the ipdw package (https://cran.r-project.org/web/packages/ipdw/ipdw.pdf).…
jhsi
  • 7
  • 1
-1
votes
2 answers

stack function only stacks the last raster file

I am trying to create a raster stack of 120 raster files. I am generating these files inside a loop and adding the generated raster to a rasterstack. The code looks like: library(raster) stack_P_95 <- stack() for (i in startyear:endyear) { file <-…
-1
votes
1 answer

Need to illuminate 20-pixels from top, bottom, right and left of an image and then I need to compare pixel values

I need to determinate whether the given image is blank or it has the same pixel values please find the below code. here I want to set a tolerance. I don't want to pass top, bottom, left and right 20 pixels to this logic. please help! for (String pic…
Maniraj Mkr
  • 143
  • 1
  • 2
  • 12
-1
votes
1 answer

Error when plotting RasterLayer in R 3.x.x

Since the release of R 3.x.x I have problems when plotting. Until now I was always able to go back to an older version to avoid this problem, but now I use packages which are not available for R 2.15.x. Little example: > r <-…
te_ar
  • 115
  • 1
  • 13
-2
votes
1 answer

Please help me fin the reason for no output in R

Work: a folder contains name.csv, this file contains filename in columns, and latitude and longitude in next columns. the same folder contains .tif files. I have written code in r to loop through filename each time and find matching .tif file names…
G T
  • 1
-2
votes
2 answers

Turn extraction list to csv file

I have uploaded a raster file and polyline shapefile into R and use the extract function to to extract the data from every pixel along the polyline. How do I turn the list output by extract into a CSV file?
Selena Chavez
  • 139
  • 2
  • 10
-2
votes
1 answer

How to assign specific colors to specific cell values in a raster file?

I have a raster file with values ranging from 1 to 64, I want to assign specific colors to specific values, for example, I want that cells equal to 1 be painted as rgb 96,0,232, cells equal to 2 as 141,0,255, and so on. Thank you very much for your…
-2
votes
1 answer

How to perform raster calculation in R

I am processing radiometry rasters. I wrote two bands in two separate files already: setwd("D:/All_radio") writeRaster(new,filename="NIR.envi",format="ENVI",overwrite=T) writeRaster(new1,filename="SWIR.envi",format="ENVI",overwrite=T) When I tried…
Yuyun He
  • 5
  • 1
  • 3
1 2 3
81
82