[gdal-dev] python code inside of VRT results to empty values
even.rouault at spatialys.com
Mon May 25 02:11:08 PDT 2020
> I have some python code inside of VRT file, but I can not produce
> reasonable output with gdal_transalte. All the input data do look ok,
> even when I print() the values I would like to store, the data are
> displayed, but the resulting TIFF file is just empty, any hint how to
Can you show the full VRT ?
Can you also try with the below one.vrt
<VRTDataset rasterXSize="5" rasterYSize="5">
<VRTRasterBand dataType="Byte" band="1" subClass="VRTDerivedRasterBand">
def ones(in_ar, out_ar, xoff, yoff, xsize, ysize, raster_xsize, raster_ysize, r, gt, **kwargs):
and report the output of
gdal_translate one.vrt /vsistdout/ -of aaigrid --debug ON --config GDAL_VRT_ENABLE_PYTHON YES
on it ?
> I've tested it on gdal 2.2 as well as 3.8
Python 3.8 with GDAL 2.2 might be too recent. There was a fix recently for 3.8.0 on Windows (but you won't
have got to the point where any python code was executed if you hit that bug)
Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev