0

I downloaded some of my classified images from GEE using the following script-

Export.image.toDrive({
  image: input.clip(district),
  description: 'Test',
  maxPixels: 499295920080,
  scale: 30
});

But since my image was large, it was broken down into 16 .tiff files during download. Now I am required to do some post processing on my complete classified image as a whole, but I can't figure out how to combine these images back into a single jpeg/.tiff image.

Can someone guide me towards a viable solution?

1

You can create a Virtual Raster mosaic from them with GDAL, that most GDAL based/agnostic GIS tools (Qgis, ArcMap,...) will be able to handle.

gdalbuildvrt Test-mosaic.vrt Test*.tif

This will work on a linux/unix system. On Windows you might be better off using the -input_file_list parameter of gdalbuildvrt.

If you want to create a GeoTiff from the VRT you can use:

gdal_translate -of GTiff Test-mosaic.vrt Test-mosaic.tif

  • Using this command I got a Test-mosaic.vrt file, but is there a way to convert this to .tif or to read it directly pixel-wise? – Prachi Nov 13 '18 at 20:14
  • You can convert the VRT to a GeoTiff with gdal_translate (included in my edit). However - for any software that can read VRTs this is not necessary, as it will be handled internally. – Kersten Nov 13 '18 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.