<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<pre>Hi list !
I need to merge three tif files, each one having a single Float32 band.
I want each file to use a separated band of the final tif.
I think the best way to do this is to use the VRT driver.
I would have liked to not use the C# binding or the native C++ library.
I would prefer to create a file on the disk using C# serialization.
I am so searching for the schema of the VRT format and I've found this quite old thread.
I saw the XSD in one of the messages of the topic. Is it correct ?
It is mentionned too that the XSD should be in the CVS/SVN in gdal/frmts/vrt but I've not found it, I assume the idea has been abandonned.
I am also interested in any other suggestion ! ^^
Thanks in advance.
Regards,
Benoit Andrieu
Antoine Hue wrote:
>>><i> There are still a few dark zones and area to improves:
</i>>>><i> - ComplexSource and AverageSource need a complete definition
</i>><i> Any information about these sources? They do not appear in the VRT tut
</i>><i> and I did not get there purpose/functioning.
</i>>>><i> - Better definition of the subClass property of the VRTRasterBand
</i>>>><i> needed.
</i>>><i>
</i>>><i> What did you need to know? It seems that values include
</i>>><i> "VRTWarpedDataset",
</i>>><i> "VRTDerivedRasterBand" and "VRTRawRasterBand".
</i>><i> OK, I will add this. What is the impact this parameter on the VRT
</i>><i> processing?
</i>
Antoine,
It determines what elements are legal on the VRTRasterBand and
internally it tells GDAL which particular class to instantiate.
This "subClass" attribute approach does not really lend itself to
describing the grammar with XML schema as far as I know.
>>><i> - An explicit definition of the raw raster source (to go with
</i>>>><i> SimpleSource, KernelFilteredSource,..) would improve homogeneity.
</i>>><i>
</i>>><i> I'm not sure what you mean. Isn't the ".vrt Descriptions for Raw Files"
</i>>><i> on the gdal_vrttut.html page appropriate?
</i> >
><i> For example, Simple source are described in the <SimpleSource> tag.
</i>><i> However, there is no <RawRasterSource> tag but a set of tags specific
</i>><i> to the raw raster band (<VRTRasterBand subClass="VRTRawRasterBand">)
</i>
That is correct, there is no RawRasterSource or equivelent. Raw, warped
and "derived" data can only be implemented as complete bands, not sources
on a sourced band.
><i> This actually appears in the schema:
</i>><i>
</i>><i> <!-- Raster Band -->
</i>><i> <xsd:complexType name="vrt_raster_band_t">
</i>><i> ....
</i>><i> <xsd:choice maxOccurs="unbounded">
</i>><i> <xsd:element name="SimpleSource" type="simple_source_t" />
</i>><i> <xsd:element name="KernelFilteredSource"
</i>><i> type="kernel_source_t" />
</i>><i> <xsd:element name="ComplexSource" /> <!-- Need refinement -->
</i>><i> <xsd:element name="AveragedSource" /> <!-- Need refinement -->
</i>><i> <xsd:sequence>
</i>><i> <!-- Raw source -->
</i>><i> <xsd:element name="SourceFilename"
</i>><i> type="source_file_name_t"/>
</i>><i> <xsd:element name="ImageOffset"
</i>><i> type="xsd:nonNegativeInteger" />
</i>><i> <xsd:element name="PixelOffset"
</i>><i> type="xsd:nonNegativeInteger" />
</i>><i> <xsd:element name="LineOffset"
</i>><i> type="xsd:nonNegativeInteger" />
</i>><i> <xsd:element name="ByteOrder" type="byte_order_t" />
</i>><i> </xsd:sequence>
</i>><i> </xsd:choice>...
</i>><i> </xsd:complexType>
</i>><i>
</i>><i> One more question about it, the extract above allows mixed type sources
</i>><i> within a raster band. Is this correct?
</i>
A "sourced" raster band (the default kind of VRTRasterBand) can have
a mixture of different sources.
>><i> Were you thinking of the .xsd file as being primarily useful for
</i>>><i> automated validation of .vrt files? As educational?
</i>><i> Why not both?
</i>><i> Schema is more extensive than the tutorial and more readable than C++.
</i>><i> It may also simplify C++ by checking validity of the VRT in place of the
</i>><i> C++.
</i>
As I mention, I think I have approached the .vrt files in a way that is
not conveniently expressed in XML Schema and I would contend that the
schema files are not all that readable as a description.
><i> Schema may also make it possible to version VRT grammar and enable
</i>><i> evolution of the format.
</i>
Well, keep in mind that the code is using a schema supporting parser
of any kind, so the .xsd files aren't systematically useful to GDAL
itself. As for versioning, I anticipate handling this in an adhoc
fashion, primarily by just extending the format rather than changing
existing items.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, <a
href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">warmerdam at pobox.com</a>
light and sound - activate the windows | <a
href="http://pobox.com/%7Ewarmerdam">http://pobox.com/~warmerdam</a>
and watch the world go round - Rush | President OSGF, <a
href="http://osgeo.org">http://osgeo.org</a>
</pre>
</body>
</html>