Class: Geoblacklight::GeotiffDownload

Inherits:
Download
  • Object
show all
Defined in:
lib/geoblacklight/download/geotiff_download.rb

Constant Summary collapse

GEOTIFF_DOWNLOAD_PARAMS =
{
  format: "image/geotiff",
  width: 4096
}.freeze

Instance Method Summary collapse

Methods inherited from Download

#create_download_file, #download_exists?, #downloadable?, #file_name, file_path, #file_path_and_name, #get, #initiate_download, #url_with_params

Constructor Details

#initialize(document, options = {}) ⇒ GeotiffDownload

Returns a new instance of GeotiffDownload.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/geoblacklight/download/geotiff_download.rb', line 10

def initialize(document, options = {})
  request_params = GEOTIFF_DOWNLOAD_PARAMS.merge(layers: document[Settings.FIELDS.WXS_IDENTIFIER])
  super(document, {
    type: "geotiff",
    extension: "tif",
    request_params: request_params,
    content_type: "image/geotiff",
    service_type: "wms",
    reflect: true
  }.merge(options))
end