[Gdal-dev] VRT format Schema
Antoine Hue
tonio_73 at tiscali.fr
Tue May 23 16:29:02 EDT 2006
Le 22 mai 06, à 21:10, Frank Warmerdam a écrit :
> Antoine Hue wrote:
>> Since I got no answer to my question about an available DTD or Schema
>> for the VRT format; and since I wanted to understand a bit more about
>> the VRT, I have created a schema for it based on the HTML doc and
>> based on code browsing.
>> Please find it attached as well as a picture generating from it by
>> oXygen.
>
Figure is available from
http://ip666.org/~antoine/pti/v/etudes/gdal_vrt.png.html?
g2_imageViewsIndex=1
(initially dropped by the Mailman)
>
>> There are still a few dark zones and area to improves:
>> - ComplexSource and AverageSource need a complete definition
Any information about these sources? They do not appear in the VRT tut
and I did not get there purpose/functioning.
>> - Better definition of the subClass property of the VRTRasterBand
>> needed.
>
> What did you need to know? It seems that values include
> "VRTWarpedDataset",
> "VRTDerivedRasterBand" and "VRTRawRasterBand".
OK, I will add this. What is the impact this parameter on the VRT
processing?
>
>> - An explicit definition of the raw raster source (to go with
>> SimpleSource, KernelFilteredSource,..) would improve homogeneity.
>
> I'm not sure what you mean. Isn't the ".vrt Descriptions for Raw Files"
> on the gdal_vrttut.html page appropriate?
For example, Simple source are described in the <SimpleSource> tag.
However, there is no <RawRasterSource> tag but a set of tags specific
to the raw raster band (<VRTRasterBand subClass="VRTRawRasterBand">)
This actually appears in the schema:
<!-- Raster Band -->
<xsd:complexType name="vrt_raster_band_t">
....
<xsd:choice maxOccurs="unbounded">
<xsd:element name="SimpleSource" type="simple_source_t" />
<xsd:element name="KernelFilteredSource" type="kernel_source_t" />
<xsd:element name="ComplexSource" /> <!-- Need refinement -->
<xsd:element name="AveragedSource" /> <!-- Need refinement -->
<xsd:sequence>
<!-- Raw source -->
<xsd:element name="SourceFilename" type="source_file_name_t"/>
<xsd:element name="ImageOffset" type="xsd:nonNegativeInteger" />
<xsd:element name="PixelOffset" type="xsd:nonNegativeInteger" />
<xsd:element name="LineOffset" type="xsd:nonNegativeInteger" />
<xsd:element name="ByteOrder" type="byte_order_t" />
</xsd:sequence>
</xsd:choice>...
</xsd:complexType>
One more question about it, the extract above allows mixed type sources
within a raster band. Is this correct?
>
> Were you thinking of the .xsd file as being primarily useful for
> automated validation of .vrt files? As educational?
Why not both?
Schema is more extensive than the tutorial and more readable than C++.
It may also simplify C++ by checking validity of the VRT in place of
the C++.
Schema may also make it possible to version VRT grammar and enable
evolution of the format.
Antoine
More information about the Gdal-dev
mailing list