Hot answers tagged

37 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,318
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.4k
6 votes
Accepted

Reprojecting raster with FME?

Agree to the comment of @FelixIP, one possible solution is to first create a whole raster using RasterMosaicker transformer, then reproject and re-tile the Raster with RasterTiler transformer. This ...
Jochen Schwarze's user avatar
6 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,267
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,101
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.2k
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
  • 40.4k
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

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,806
4 votes

How to create a mosaic in QGIS with cutline and feathering for Landsat-8 imagery

I am a developer of the open-source GIS Whitebox GAT, which contains several image processing tools including a tool called Mosaic With Feathering. I doubt that it is as sophisticated as ERDAS or ENVI ...
WhiteboxDev's user avatar
  • 10.9k
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,936
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
  • 49.5k
3 votes
Accepted

Zonal Statistics with very large mosaic in ArcGIS

To reduce the size of my project, I used Model Builder to iterate through all my tiles, and save them as integers (they were floats; this question was helpful). Then, I made a new mosaic out of these ...
Bernie L's user avatar
  • 121
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,210
3 votes
Accepted

How can I use GDAL Merge with multiple files in one folder in python 2.7?

So you just want to mosaic all the tiles for a given day? That's a perfect Job for GDALs VRTs. gdalbuildvrt mosaic_049.vrt 049*.hdf or from Python for all days import subprocess import glob for ...
Kersten's user avatar
  • 9,806
3 votes

Clean up edges in raster mosaic

For remove black edge: Goto the layer property of your image layer. Then go to the symbology menustrip. Note: Do not compute histogram. Remove check from “Display background value” and “Apply gamma ...
Muhammed Naqi's user avatar
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,156
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
  • 40.4k
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
  • 40.4k
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
  • 68.6k
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

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
  • 62.4k
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
  • 684
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,806
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,599

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