netcdf_config.xsd 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <?xml version="1.0"?>
  2. <!--
  3. /******************************************************************************
  4. * $Id$
  5. *
  6. * Project: netCDF driver
  7. * Purpose: Schema of netCDF writer configuration files
  8. * Author: Even Rouault, <even dot rouault at spatialys dot com>
  9. *
  10. **********************************************************************
  11. * Copyright (c) 2016, Even Rouault <even dot rouault at spatialys dot com>
  12. *
  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:
  19. *
  20. * The above copyright notice and this permission notice shall be included
  21. * in all copies or substantial portions of the Software.
  22. *
  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. ****************************************************************************/
  31. -->
  32. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  33. <xs:element name="Configuration">
  34. <xs:complexType>
  35. <xs:sequence>
  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>
  41. </xs:element>
  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>
  46. </xs:element>
  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>
  51. </xs:element>
  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>
  56. </xs:element>
  57. </xs:sequence>
  58. </xs:complexType>
  59. </xs:element>
  60. <xs:complexType name="optionType">
  61. <xs:attribute name="name" type="xs:string"/>
  62. <xs:attribute name="value" type="xs:string"/>
  63. </xs:complexType>
  64. <xs:complexType name="attributeType">
  65. <xs:attribute name="name" type="xs:string"/>
  66. <xs:attribute name="value" type="xs:string">
  67. <xs:annotation><xs:documentation>
  68. Value to set as attribute, or empty string
  69. to delete an existing attribute
  70. </xs:documentation></xs:annotation>
  71. </xs:attribute>
  72. <xs:attribute name="type" use="optional">
  73. <xs:simpleType>
  74. <xs:restriction base="xs:string">
  75. <xs:enumeration value="string"/>
  76. <xs:enumeration value="integer"/>
  77. <xs:enumeration value="double"/>
  78. </xs:restriction>
  79. </xs:simpleType>
  80. </xs:attribute>
  81. </xs:complexType>
  82. <xs:complexType name="fieldType">
  83. <xs:sequence>
  84. <xs:element name="Attribute" type="attributeType" minOccurs="0" maxOccurs="unbounded">
  85. <xs:annotation><xs:documentation>
  86. Define an attribute that must be written (or removed) from a OGR field / netCDF variable.
  87. </xs:documentation></xs:annotation>
  88. </xs:element>
  89. </xs:sequence>
  90. <xs:attribute name="name" type="xs:string" use="optional">
  91. <xs:annotation><xs:documentation>OGR field name.</xs:documentation></xs:annotation>
  92. </xs:attribute>
  93. <xs:attribute name="netcdf_name" type="xs:string" use="optional">
  94. <xs:annotation><xs:documentation>netCDF variable name. When both name
  95. and netcdf_name are set, the OGR field {name} will be written as the
  96. netCDF {netcdf_name} variable. When netcdf_name is set, but name is none,
  97. then the Field definition will match an implictly created netCDF variable,
  98. such as x/lon, y/lat, z, ...
  99. </xs:documentation></xs:annotation>
  100. </xs:attribute>
  101. <xs:attribute name="main_dim" type="xs:string" use="optional">
  102. <xs:annotation><xs:documentation>
  103. Name of the main dimension against which the variable must be indexed.
  104. If not set, the record dimension will be used. Only useful when using
  105. a layer with FeatureType!=Point.
  106. </xs:documentation></xs:annotation>
  107. </xs:attribute>
  108. </xs:complexType>
  109. <xs:complexType name="layerType">
  110. <xs:sequence>
  111. <xs:element name="LayerCreationOption" type="optionType" minOccurs="0" maxOccurs="unbounded">
  112. <xs:annotation><xs:documentation>
  113. Define a layer creation option. Overrides or appended to
  114. existing global layer creation options.
  115. </xs:documentation></xs:annotation>
  116. </xs:element>
  117. <xs:element name="Attribute" type="attributeType" minOccurs="0" maxOccurs="unbounded">
  118. <xs:annotation><xs:documentation>
  119. Define a global attribute that must be written (or removed).
  120. Overrides or appended to existing global attributes.
  121. </xs:documentation></xs:annotation>
  122. </xs:element>
  123. <xs:element name="Field" type="fieldType" minOccurs="0" maxOccurs="unbounded">
  124. <xs:annotation><xs:documentation>
  125. Define the characteristics of an OGR field / netCDF variable
  126. (that must exist as an explicit OGR field, or an implicitly created netCDF variable).
  127. Supersedes global Field definition.
  128. </xs:documentation></xs:annotation>
  129. </xs:element>
  130. </xs:sequence>
  131. <xs:attribute name="name" type="xs:string">
  132. <xs:annotation><xs:documentation>OGR layer name.</xs:documentation></xs:annotation>
  133. </xs:attribute>
  134. <xs:attribute name="netcdf_name" type="xs:string" use="optional">
  135. <xs:annotation><xs:documentation>netCDF group name.</xs:documentation></xs:annotation>
  136. </xs:attribute>
  137. </xs:complexType>
  138. </xs:schema>