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
24 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
20 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
24 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
49 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
45 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
31 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
48 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
23 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 ...
0
votes
1answer
312 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
146 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
42 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
66 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
193 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
2k 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
56 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
211 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
689 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
168 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
273 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
1k 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 ...
9
votes
1answer
4k 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 ...
3
votes
3answers
4k 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
500 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
268 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
3k 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
1k 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
71 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 ...
3
votes
2answers
5k 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
95 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
117 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
262 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
59 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
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 ...
1
vote
2answers
258 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
60 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
222 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
134 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
150 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 ...
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 ...
7
votes
1answer
347 views

Stacking Vector Layers in TileStache

I am serving several vector tile layers of different geometries (point, line & polygon) in TileStache using VecTiles:Provider, with this cfgfile: { "cache": { "name": "DISK", "path":"...
2
votes
1answer
76 views

How to determine the appropriate size of a 3 dimesional raster block/chunk

I am processing large MODIS time series (12 years) dataset with an array dimension of 4800 x 4800 with a data type of Int16-Sixteen bit signed integer. I want to build a 3 dimensional array (row,col,...
2
votes
1answer
3k views

R: extract values from raster stack and aggregate results

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, ...
1
vote
1answer
3k views

stack rasters with different extent and resolution in a loop with R package raster

I would like to stack rasters with the R package "raster". Layers are in ascii format. I want to crop them to have the same extent and project them to have the same resolution. My code gives raster ...
1
vote
1answer
159 views

stack 10 modis ndvi geotiffs and scale them by 0.0001

I have 10 geotiffs Modis ndvi named 2005.tif ... 2014.tif I want to stack them all and create timeseries. i know how to do that, but the stacked images still need scaling by 0.0001. how can i bulk ...
4
votes
1answer
423 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(...
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?
2
votes
0answers
386 views

R raster stack 4 dimensions

I am trying to create a raster stack / brick from a list of ncdf files with the dimensions 160x160x24x1). r = stack(files) This gives me a raster stack but without the 4th dimensions which is ...
1
vote
0answers
355 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 ...
2
votes
1answer
594 views

Calculating quantile values over a stack of images with grass gis. Help needed on r.series

I need to calculate the values for the 25%, 50%, 75% and 90% quantile over a series of rasters (time series of ndvi values from landsat). I am exploring the r.series command in Grass GIS, but the ...