Hy all, I have a VRT file generated with buildvrt utility :
<VRTDataset rasterXSize="52436" rasterYSize="32400"> > <SRS>...</SRS> > <GeoTransform>...</GeoTransform> > <VRTRasterBand dataType="UInt16" band="1"> > <NoDataValue>0</NoDataValue> > <ColorInterp>Gray</ColorInterp> > <ComplexSource> > <SourceFilename relativeToVRT="1">1.tif</SourceFilename> > <SourceBand>1</SourceBand> > <SourceProperties RasterXSize="8449" RasterYSize="6429" > DataType="UInt16" BlockXSize="8449" BlockYSize="1" /> > <SrcRect xOff="0" yOff="0" xSize="8449" ySize="6429" /> > <DstRect xOff="0" yOff="0" xSize="10721" ySize="8158" /> > <NODATA>0</NODATA> > </ComplexSource> > <ComplexSource> > <SourceFilename relativeToVRT="1">2.tif</SourceFilename> > <SourceBand>1</SourceBand> > <SourceProperties RasterXSize="8772" RasterYSize="6407" > DataType="UInt16" BlockXSize="8772" BlockYSize="1" /> > <SrcRect xOff="0" yOff="0" xSize="8772" ySize="6407" /> > <DstRect xOff="43664" yOff="25993" xSize="8772" ySize="6407" /> > <NODATA>0</NODATA> > </ComplexSource> > </VRTRasterBand> > </VRTDataset> > It's work fine with a gdal_translate. Now I want to apply a filter kernel to the VRT. I have to use the KernelFilteredSource. The gdal api say that VRTKernelFilteredSource is a sub-class of VRTComplexSource. So a VRTKernelFilteredSource *is *a VRTComplexSource. But if I replace VRTComplexSource by VRTKernelFilteredSource, gdal_translate crash. This is the new VRT : <VRTDataset rasterXSize="52436" rasterYSize="32400"> > <SRS>...</SRS> > <GeoTransform>...</GeoTransform> > <VRTRasterBand dataType="UInt16" band="1"> > <NoDataValue>0</NoDataValue> > <ColorInterp>Gray</ColorInterp> > <KernelFilteredSource> > <SourceFilename relativeToVRT="1">1.tif</SourceFilename> > <SourceBand>1</SourceBand> > <SourceProperties RasterXSize="8449" RasterYSize="6429" > DataType="UInt16" BlockXSize="8449" BlockYSize="1" /> > <SrcRect xOff="0" yOff="0" xSize="8449" ySize="6429" /> > <DstRect xOff="0" yOff="0" xSize="10721" ySize="8158" /> > <NODATA>0</NODATA> > </KernelFilteredSource> > <KernelFilteredSource> > <SourceFilename relativeToVRT="1">2.tif</SourceFilename> > <SourceBand>1</SourceBand> > <SourceProperties RasterXSize="8772" RasterYSize="6407" > DataType="UInt16" BlockXSize="8772" BlockYSize="1" /> > <SrcRect xOff="0" yOff="0" xSize="8772" ySize="6407" /> > <DstRect xOff="43664" yOff="25993" xSize="8772" ySize="6407" /> > <NODATA>0</NODATA> > </KernelFilteredSource> > </VRTRasterBand> > </VRTDataset> > It's weird, I expected a polymorphism between VRTComplexSource and VRTKernelFilteredSource. So the question : how can I apply a filter to a VRT? Thank you !
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
