Python GDAL tool usage and VRT format data processing

Preface

VRT is a virtual grid file.

Usage

First, find the path to the gadl tool exe file.

D:AnacondaenvsgeopandasLibrarybin

Building a vrt for a data list:
First, open cmd in the tool path, or enter the full tool path by opening cmd
Building a virtual grid.

gdalbuildvrt -input_file_list E:GeoLearndem_vrt_testdata_list.txt E:GeoLearndem_vrt_testdata_vrt.vrt

Reproject the virtual grid and specify the output resolution and interpolation method to overwrite existing files.

gdalwarp -t_srs EPSG:32651 -r bilinear -tr 90 90 -overwrite E:GeoLearndem_vrt_testdata_vrt.vrt E:GeoLearndem_vrt_testdata_vrt_utm.vrt

The original data are two DEM images, and the following image shows the VRT file after concatenation and reprojection, which is only 5 kb
It can be opened directly in QGIS or read using GDAL, which greatly saves data processing time and memory space For more usage methods, please refer to the official documentation of GDAL https://gdal.org/programs/index.html#raster -Programs.