[gdal-dev] python code inside of VRT results to empty values

Jachym Cepicky jachym.cepicky at gmail.com
Mon May 25 01:44:10 PDT 2020


Hi all,

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
approach? I've tested it on gdal 2.2 as well as 3.8, so I assume, I do
something wrong here. The minimal code looks like

import numpy as np
import copy
def blur(in_ar, out_ar, xoff, yoff, xsize, ysize, raster_xsize,
raster_ysize, buf_radius, gt, **kwargs):
    out_ar = copy.copy(in_ar[0])
    print(out_ar)
    return out_ar

Any hint?

Thank you

Jachym
-- 
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp


More information about the gdal-dev mailing list