directdownload.rst 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. .. _csw_directdownload:
  2. DirectDownload
  3. ==============
  4. DirectDownload is a new operation (since GeoServer 2.9.x) supported by the CSW service.
  5. In the Meteorology, Oceanography and Earth Observation domains, layers are usually based on complex
  6. NetCDF/GRIB files. Protocols such as WCS are set up to allow slice, rescale and reprojection of
  7. data, but not to preserve the original data as is.
  8. This new operation allows direct download of the raw data for that layer.
  9. If the DirectDownload capability is enabled for a Coverage layer, the CSW record will be updated to
  10. contain links pointing back to the CSW service, using the DirectDownload vendor operation that will
  11. assemble the files for the requested resource, zip them, and send the result back to the requester.
  12. The download links (one for each data file composing the layer plus a link to get all the files
  13. composing the layer) are added as new entries in CSW records:
  14. * as additional **term-references** element for a Dublin Core schema
  15. * as additional **OnlineResource** for ISO Metadata
  16. Those links also contain the validity domain for the file such as envelope/time/elevation/custom
  17. dimensions (when present) for multidimensional layers.
  18. Configuration
  19. -------------
  20. DirectDownload capability can be activated as default for all layers, as global CSW configuration.
  21. Go into the CSW service panel and click on the *enable DirectDownload* checkbox if you want it enabled for all layers:
  22. .. figure:: images/serviceConfig.png
  23. :align: center
  24. *DirectDownload configuration (Service level)*
  25. From this section you can also set a download size limit value (0 means no limit). The specified
  26. value represents the maximum size (in kilobytes) of the sum of the sizes of the raw data referred
  27. to by a single download link. (You can think about the case of a download link referring to the
  28. whole layer data which may contain a wide set of files).
  29. Note that the size check is performed on the raw data files prior to any compression.
  30. Per Layer configuration
  31. -----------------------
  32. DirectDownload capability can also be enabled/disabled for a specific layer, which will override the
  33. global CSW configuration.
  34. Go to the *publishing* tab of the layer.
  35. .. figure:: images/layerConfig.png
  36. :align: center
  37. *Layer publishing section*
  38. Look for the *DirectDownload settings* section.
  39. .. figure:: images/layerConfig2.png
  40. :align: center
  41. *DirectDownload configuration (Layer level)*
  42. The configuration of this parameter follows the same rules as shown for the CSW configuration panel.
  43. GetRecords example
  44. ^^^^^^^^^^^^^^^^^^
  45. A GetRecords response containing a layer with DirectDownload enabled, may result having a piece
  46. like this (using :ref:`ISO Metadata output schema<csw_iso>`)::
  47. ...
  48. <gmd:CI_OnlineResource>
  49. <gmd:linkage>
  50. <gmd:URL>
  51. http://localhost:8080/geoserver/ows?service=CSW&version=2.0.2&request=DirectDownload&resourceId=geosolutions:Reflectivity_height_above_ground&file=82643c5bf682f67ef8b7de737b90ada759965cd8-samplefile.grib2&ENVELOPE=-2699073.2421875,-1588806.0302734375,2697926.7578125,1588193.9697265625&TIME=2015-06-23T00:00:00.000Z/2015-06-23T00:00:00.000Z&HEIGHT_ABOVE_GROUND=1000.0/4000.0
  52. </gmd:URL>
  53. </gmd:linkage>
  54. </gmd:CI_OnlineResource>
  55. ...
  56. That URL allows the direct download of the indicated file. Note that the filename has a SHA-1 header
  57. to avoid publishing the underlying file system structure paths.