Class: GeotiffDownload

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

Constant Summary collapse

GEOTIFF_DOWNLOAD_PARAMS =
{
  format: 'image/geotiff',
  width: 4096
}

Instance Method Summary collapse

Methods inherited from Download

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

Constructor Details

#initialize(document) ⇒ GeotiffDownload

Returns a new instance of GeotiffDownload.


7
8
9
10
11
12
13
14
15
16
17
# File 'lib/geoblacklight/download/geotiff_download.rb', line 7

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