coveragestores.rst 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. .. _rest_api_coveragestores:
  2. Coverage stores
  3. ===============
  4. A ``coverage store`` contains raster format spatial data.
  5. ``/workspaces/<ws>/coveragestores[.<format>]``
  6. ----------------------------------------------
  7. Controls all coverage stores in a given workspace.
  8. .. list-table::
  9. :header-rows: 1
  10. * - Method
  11. - Action
  12. - Status code
  13. - Formats
  14. - Default Format
  15. * - GET
  16. - List all coverage stores in workspace ``ws``
  17. - 200
  18. - HTML, XML, JSON
  19. - HTML
  20. * - POST
  21. - Create a new coverage store
  22. - 201 with ``Location`` header
  23. - XML, JSON
  24. -
  25. * - PUT
  26. -
  27. - 405
  28. -
  29. -
  30. * - DELETE
  31. -
  32. - 405
  33. -
  34. -
  35. ``/workspaces/<ws>/coveragestores/<cs>[.<format>]``
  36. ---------------------------------------------------
  37. Controls a particular coverage store in a given workspace.
  38. .. list-table::
  39. :header-rows: 1
  40. * - Method
  41. - Action
  42. - Status code
  43. - Formats
  44. - Default Format
  45. - Parameters
  46. * - GET
  47. - Return coverage store ``cs``
  48. - 200
  49. - HTML, XML, JSON
  50. - HTML
  51. - :ref:`quietOnNotFound <rest_api_coveragestores_quietOnNotFound>`
  52. * - POST
  53. -
  54. - 405
  55. -
  56. -
  57. -
  58. * - PUT
  59. - Modify coverage store ``cs``
  60. -
  61. -
  62. -
  63. -
  64. * - DELETE
  65. - Delete coverage store ``cs``
  66. -
  67. -
  68. -
  69. - :ref:`recurse <rest_api_coveragestores_recurse>`, :ref:`purge <rest_api_coveragestores_purge>`
  70. Exceptions
  71. ~~~~~~~~~~
  72. .. list-table::
  73. :header-rows: 1
  74. * - Exception
  75. - Status code
  76. * - GET for a coverage store that does not exist
  77. - 404
  78. * - PUT that changes name of coverage store
  79. - 403
  80. * - PUT that changes workspace of coverage store
  81. - 403
  82. * - DELETE against a coverage store that contains configured coverage
  83. - 403
  84. Parameters
  85. ~~~~~~~~~~
  86. .. _rest_api_coveragestores_recurse:
  87. ``recurse``
  88. ^^^^^^^^^^^
  89. The ``recurse`` parameter recursively deletes all layers referenced by the coverage store. Allowed values for this parameter are "true" or "false". The default value is "false".
  90. .. _rest_api_coveragestores_purge:
  91. ``purge``
  92. ^^^^^^^^^
  93. The ``purge`` parameter is used to customize the delete of files on disk (in case the underlying reader implements a delete method).
  94. It can take one of the three values:
  95. * ``none``-(*Default*) Do not delete any store's file from disk.
  96. * ``metadata``-Delete only auxiliary files and metadata. It's recommended when data files (such as granules) should not be deleted from disk.
  97. * ``all``-Purge everything related to that store (metadata and granules).
  98. .. _rest_api_coveragestores_quietOnNotFound:
  99. ``quietOnNotFound``
  100. ^^^^^^^^^^^^^^^^^^^^
  101. The ``quietOnNotFound`` parameter avoids to log an Exception when the coverage store is not present. Note that 404 status code will be returned anyway.
  102. ``/workspaces/<ws>/coveragestores/<cs>/file[.<extension>]``
  103. -----------------------------------------------------------
  104. This end point allows a file containing spatial data to be added (via a POST or PUT) into an existing coverage store, or will create a new coverage store if it doesn't already exist. In case of coverage stores containing multiple coverages (e.g., mosaic of NetCDF files) all the coverages will be configured unless ``configure=false`` is specified as a parameter.
  105. .. list-table::
  106. :header-rows: 1
  107. * - Method
  108. - Action
  109. - Status code
  110. - Formats
  111. - Default Format
  112. - Parameters
  113. * - GET
  114. - *Deprecated*. Get the underlying files for the coverage store as a zip file with MIME type ``application/zip``.
  115. - 200
  116. -
  117. -
  118. -
  119. * - POST
  120. - If the coverage store is a simple one (e.g. GeoTiff) it will return a 405, if the coverage store is a structured one (e.g., mosaic) it will harvest the specified files into it, which in turn will integrate the files into the store. Harvest meaning is store dependent, for mosaic the new files will be added as new granules of the mosaic, and existing files will get their attribute updated, other stores might have a different behavior.
  121. - 405 if the coverage store is a simple one, 200 if structured and the harvest operation succeeded
  122. -
  123. -
  124. - :ref:`recalculate <rest_api_coveragestores_recalculate>`, :ref:`filename <rest_api_coveragestores_filename>`
  125. * - PUT
  126. - Creates or overwrites the files for coverage store ``cs``
  127. - 200
  128. - :ref:`See note below <rest_api_coveragestores_file_put>`
  129. -
  130. - :ref:`configure <rest_api_coveragestores_configure>`, :ref:`coverageName <rest_api_coveragestores_coveragename>`
  131. * - DELETE
  132. -
  133. - 405
  134. -
  135. -
  136. -
  137. .. _rest_api_coveragestores_file_put:
  138. coveragestores file PUT
  139. ~~~~~~~~~~~~~~~~~~~~~~~
  140. A file can be PUT to a coverage store as a standalone or zipped archive file. Standalone files are only suitable for coverage stores that work with a single file such as GeoTIFF store. Coverage stores that work with multiple files, such as the ImageMosaic store, must be sent as a zip archive.
  141. When uploading a standalone file, set the ``Content-type`` appropriately based on the file type. If you are loading a zip archive, set the ``Content-type`` to ``application/zip``.
  142. Exceptions
  143. ~~~~~~~~~~
  144. .. list-table::
  145. :header-rows: 1
  146. * - Exception
  147. - Status code
  148. * - GET for a data store that does not exist
  149. - 404
  150. * - GET for a data store that is not file based
  151. - 404
  152. Parameters
  153. ~~~~~~~~~~
  154. ``extension``
  155. ^^^^^^^^^^^^^
  156. The ``extension`` parameter specifies the type of coverage store. The
  157. following extensions are supported:
  158. .. list-table::
  159. :header-rows: 1
  160. * - Extension
  161. - Coverage store
  162. * - geotiff
  163. - GeoTIFF
  164. * - worldimage
  165. - Georeferenced image (JPEG, PNG, TIFF)
  166. * - imagemosaic
  167. - Image mosaic
  168. .. _rest_api_coveragestores_configure:
  169. ``configure``
  170. ^^^^^^^^^^^^^
  171. The ``configure`` parameter controls how the coverage store is configured upon file upload. It can take one of the three values:
  172. * ``first``—(*Default*) Only setup the first feature type available in the coverage store.
  173. * ``none``—Do not configure any feature types.
  174. * ``all``—Configure all feature types.
  175. .. _rest_api_coveragestores_coveragename:
  176. ``coverageName``
  177. ^^^^^^^^^^^^^^^^
  178. The ``coverageName`` parameter specifies the name of the coverage within the coverage store. This parameter is only relevant if the ``configure`` parameter is not equal to "none". If not specified the resulting coverage will receive the same name as its containing coverage store.
  179. .. note:: At present a one-to-one relationship exists between a coverage store and a coverage. However, there are plans to support multidimensional coverages, so this parameter may change.
  180. .. _rest_api_coveragestores_recalculate:
  181. ``recalculate``
  182. ^^^^^^^^^^^^^^^
  183. The ``recalculate`` parameter specifies whether to recalculate any bounding boxes for a coverage. Some properties of coverages are automatically recalculated when necessary. In particular, the native bounding box is recalculated when the projection or projection policy is changed. The lat/long bounding box is recalculated when the native bounding box is recalculated or when a new native bounding box is explicitly provided in the request. (The native and lat/long bounding boxes are not automatically recalculated when they are explicitly included in the request.) In addition, the client may explicitly request a fixed set of fields to calculate by including a comma-separated list of their names in the ``recalculate`` parameter. For example:
  184. * ``recalculate=`` (empty parameter)—Do not calculate any fields, regardless of the projection, projection policy, etc. This might be useful to avoid slow recalculation when operating against large datasets.
  185. * ``recalculate=nativebbox``—Recalculate the native bounding box, but do not recalculate the lat/long bounding box.
  186. * ``recalculate=nativebbox,latlonbbox``—Recalculate both the native bounding box and the lat/long bounding box.
  187. .. _rest_api_coveragestores_filename:
  188. ``filename``
  189. ^^^^^^^^^^^^^^^
  190. The ``filename`` parameter specifies the target file name for a file that needs to harvested as part of a mosaic. This is important to avoid clashes and to make sure the
  191. right dimension values are available in the name for multidimensional mosaics to work.
  192. * ``filename=`NCOM_wattemp_000_20081102T0000000_12.tiff` Set the uploaded file name to ``NCOM_wattemp_000_20081102T0000000_12.tiff``