On jeudi 26 avril 2018 08:22:05 CEST William Kyngesburye wrote: > I'm trying to add a pixel function (Python) to a vrt where there are > multiple rasters (ComplexSource) tiled together (that is, not stacked like > an RGB image). When I translate the vrt to a tif, only the first > ComplexSource is processed, the rest on the raster is set to 0. > > I got the basics of the functin from the vrt docs, and it does work, for the > first raster tile. Maybe the python notation for calculating the numpy > array is wrong? > > The original vrt is created from gdalbuildvrt. This is the vrt thru the > first 2 rasters:
William, in a VRTDerivedRasterBand, the sources are considered to be a stack, and in_ar[0] will return the first source and in_ar[1] the seconded one. What you need to do is create a regular tiled VRT, and use that one has the single source of a VRTDerivedRasterBand Even -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
