Re: [gdal-dev] gdal_edit.py question

2024-09-12 Thread Scott via gdal-dev
Thanks Even! The NETCDF file(s) I'm working with have hundreds of sub data sets. Initially, I was breaking out all of them to .vrt's as you suggested, but it got a bit messy. Counting the sub-datasets with gdalinfo iteratively then using gdal_create -bands N was a lot cleaner. Passing dozens

Re: [gdal-dev] gdal_edit.py question

2024-09-12 Thread Even Rouault via gdal-dev
Scott, # add another tif to band 2 and add meta data for it: gdalwarp -q -srcband 1 -dstband 2 -t_srs EPSG:4326 src2.tif result.tif BAND1 is lost at that stage. gdalwarp must override the metadata of the output dataset with the one of src2.tif. Presumably it should instead merge them, using

[gdal-dev] gdal_edit.py question

2024-09-12 Thread Scott via gdal-dev
Greetings, I need some help with gdal_edit. If I add meta data each time I add a band to a raster, only the last meta edit is present. Here's the scenario GDAL 3.9.1, gdal_edit.py is 3.6.2, Debian 12: # create empty 2-band raster with existing prototype: gdal_create -if src1.tif -bands 2 resu