[gdal-dev] FW: Function - GDALCreatePansharpenedVRT

Even Rouault even.rouault at spatialys.com
Mon Oct 17 02:10:11 PDT 2016


Hi,
> 
>               I am trying to use  GDALCreatePansharpenedVRT  function
> however I am not been able to interpret the argument const char * pszXML
> 
> 
> 
>  Which is explained as  "Pansharpened VRT XML where <SpectralBand> elements
> have no explicit SourceFilename and SourceBand. The spectral bands in the
> XML will be assigned the successive values of the pahInputSpectralBands
> array. Must not be NULL."
> 
> 
> 
> Can someone please explain me, if this function merely converts the
> pansharpened VRT  XML to VRT dataset

Yes

> or does it actually pansharpens the
> image using multispectral and panchromatic inputs

No, you have to read the content of the VRT dataset with GDAL RasterIO() API 
or translate it to another format like GTiff with GDALCreateCopy() for example.

> . If the latter is true
> please let me know how to generate such an XML and what it should consist
> of.

See also
http://www.gdal.org/gdal_vrttut.html#gdal_vrttut_pansharpen

And also http://www.gdal.org/gdal_pansharpen.html if you don't need to embed 
that in your program but just run as an external program.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list