Merge raster data with GDAL in Python

preview_player
Показать описание


Code:

from osgeo import gdal
import glob
import subprocess

# list all files in directory that match pattern
print(demList)

# gdal_merge

# build virtual raster and convert to geotiff
vrt = None
Рекомендации по теме
Комментарии
Автор

Thanks for the short tutorial. Here is an alternative: gdal_merge.py -o large_output_raster.tif your/raster/folder/*.tif Make sure you have gdal installed and run it in terminal.

hubertkanyamahanga
Автор

Fantastic, thank you so much. I have spent much longer than I should working out how to loop this through an entire directory of images, which will save so loads of time in future.

malcolmcoull
Автор

You must a good researcher in RS. Thanks for your help

chaoli
Автор

Is there a way to add multiple geotiff files( like markers or houses) on an other geotiff file?

MrBreazyyy
Автор

How did you merge python to QGIS to work instantly and show the result? Can you please let me know if there is a video for it. Thank you

hadikarimi
Автор

Hiii, I'm using the virtual raster method but not all the tifs are being merged :( what should I do?

isabelahorta
Автор

Can you make video on custom dataset of raster(geotiff image)dataset.

shubhamkedar
Автор

Hi, the output file size becomes too large after merging. Could you please explain how to fix this?

sarahtulip
Автор

I don't understand the subprocess.call function. I understand that you concatenate the cmd with the DMElist, but why is the split needed. Awesome tutorial, thanks!

rubencrespo
Автор

Great video! I've merged a couple of datasets with no issue, but now I get this error:
ERROR 1: ZIPDecode:Decoding error at scanline 0
ERROR 1: TIFFReadEncodedTile() failed.
ERROR 1: \\Path to this file...\DTM_1km_6159_636.tif, band 1: IReadBlock failed at X offset 0, Y offset 0: TIFFReadEncodedTile() failed.
the data is from Denmark and I've got different offset values like x=6, 1 or 8 and y=5 or 6
I've been stuck on this problem for a while and tried all the solutions I've found on the internet, have you encountered this problem before?

livmaritharstad
Автор

Hi, thank you for the tutorial, I am new to python and I am getting the error (OSError: [WinError 193] %1 is not a valid Win32 application) while running the command of Can you please help me out? thanks

sabazehra