Sha256: b09193bed17e3f492e81a4e343b91c7b57db8eca85a090aefe73c2c1589011aa

Contents?: true

Size: 766 Bytes

Versions: 8

Compression:

Stored size: 766 Bytes

Contents

# frozen_string_literal: true
module Geoblacklight
  class ShapefileDownload < Geoblacklight::Download
    SHAPEFILE_DOWNLOAD_PARAMS = { service: 'wfs',
                                  version: '2.0.0',
                                  request: 'GetFeature',
                                  srsName: 'EPSG:4326',
                                  outputformat: 'SHAPE-ZIP' }.freeze

    def initialize(document, options = {})
      request_params = SHAPEFILE_DOWNLOAD_PARAMS.merge(typeName: document[Settings.FIELDS.WXS_IDENTIFIER])
      super(document, {
        type: 'shapefile',
        extension: 'zip',
        request_params: request_params,
        content_type: 'application/zip',
        service_type: 'wfs'
      }.merge(options))
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
geoblacklight-4.0.0 lib/geoblacklight/download/shapefile_download.rb
geoblacklight-4.0.0.pre.rc3 lib/geoblacklight/download/shapefile_download.rb
geoblacklight-4.0.0.pre.rc2 lib/geoblacklight/download/shapefile_download.rb
geoblacklight-4.0.0.pre.rc1 lib/geoblacklight/download/shapefile_download.rb
geoblacklight-4.0.0.pre.alpha.3 lib/geoblacklight/download/shapefile_download.rb
geoblacklight-4.0.0.pre.alpha.2 lib/geoblacklight/download/shapefile_download.rb
geoblacklight-4.0.0.pre.alpha.1 lib/geoblacklight/download/shapefile_download.rb
geoblacklight-4.0.0.pre.alpha lib/geoblacklight/download/shapefile_download.rb