[gdal-dev] <MaskBand>...</MaskBand> Usage in vrt files.
ajuvolkov
ajuvolkov at mail.ru
Mon Apr 23 02:40:07 EDT 2012
Hello. I can't find any information about the using mask bands in virtual
datasets of Gdal (*.vrt files).
I wan't to mask region in my source dataset.
For example, I have the Earth map in Plate Carree projection. Map resolution
is 1000x500 pixels. I want to define a valid area inside the rectangle: x =
400, y = 200, width = 100, height = 50, and reproject all map to another
projection.
I found this article:
http://www.gdal.org/gdal_vrttut.html, that says that I should use the
<MaskBand> options.
I wrote a vrt file:
<VRTDataset rasterXSize="1000" rasterYSize="500">
<SRS>GEOGCS[...]</SRS>
<GeoTransform>...</GeoTransform>
<VRTRasterBand dataType="Byte" band="1">
...
</VRTRasterBand>
<VRTRasterBand dataType="Byte" band="2">
...
</VRTRasterBand>
<VRTRasterBand dataType="Byte" band="3">
...
</VRTRasterBand>
<MaskBand>
<VRTRasterBand dataType="Byte">
<SimpleSource>
<SourceFilename relativeToVRT="1">plate.png</SourceFilename>
<SourceBand>mask,1</SourceBand>
<SrcRect xOff="0" yOff="0" xSize="1000" ySize="500" />
<DstRect xOff="0" yOff="0" xSize="1000" ySize="500" />
</SimpleSource>
</VRTRasterBand>
</MaskBand>
</VRTDataset>
What does it mean?:
<SrcRect xOff="0" yOff="0" xSize="1000" ySize="500" />
<DstRect xOff="0" yOff="0" xSize="1000" ySize="500" />
What I should past to this parameters? If I write
<SrcRect xOff="400" yOff="200" xSize="100" ySize="50" />
I got unexpected results.
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/MaskBand-MaskBand-Usage-in-vrt-files-tp4909325p4909325.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list