3 /******************************************************************************
6 * Project: netCDF driver
7 * Purpose: Schema of netCDF writer configuration files
8 * Author: Even Rouault, <even dot rouault at spatialys dot com>
10 **********************************************************************
11 * Copyright (c) 2016, Even Rouault <even dot rouault at spatialys dot com>
13 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the "Software"),
15 * to deal in the Software without restriction, including without limitation
16 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 * and/or sell copies of the Software, and to permit persons to whom the
18 * Software is furnished to do so, subject to the following conditions:
20 * The above copyright notice and this permission notice shall be included
21 * in all copies or substantial portions of the Software.
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 * DEALINGS IN THE SOFTWARE.
30 ****************************************************************************/
32 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
33 <xs:element name="Configuration">
36 <xs:element name="DatasetCreationOption" type="optionType" minOccurs="0" maxOccurs="unbounded"/>
37 <xs:element name="LayerCreationOption" type="optionType" minOccurs="0" maxOccurs="unbounded">
38 <xs:annotation><xs:documentation>
39 Define a layer creation option that applies to all layers.
40 </xs:documentation></xs:annotation>
42 <xs:element name="Attribute" type="attributeType" minOccurs="0" maxOccurs="unbounded">
43 <xs:annotation><xs:documentation>
44 Define a global attribute that must be written (or removed) and applies to all layers.
45 </xs:documentation></xs:annotation>
47 <xs:element name="Field" type="fieldType" minOccurs="0" maxOccurs="unbounded">
48 <xs:annotation><xs:documentation>
49 Define the characteristics of an OGR field / netCDF variable that applies to all layers (that actually uses it)
50 </xs:documentation></xs:annotation>
52 <xs:element name="Layer" type="layerType" minOccurs="0" maxOccurs="unbounded">
53 <xs:annotation><xs:documentation>
54 Define layer specific settings for layer creaetion options, fields and attributes.
55 </xs:documentation></xs:annotation>
61 <xs:complexType name="optionType">
62 <xs:attribute name="name" type="xs:string"/>
63 <xs:attribute name="value" type="xs:string"/>
66 <xs:complexType name="attributeType">
67 <xs:attribute name="name" type="xs:string"/>
68 <xs:attribute name="value" type="xs:string">
69 <xs:annotation><xs:documentation>
70 Value to set as attribute, or empty string
71 to delete an existing attribute
72 </xs:documentation></xs:annotation>
74 <xs:attribute name="type" use="optional">
76 <xs:restriction base="xs:string">
77 <xs:enumeration value="string"/>
78 <xs:enumeration value="integer"/>
79 <xs:enumeration value="double"/>
85 <xs:complexType name="fieldType">
87 <xs:element name="Attribute" type="attributeType" minOccurs="0" maxOccurs="unbounded">
88 <xs:annotation><xs:documentation>
89 Define an attribute that must be written (or removed) from a OGR field / netCDF variable.
90 </xs:documentation></xs:annotation>
93 <xs:attribute name="name" type="xs:string" use="optional">
94 <xs:annotation><xs:documentation>OGR field name.</xs:documentation></xs:annotation>
96 <xs:attribute name="netcdf_name" type="xs:string" use="optional">
97 <xs:annotation><xs:documentation>netCDF variable name. When both name
98 and netcdf_name are set, the OGR field {name} will be written as the
99 netCDF {netcdf_name} variable. When netcdf_name is set, but name is none,
100 then the Field definition will match an implictly created netCDF variable,
101 such as x/lon, y/lat, z, ...
102 </xs:documentation></xs:annotation>
104 <xs:attribute name="main_dim" type="xs:string" use="optional">
105 <xs:annotation><xs:documentation>
106 Name of the main dimension against which the variable must be indexed.
107 If not set, the record dimension will be used. Only useful when using
108 a layer with FeatureType!=Point.
109 </xs:documentation></xs:annotation>
113 <xs:complexType name="layerType">
115 <xs:element name="LayerCreationOption" type="optionType" minOccurs="0" maxOccurs="unbounded">
116 <xs:annotation><xs:documentation>
117 Define a layer creation option. Overrides or appended to
118 existing global layer creation options.
119 </xs:documentation></xs:annotation>
121 <xs:element name="Attribute" type="attributeType" minOccurs="0" maxOccurs="unbounded">
122 <xs:annotation><xs:documentation>
123 Define a global attribute that must be written (or removed).
124 Overrides or appended to existing global attributes.
125 </xs:documentation></xs:annotation>
127 <xs:element name="Field" type="fieldType" minOccurs="0" maxOccurs="unbounded">
128 <xs:annotation><xs:documentation>
129 Define the characteristics of an OGR field / netCDF variable
130 (that must exist as an explicit OGR field, or an implicitly created netCDF variable).
131 Supersedes global Field definition.
132 </xs:documentation></xs:annotation>
135 <xs:attribute name="name" type="xs:string">
136 <xs:annotation><xs:documentation>OGR layer name.</xs:documentation></xs:annotation>
138 <xs:attribute name="netcdf_name" type="xs:string" use="optional">
139 <xs:annotation><xs:documentation>netCDF group name.</xs:documentation></xs:annotation>