Sha256: c8c3a2f6505c78fb2b171098b886280503b2efe7b7fd746be8f979addd6a0369

Contents?: true

Size: 886 Bytes

Versions: 17

Compression:

Stored size: 886 Bytes

Contents

module GeoConcerns
  module Processors
    module Raster
      class Processor < Hydra::Derivatives::Processors::Processor
        def process
          raster_processor_class.new(source_path,
                                     directives,
                                     output_file_service: output_file_service).process
        end

        # Returns a raster processor class based on mime type passed in the directives object.
        # @return raster processing class
        def raster_processor_class
          case directives.fetch(:input_format)
          when 'text/plain; gdal-format=USGSDEM'
            GeoConcerns::Processors::Raster::Dem
          when 'application/octet-stream; gdal-format=AIG'
            GeoConcerns::Processors::Raster::Aig
          else
            GeoConcerns::Processors::Raster::Base
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
geo_concerns-0.3.4 app/processors/geo_concerns/processors/raster.rb
geo_concerns-0.3.3 app/processors/geo_concerns/processors/raster.rb
geo_concerns-0.3.2 app/processors/geo_concerns/processors/raster.rb
geo_concerns-0.3.1 app/processors/geo_concerns/processors/raster.rb
geo_concerns-0.3.0 app/processors/geo_concerns/processors/raster.rb
geo_concerns-0.2.0 app/processors/geo_concerns/processors/raster.rb
geo_concerns-0.1.1 app/processors/geo_concerns/processors/raster.rb
geo_concerns-0.1.0 app/processors/geo_concerns/processors/raster.rb
geo_concerns-0.0.10 app/processors/geo_concerns/processors/raster/processor.rb
geo_concerns-0.0.9 app/processors/geo_concerns/processors/raster/processor.rb
geo_concerns-0.0.8 app/processors/geo_concerns/processors/raster/processor.rb
geo_concerns-0.0.7 app/processors/geo_concerns/processors/raster/processor.rb
geo_concerns-0.0.6 app/processors/geo_concerns/processors/raster/processor.rb
geo_concerns-0.0.5 app/processors/geo_concerns/processors/raster/processor.rb
geo_concerns-0.0.4 app/processors/geo_concerns/processors/raster/processor.rb
geo_concerns-0.0.3 app/processors/geo_concerns/processors/raster/processor.rb
geo_concerns-0.0.2 app/processors/geo_concerns/processors/raster/processor.rb