Le 24/06/2022 à 02:29, Alexandre Neto via QGIS-Developer a écrit :
I am testing the GDAL tools on QGIS 3.22.8 on Windows. When running gdal2xyz with a single band raster I am getting the following error:

C:\Users\testing_user>gdal2xyz.bat -b 1 C:/Users/testing_user/Desktop/gdal_commands_test/mdt_clipped.tif OUTPUT.csv usage: gdal2xyz.py [-h] [-skip] [-srcwin xoff yoff xsize ysize] [-b band [band ...]] [-allbands] [-csv] [-skipnodata]                    [-srcnodata [SRC_NODATA ...]] [-dstnodata [DST_NODATA ...]]
                   src_dataset dst_dataset
gdal2xyz.py: error: argument -b/-band/--band: invalid int value: 'C:/Users/testing_user/Desktop/gdal_commands_test/mdt_clipped.tif'

If I remove the -b option it works.

Windows Is now on GDAL 3.5.0. On my linux machine that still uses GDAL 3.0.4 it works fine.

Bug report? In here or in GDAL?
to GDAL. It looks like the -b option is a bit too greedy in consuming arguments. A workaround is to put the -b 1 option at the end of the command line.

Alexandre Neto

_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

--
http://www.spatialys.com
My software is free, but my time generally not.

_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to