coverages.rst 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. .. _rest_api_coverages:
  2. Coverages
  3. =========
  4. A ``coverage`` is a raster data set which originates from a coverage store.
  5. .. todo:: JC: "The second level headings [don't] work so well for the longer paths - maybe another heading format?"
  6. ``/workspaces/<ws>/coveragestores/<cs>/coverages[.<format>]``
  7. -------------------------------------------------------------
  8. Controls all coverages in a given coverage store and workspace.
  9. .. list-table::
  10. :header-rows: 1
  11. * - Method
  12. - Action
  13. - Status code
  14. - Formats
  15. - Default Format
  16. * - GET
  17. - List all coverages in coverage store ``cs``
  18. - 200
  19. - HTML, XML, JSON
  20. - HTML
  21. * - POST
  22. - Create a new coverage
  23. - 201 with ``Location`` header
  24. - XML, JSON
  25. -
  26. * - PUT
  27. -
  28. - 405
  29. -
  30. -
  31. * - DELETE
  32. -
  33. - 405
  34. -
  35. -
  36. ``/workspaces/<ws>/coveragestores/<cs>/coverages/<c>[.<format>]``
  37. -----------------------------------------------------------------
  38. Controls a particular coverage in a given coverage store and workspace.
  39. .. list-table::
  40. :header-rows: 1
  41. * - Method
  42. - Action
  43. - Status code
  44. - Formats
  45. - Default Format
  46. - Parameters
  47. * - GET
  48. - Return coverage ``c``
  49. - 200
  50. - HTML, XML, JSON
  51. - HTML
  52. - :ref:`quietOnNotFound <rest_api_coverages_quietOnNotFound>`
  53. * - POST
  54. -
  55. - 405
  56. -
  57. -
  58. -
  59. * - PUT
  60. - Modify coverage ``c``
  61. - 200
  62. - XML,JSON
  63. -
  64. -
  65. * - DELETE
  66. - Delete coverage ``c``
  67. - 200
  68. -
  69. -
  70. - :ref:`recurse <rest_api_coverages_recurse>`
  71. Exceptions
  72. ~~~~~~~~~~
  73. .. list-table::
  74. :header-rows: 1
  75. * - Exception
  76. - Status code
  77. * - GET for a coverage that does not exist
  78. - 404
  79. * - PUT that changes name of coverage
  80. - 403
  81. * - PUT that changes coverage store of coverage
  82. - 403
  83. Parameters
  84. ~~~~~~~~~~
  85. .. _rest_api_coverages_recurse:
  86. ``recurse``
  87. ^^^^^^^^^^^
  88. The ``recurse`` parameter recursively deletes all layers referenced by the specified coverage. Permitted values for this parameter are "true" or "false". The default value is "false".
  89. .. _rest_api_coverages_quietOnNotFound:
  90. ``quietOnNotFound``
  91. ^^^^^^^^^^^^^^^^^^^^
  92. The ``quietOnNotFound`` parameter avoids to log an Exception when the coverage is not present. Note that 404 status code will be returned anyway.
  93. Structured coverages
  94. ====================
  95. Structured coverages are the ones whose content is made of granules, normally associated to attributes, often used to represent time, elevation and other custom dimensions attached to the granules themselves. Image mosaic is an example of a writable structured coverage reader, in which each of the mosaic granules is associated with attributes. NetCDF is an example of a read only one, in which the multidimensional grid contained in the file is exposed as a set of 2D slices, each associated with a different set of variable values.
  96. The following API applies exclusively to structured coverage readers.
  97. ``/workspaces/<ws>/coveragestores/<cs>/coverages/<coverage>/index[.<format>]``
  98. ------------------------------------------------------------------------------
  99. Declares the set of attributes associated to the specified coverage, their name, type and min/max occurrences.
  100. .. list-table::
  101. :header-rows: 1
  102. * - Method
  103. - Action
  104. - Status code
  105. - Formats
  106. - Default Format
  107. - Parameters
  108. * - GET
  109. - Returns the attributes, their names and their types
  110. - 200
  111. - XML, JSON
  112. - XML
  113. -
  114. * - POST
  115. -
  116. - 405
  117. -
  118. -
  119. -
  120. * - PUT
  121. -
  122. - 405
  123. -
  124. -
  125. -
  126. * - DELETE
  127. -
  128. - 405
  129. -
  130. -
  131. -
  132. ``/workspaces/<ws>/coveragestores/<cs>/coverages/<coverage>/index/granules.<format>``
  133. -------------------------------------------------------------------------------------
  134. Returns the full list of granules, each with its attributes vales and geometry, and allows to selectively remove them
  135. .. list-table::
  136. :header-rows: 1
  137. * - Method
  138. - Action
  139. - Status code
  140. - Formats
  141. - Default Format
  142. - Parameters
  143. * - GET
  144. - Returns the list of granules and their attributes, either in GML (when XML is used) or GeoJSON (when JSON is used)
  145. - 200
  146. - XML, JSON
  147. - XML
  148. - :ref:`offset <rest_api_coverages_offset>`, :ref:`limit <rest_api_coverages_limit>`, :ref:`filter <rest_api_coverages_filter>`
  149. * - POST
  150. -
  151. - 405
  152. -
  153. -
  154. -
  155. * - PUT
  156. -
  157. - 405
  158. -
  159. -
  160. -
  161. * - DELETE
  162. - Deletes the granules (all, or just the ones selected via the filter parameter)
  163. - 200
  164. -
  165. -
  166. - :ref:`filter <rest_api_coverages_filter>`
  167. Parameters
  168. ~~~~~~~~~~
  169. .. _rest_api_coverages_offset:
  170. ``offset``
  171. ^^^^^^^^^^^
  172. The ``offset`` parameter instructs GeoServer to skip the specified number of first granules when returning the data.
  173. .. _rest_api_coverages_limit:
  174. ``limit``
  175. ^^^^^^^^^^^
  176. The ``limit`` parameter instructs GeoServer to return at most the specified number of granules when returning the data.
  177. .. _rest_api_coverages_filter:
  178. ``filter``
  179. ^^^^^^^^^^^
  180. The ``filter`` parameter is a CQL filter that allows to select which granules will be returned based on their attribute values.
  181. ``/workspaces/<ws>/coveragestores/<cs>/coverages/<mosaic>/index/granules/<granuleId>.<format>``
  182. -----------------------------------------------------------------------------------------------
  183. Returns a single granule and allows for its removal.
  184. .. list-table::
  185. :header-rows: 1
  186. * - Method
  187. - Action
  188. - Status code
  189. - Formats
  190. - Default Format
  191. - Parameters
  192. * - GET
  193. - Returns the specified of granules and its attributes, either in GML (when XML is used) or GeoJSON (when JSON is used)
  194. - 200
  195. - XML, JSON
  196. - XML
  197. - :ref:`quietOnNotFound <rest_api_structuredcoverages_quietOnNotFound>`
  198. * - POST
  199. -
  200. - 405
  201. -
  202. -
  203. -
  204. * - PUT
  205. -
  206. - 405
  207. -
  208. -
  209. -
  210. * - DELETE
  211. - Deletes the granule
  212. - 200
  213. -
  214. -
  215. -
  216. Exceptions
  217. ~~~~~~~~~~
  218. .. list-table::
  219. :header-rows: 1
  220. * - Exception
  221. - Status code
  222. * - GET for a granule that does not exist
  223. - 404
  224. Parameters
  225. ~~~~~~~~~~
  226. .. _rest_api_structuredcoverages_quietOnNotFound:
  227. ``quietOnNotFound``
  228. ^^^^^^^^^^^^^^^^^^^^
  229. The ``quietOnNotFound`` parameter avoids to log an Exception when the granule is not present. Note that 404 status code will be returned anyway.