Skip to main content
39 votes

Merging all tiles from one directory using GDAL

You could create a virtual mosaic from all Tiff files: gdalbuildvrt mosaic.vrt c:\data\....\*.tif and convert it afterwards: gdal_translate -of GTiff -co "COMPRESS=JPEG" -co "PHOTOMETRIC=YCBCR" -co ...
christoph's user avatar
  • 5,847
7 votes
Accepted

Combine multiple partially overlapping rasters into a single raster in R

The best solution to this is making a list of the rasters, then passing this to a function based on the apply family The following code was pulled from a similar question wrapped into a function and ...
Tom Higginbottom's user avatar
7 votes

QGIS more than 3000 raster works slowly

You may see considerable benefit if you load them into a single virtual raster (vrt). You can do that through the processing toolbox, by searching for "build vrt"
ndawson's user avatar
  • 27.7k
7 votes
Accepted

reduceResolution failes in Google Earth Engine

You were almost there. There were 3 mistakes in your code: reduceResolution() needs a coordinate reference system (crs) of the input image so that it understands the resolution of the input image (...
kkrao's user avatar
  • 1,337
6 votes

Export mosaic to Google Drive, generating more than just one file and can't download this

You do not get a valid export geometry by using .getInfo(). As a result it looks like Earth Engine is exporting your image globally and thus creates a multitude of subsets (called shards). If you ...
Kersten's user avatar
  • 9,917
5 votes

Combine multiple partially overlapping rasters into a single raster in R

Full credit to @Tom Higginbottom who answered the hard part but a small modification I made to fix the Error in compareRaster(x, extent = FALSE, rowcol = FALSE, orig = TRUE, : different origin Just ...
falcs's user avatar
  • 1,111
5 votes
Accepted

How import many raster in r?

Solution 1 Create a loop to iterate through files: library(raster) raster_files <- list.files(mypath,full.names = T) #use pattern = '.tif$' or something else if you have multiple files in this ...
aldo_tapia's user avatar
  • 13.7k
5 votes
Accepted

Image Export fails in Google Earth Engine because "export region contains no valid (un-masked) pixels

1st: The exact code you posted (https://code.earthengine.google.com/ce1a151ce06497b20cf1793715cb0120) did export the image correctly. So the error cannot be reproduced. May be, you changed the 'ROI' ...
Rodrigo E. Principe's user avatar
5 votes

How to generate a collection of mosaic images by mapping over date list in Google Earth Engine

The following code creates a list of mosaic images, where each mosaic image is constructed from images of a specified time interval. Within each time interval, the "least cloudy pixel", determined by ...
Tyler Erickson's user avatar
5 votes
Accepted

Mosaic to New Raster outputs whole numbers instead of decimals

You need to change the Pixel Type (optional) to 32_Bit_Float or 64_Bit, if you want decimals: 32_BIT_FLOAT—A 32-bit data type supporting decimals 64_BIT—A 64-bit data type supporting decimals. By ...
ahmadhanb's user avatar
  • 41.1k
5 votes
Accepted

Define original image ID for each pixel of Quality Mosaic in Google Earth Engine

I had the same problem when I created the 'Best Available Pixel' code (https://github.com/fitoprincipe/geebap), and I solved this way: Add a band in which the value of every pixel is the number of ...
Rodrigo E. Principe's user avatar
5 votes
Accepted

How to estimate amount of disk space required for gdal.Translate?

The uncompressed size is simply the total count of pixels * bytes per pixel * number of bands. An example: 10000 x 10000 pixel sized 8-bit RGB image takes 10000*10000*1*3=300 MB. Compressed size is ...
user30184's user avatar
  • 67.3k
4 votes

Rasters in R - merge taking mean, excluding NAs. Overlay and Mosaic both giving funny results

I think the problem with: water_mean_overlay <- do.call(overlay, c(water_rasters, fun = mean, na.rm = T)) is that na.rm=T is being passed to overlay, and the help for overlay doesn't show an na....
Spacedman's user avatar
  • 65k
4 votes
Accepted

Merging two rasters, obtain only highest values, overwrite raster in ArcGIS Desktop?

You can do this just by using the Mosaic to New Raster geoprocessing tool. Just choose maximum for your Mosaic Operator and the new raster will use the high value anywhere that they overlap.
cl3's user avatar
  • 1,946
4 votes

How put order in multiple raster file in RasterMosaic in FME?

In FME 2020.1 To order the rasters use the Attribute Creator and then assign a number (1,2 etc). Then sort them by numeric (ascending) Workspace template is available here https://community.safe.com/...
Mapperz's user avatar
  • 50k
3 votes
Accepted

Creating raster stack using R?

Try fs <- list.files(path="F:\\MODIS\\Modis EVI\\HDF8 EVI", pattern = "tif$", full.names = TRUE) library(raster) s <- raster::stack(fs) writeRaster(s, "hdf8_EVI.TIF") I have no idea what ...
mdsumner's user avatar
  • 8,206
3 votes

What method does QGIS Merge Rasters tool use?

The GRASS r.patch from the Processing Toolbox also does the work. I could not manage to merge two rasters due to some file name issues and who knows what else, but with r.patch everything went smooth, ...
Marco's user avatar
  • 3,240
3 votes

Rasters added to mosaic dataset only display at large acale

Had the same problem (in ArcGIS 10.4). I added some rasters to a mosaic dataset and the new rasters would only appear when zoomed way in. Here's how I solved it: In ArcCatalog Right Click the ...
Luke's user avatar
  • 31
3 votes

Merging all tiles from one directory using GDAL

If you are willing to use python, then you can use wildcards to select files with the glob module, and then you can execute the command with os.system. import glob import os file_list = glob.glob("c:...
user6072577's user avatar
  • 1,582
3 votes
Accepted

Filling nodata value gdal.BuildVRT

Ok, i solved the error the value in srcNodata must be a string "nan"
Italo Moletto Lobos's user avatar
3 votes

Mosaic of rasters is big, black rectangle in QGIS?

TO merge raster layer, you can use the Merge raster layers tool. You can get the tool from Processing Toolbox -> GDAL/OGR -> Miscellaneous -> Merge raster layers. But before the mosaic ...
ahmadhanb's user avatar
  • 41.1k
3 votes
Accepted

Combine multiple TIFF Files into one

You need to use Merge tool from Processing toolbox -> GDAL/OGR -> Miscellaneous -> Merge it has the option to Grab pseudocolor table from first layer that you need to check, as you can see ...
ahmadhanb's user avatar
  • 41.1k
3 votes
Accepted

Mosaic rasters with same suffix (python)

You question is not really a GIS question, more a question on how to group items in a list. But anyway if you start with a list of the rasters then you can do: import arcpy from arcpy import env env....
Bera's user avatar
  • 74.7k
3 votes

Mosaic rasters with same suffix (python)

Your input image names all have the format part_part_image.tif, this makes it easier, using string.split('_') breaks up the name into ['part','part','image.tif'] from which we can use the 2nd element (...
Michael Stimson's user avatar
3 votes
Accepted

How to generate a collection of mosaic images by mapping over date list in Google Earth Engine

I was able to solve the issue (with the help of Google Earth Developer Group's folks). Use var mosaic = ee.Image(S1).blend(ee.Image(S2)) to mosaic instead of mosaic() and make sure the dates have non-...
shahryar's user avatar
  • 694
3 votes
Accepted

Earth Engine: Mosaic 2 collections

Both dates you provide the collections contain multiple images over the sundarban region. A ImageCollection is a spatial as well as temporal collection of images. To display them you have to reduce ...
Kersten's user avatar
  • 9,917
3 votes

Merging hundreds of rasters in QGIS to create a basemap

Solved it. I think the source of the error I got building a virtual raster was some sort of character limit in the Build Virtual Raster tool. After adding the input files (400+ of them) some of the ...
user122728's user avatar
3 votes
Accepted

For loop to Create lines of raster mosaics in ArcMap 10.5

A loop like this should do what you desire: for x in range(6): set_of_images = ';'.join(['D:/KKR/{}_cticlp.img'.format(str((18 + x * 8) + y).zfill(3)) for y in range(6)]) arcpy....
Bjorn's user avatar
  • 2,609
3 votes
Accepted

Smooth mosaicking of smaller orthomosaics to form a homogenous mosaic

That is noise / offset pixels or unexpected dark or light strips fringing an object. Data from airborne multispectral or hyperspectral imaging scanners shows a pronounced striping pattern due to ...
Maxima's user avatar
  • 1,701
3 votes
Accepted

Getting "ERROR 000999: Failed to get raster"?

You've got a file geodatabase as your workspace, which can't house tifs. Set your workspace to the folder containing the tifs or remove the .tif if the rasters are in your geodatabase.
Emil Brundage's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible