Questions tagged [stack]

stack in this context is intended for questions relating to the stacking of rasters, it is not intended for questions relating to a GIS software stack

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

Exporting R gapfill output

may i be permitted to post a follow up question. ################ tmp = array(lst_stack,dim=c(247,384,4,3)) input_array <- aperm(tmp, c(2,1,3,4)) Image(input_array, col=rev(terrain.colors(100)), ...
0
votes
1answer
62 views

How to calculate mean for multiple raster files and multiple variables using R

I have a folder with multiple raster files (.asc) which contains the biomass of different fish species (e.g., Anglerfish, Bathydemersal etc) for different years (e.g., 00012, 00024, 00036 etc) I want ...
0
votes
1answer
35 views

Raster image error when entering stack layers using Rstudio

I am a beginning user of Rstudio, and I want to run Random Forest by using a couple of "raster layers" which were stacked in ENVI. Before doing stacking I checked the cell size and the ...
1
vote
1answer
17 views

Why raster stack function changes the number of layers

I have a list of 12 rasters: IN_folder_S2 <- "T:\\New_SM\\Indices_UXC" IN.files_S2 <- dir(IN_folder_S2, pattern= "_11.tif$",full.names = T) IN.files_S2 IN.files_S2 [1] &...
0
votes
0answers
34 views

Add NDVI Date to stacked image in Google Earth Engine [duplicate]

I have created an Image collection in GEE, and I have computed NDVI index and mapped in each Imagen from Collection. Later, I create another collection with NDVI as a band, an finally Statacked in a ...
0
votes
0answers
9 views

Calculation of mean and standard deviation of raster data in R? [duplicate]

I have a set of raster images (GeoTIFF, Landsat 1984-2018) which I cropped with my AOI using a shapefile. Now I want to stack them and calculate the mean and standard deviation of every pixel of the ...
5
votes
1answer
1k views

R-4.0.1 Not sure I understand this message: Warning message: In proj4string(x) : CRS object has comment, which is lost in output [closed]

Context: I want to store the TIFF data to use it for running a linear regression model later on. Ultimate goal: Create a carbon map using field data as a basis. Libraries: library(sp) library(raster) ...
1
vote
0answers
91 views

Calculation of mean and standard deviation of raster images in R

I have a set of raster images (GeoTIFF, Landsat 1984-2018) which I cropped with my AOI using a shapefile. Now I want to stack them and calculate the mean and standard deviation of every pixel of the ...
0
votes
0answers
32 views

How can convert daily MODIS NDVI to monthly of them in Google Earth Engine?

The link of code: https://code.earthengine.google.com/71d9f6ea42ee55b4e18d2adf22d9e678 As a result, I have to have 96 bands in the stack image so that the ID of each band returns the date associated ...
0
votes
1answer
55 views

RasterLayer vs RasterStack

I have a few hundreds of .tiff files that I converted as a raster stack. However, when I tried reading the file, it is classified as a RasterLayer. I was expecting it to be a RasterStack. The ...
1
vote
1answer
269 views

stars package in R. How to add time dimension in a stars object?

I have a raster stack (my_stack) and I converted it into a stars object: mystar <- st_as_stars(my_stack) That results in: stars object with 3 dimensions and 1 attribute attribute(s), summary of ...
0
votes
0answers
81 views

Calculating the mean value of a raster stack using numpy

I am calculating the mean value of a stack of images. I created a virtual raster which is the stack of 68 sentinel-1 images. I want to calculate the mean value for every pixel. Here is my code: ...
0
votes
1answer
107 views

Subset raster stack in R by a vector of number sequences?

I have a large raster stack that I need to subset by somewhat irregular time spans. I'd like to do something like this: rstack[[c(1:3, 4:8, 9:15)]] But there are 30 sequences like the ones above ...
1
vote
0answers
36 views

Merging satellite images error

I am trying to merge 3 satellite images of 3 times. The images are median images. I have used the following code but there is an error. var maskL8 = function(image_m) { var qa = image_m.select('BQA'...
0
votes
0answers
27 views

Multi-seasonal image stacks in GEE

I want to stack layers of 3 images (median images from 3 seasons). I want to differentiate the land uses in different seasons. for example, there will be more waterbodies in rainy season but less in ...
1
vote
2answers
163 views

stack() in R does not include all .tiff files in my directory

I am trying to perform stack() in R using enhanced vegetation index (EVI) time-series maps but it doesn't include all the .tiff files in my directory. Here's the list of files when I dir(files.evi): ...
1
vote
1answer
190 views

Determining which layer in raster stack is first to meet condition using R?

I want to analyze a raster stack and determine the first layer in the stack that meets a condition for every pixel. Here's a reproducible code example generating rasters and making a stack. # ...
0
votes
1answer
73 views

Mosaicing of multitemporal Sentinel-2 images

My aim is to combine several Sentinel-2 Level2A images of the same location/orbit number but at different dates of a year. I would like to have different options to create that mosaicing (e.g., if ...
2
votes
0answers
92 views

Biweekly time series for raster stack in r

I have a netcdf file with daily data and I calculate for each week some statistics, using the "apply.weekly" command in the "xts" library. However, I would like to calculate bi-weekly statistics, ...
1
vote
0answers
25 views

How do I compare multiple years worth of geomorph changes in a river while drawing one profile line?

I have many years worth of DEMs of a river I'm studying. I'm very, very new to ArcGIS (think one intro class), and learned how to use the 3D analyst tool. What I'd like to be able to do, is to draw ...
1
vote
2answers
1k views

Looping a raster stack with a step, R

I have a large raster stack of about 500 rasterlayers. What I want to do is to extract specific layers and store them in a different strack. The layers for which I am interested in, have a step of 8 ...
0
votes
1answer
328 views

Using raster stack function time in R?

I successfully ran a function over a smaller test raster stack (48 layers) in about 30 minutes but cannot run it over my large stack (1462 layers). The last one I tried over the large stack ran from ...
0
votes
1answer
109 views

Plot a series of subsetted pixels from a raster stack in R

I have created two raster stacks and would like to plot a row or column of pixels through the stack, but am not sure how to approach this. I know I can subset by layer, but how do I subset ...
0
votes
2answers
136 views

Why does the Extent of NIR Band 8 Landsat image not match other bands, even when cropping to a specified extent?

I'm trying to load and then stack four bands 2,3,4 and 8 RGB and NIR from Landsat images. I have downloaded and extracted them and they are in .tif format. # loading the bands B2 <- raster("./...
0
votes
2answers
432 views

Raster operations in a raster list in R

I have a raster list (21 in total) S1 that have the same projection, resolution but not exactly the same extent. Due to this difference, I cannot stack them without solving the extent/dimensions ...
3
votes
1answer
4k views

Import multi-band TIFF in R

I am trying to import a TIFF file that contains 2 bands. When using the following code in R, it seems only the first band is being recognised. S1<-"my/path/" S1<-list.files(S1, full.names = ...
1
vote
0answers
92 views

How to save statistical parameters of a raster stack in a csv using R

I have a reference raster and a stack of other rasters. I wanted to perform Mean, Std Dev and Bias of the reference with respect to the remaining. So I calculated the Cell Stats of all but when I try ...
5
votes
0answers
323 views

Stacking and masking Landsat at the same time with rasterio

Based on answers from previous questions 1,2 and the Masking a raster using a shapefile guide from rasterio cookbook, I wrote the code below. The code runs correctly. I would like to improve it. 1- ...
0
votes
1answer
1k views

Add bands' name and description to the Metadata when stacking using rasterio

I'm using this code, of @Loïc Dutrieux, to stack 8 Landsat bands. with rasterio.open(final_list[0]) as src0: meta = src0.meta with rasterio.open('stack.tif', 'w', **meta) as dst: for id, layer ...
0
votes
2answers
377 views

Selecting layers of a raster stack using a sliding windows as a step in R in for loop

I would like to create a loop that every time selects the first ten layers of a raster stack, calculates their mean and saves it to a layer of a new raster stack. Also, I would like to have a step ...
0
votes
0answers
311 views

Google Earth Engine: Stack an ImageCollection

Does anyone know how can I stack all this collection? I made my own collection from January Landsat images (L7 and L5) and I would like to stack all the images to check which are the areas with more ...
3
votes
1answer
2k views

Raster calculation loop - R

I have a raster stack of 108 elements The stack 'images' is created using 4 bands (RGB+NIR) of 27 satellite images. The sequence of the rasters in the stack is: Position [[1]]: blue band image 1 ...
10
votes
2answers
7k views

How to stack bands in Google Earth Engine?

I have created an Image collection in GEE and with the help of a function I have computed NDVI index and mapped it to create another collection with NDVI as a band. Now I want the create a stacked ...
5
votes
3answers
7k views

Stack rasters with different origin, dimensions and resolution in R

I have three raster files with the same extent and CRS, but with different origin, dimensions and resolution. r1 class : RasterLayer dimensions : 3020, 3043, 9189860 (nrow, ncol, ncell) ...
4
votes
1answer
733 views

How to create raster stack from names on R

I have a dataframe containing the best predictors by their contribution to a model: bestpredictors var contrib 2 Pfallwinter 8.1141 15 Tofall 58.0000 23 ai 5.3573 26 ...
1
vote
0answers
301 views

Is it possible to list SpatialGridDataFrame files to be used in a loop?

I have a lot (>50) of SpatialGridDataFrame files that I need to turn into raster files, stack with a set of raster files I already have and then extract data from random points from each layer of all ...
6
votes
2answers
5k views

Mean by month on R stacked raster

I work with MODIS NDVI rasters in 2016. I have 23 rasters stacked in one object. I have 2 raster by month. I would like the average by months and conserve a raster for each month. ndvi.stack <- ...
1
vote
1answer
2k views

R Stack. Extent and CRS

I'm new on R. I was listing .tif files from a folder to R. My final product is going to be a value mean of all the files in only one image. So I start stacking all of them, then brick the stack, and ...
1
vote
0answers
79 views

Stacking/Aligning High-Res UAV Mosaics from Different Dates in QGIS?

I have two mosaics taken in different band sets respectively, on two different flights- of a crop field. The flights were taken a day apart, so the vegetation cover has not changed. The only issue is ...
5
votes
2answers
8k views

Handling multiple-extent-problem to create raster stack in R?

I am storing ~ 30 raster files in a folder and want to create a raster stack. I know that not all of these rasters have completely the same extent. They do have the same resolution and CRS. Thus I ...
4
votes
1answer
1k views

R package gapfill: How to convert R raster stack to 4-dimensional array and then back to raster stack?

I'm currently analyzing MODIS EVI time series (MOD13Q1) for a small region between 2000 and 2015. Now, I would like to fill missing values using the new R package gapfill. What I have done so far: ...
0
votes
1answer
101 views

Matching extent (samples & lines) to get multi-temporal stack

I downloaded several Landsat scenes (4x3) to create some multi-temporal stacks to see the phenological difference in April/March - mid summer - autumn. I actually use The EnMap Box which has been ...
1
vote
0answers
141 views

Determining Highest Position in QGIS for raster stacks with 10+ images?

I want to follow up on this question from last year Emulating ArcGIS Highest Position tool in QGIS? Here the question is if QGIS has a tool like the "highest position" tool in ArcGIS, where, in a ...
0
votes
1answer
290 views

raster sytling multiband rendering 0=nodata

Is there any way to set the pixel value 0 to nodata of a raster stack in the multiband rendering type in QGIS? I remember that it is possible to check a box in arcgis for that, so maybe i just ...
0
votes
1answer
71 views

Receiving higher values than should be possible in stackApply SUM for Frequency calculation in R

I am currently working on creating a frequency raster for a country based on multiple Rasters of the same day through following years and where the previous values are reclassified to 1's and 0's. The ...
3
votes
2answers
4k views

How to remove the Na values from a stack of rasters?

In R I have a stack (nsw.stack) which contains 6 variables. I have clipped the extent. However, When I look at the summary it appears that there is a lot of NA values (see below). I think this is ...
1
vote
2answers
386 views

How to convert a raster output in a stack in R into ArcGIS

I am modelling the response of a bird (skylark) to various climatic and topographical variables in the program R. Using the predict function I predicted the abundance per pixel (see below for code). I ...
0
votes
1answer
69 views

filter a raster stack in Arcgis

i'm trying to run "Filter" operation using AcGIS on a stack layer of 331 bands. However, the result is always a raster of only one band. How can i get operation to be done on the whole stack?
1
vote
0answers
250 views

Raster package limitations

I am very new to R and to raster package and I was hoping that someone could provide some guidance. I am trying to run a function that averages a series of rasters, 300 to be exact, they are in geotif ...
2
votes
0answers
148 views

Layer Stack 6 Landsat8 bands

I have 6 images from Landsat 8 (Green,Red,NIR,SWIR1,SWIR2,NDVI). When I want to layerstack them with "Merge" I always get a result tif which is just black and white, however I can see that all 6 bands ...