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
1answer
53 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 ...
0
votes
1answer
22 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 ...
0
votes
1answer
100 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 ...
0
votes
1answer
44 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 ...
1
vote
1answer
115 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 ...
2
votes
1answer
3k views

Extracting values from raster stack and aggregating results using R

I'd like to extract values from a rasterstack, cell by cell, and create a list of the values: ext <- extent(0,100,0,100) r1 <- raster(nrows=100, ncols=100,ext) r1[] <- sample(seq(from = 1, ...
0
votes
0answers
44 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: ...
10
votes
2answers
5k 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 ...
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: ...
1
vote
0answers
32 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
25 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
84 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
113 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. # ...
21
votes
4answers
18k views

Layer stacking rasters in QGIS?

I have some multi-spectral data, where the individual bands are separate Raster files. How do I layer stack these rasters so that I get one raster with 3 bands instead of 3 different rasters? This ...
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 ...
2
votes
0answers
67 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, ...
0
votes
1answer
228 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 ...
1
vote
1answer
654 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 ...
3
votes
1answer
3k 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 = ...
0
votes
1answer
87 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
105 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
310 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 ...
0
votes
1answer
67 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 ...
1
vote
0answers
71 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
280 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
971 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
281 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 ...
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 ...
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 ...
0
votes
0answers
293 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
3answers
1k views

Unstack band layers from raster

I have stacked layer (from ERDAS) of Landsat 1-5 and 7, bands. I want each of the bands in a separate layer. How can I do that?
5
votes
3answers
6k 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
615 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
376 views

gdal_merge shifts rasters after processing, layer stack is slightly off

I have experienced that gdal shifts rasters. The outputs of gdal_warp are often skewed, have different pixel sizes and so forth. A known error which has also been discussed here. But now, I had to ...
1
vote
0answers
285 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
4k 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 <- ...
3
votes
2answers
3k 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 ...
4
votes
1answer
468 views

Where are the “band names” of an ENVI file once it is imported in R?

I have a .dat file (ENVI format) with specific band names, as you can see in the snapshot. I've imported this file in R, but I cannot find the band names in the R object. The command names(...
4
votes
2answers
6k 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 ...
1
vote
1answer
2k views

Using GDAL/Python to stack georeferenced images of different sizes

I am in the process of porting a code I wrote in IDL (interactive data language) to Python but am running into a bit of a problem that I am hoping someone can help me with. The code goes like this: ...
0
votes
2answers
2k views

R -plot 12 images per plot or save 12 images per image file in R

Here is R script and my question is How can I plot 12 images per plot or save 12 images per image file because I have total 864 images. RAD1998 <- raster(paste(getwd(), "/1998bil /...
1
vote
0answers
74 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 ...
1
vote
0answers
124 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 ...
3
votes
2answers
3k views

Extract raster layer data by attributes in RasterStacks R

I have a RasterStack with 2 raster layers of the same area, one from a SpatialPolygonsDataFrame (layer1) and another NDVI satellite image (NDVI). layer1 has a series of polygons, each with various ...
0
votes
1answer
271 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 ...
1
vote
2answers
315 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
63 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
235 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
143 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 ...
1
vote
1answer
163 views

Matching Decedal Average NDVI and Worldclim Data

Ive never used NDVI (or EVI) datasets in R. Does anyone have any resource I could use to access a decadal average NDVI dataset for the globe. It would be preferable if this dataset was also comparable ...