Sha256: 0b217743fdd0ccb0fe415d4316c8da4a5985c8d465dfc566d215e3bc6709559c

Contents?: true

Size: 797 Bytes

Versions: 17

Compression:

Stored size: 797 Bytes

Contents

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

        # Returns a vector processor class based on mime type passed in the directives object.
        # @return vector processing class
        def vector_processor_class
          case directives.fetch(:input_format)
          when 'application/zip; ogr-format="ESRI Shapefile"'
            GeoConcerns::Processors::Vector::Shapefile
          else
            GeoConcerns::Processors::Vector::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/vector.rb
geo_concerns-0.3.3 app/processors/geo_concerns/processors/vector.rb
geo_concerns-0.3.2 app/processors/geo_concerns/processors/vector.rb
geo_concerns-0.3.1 app/processors/geo_concerns/processors/vector.rb
geo_concerns-0.3.0 app/processors/geo_concerns/processors/vector.rb
geo_concerns-0.2.0 app/processors/geo_concerns/processors/vector.rb
geo_concerns-0.1.1 app/processors/geo_concerns/processors/vector.rb
geo_concerns-0.1.0 app/processors/geo_concerns/processors/vector.rb
geo_concerns-0.0.10 app/processors/geo_concerns/processors/vector/processor.rb
geo_concerns-0.0.9 app/processors/geo_concerns/processors/vector/processor.rb
geo_concerns-0.0.8 app/processors/geo_concerns/processors/vector/processor.rb
geo_concerns-0.0.7 app/processors/geo_concerns/processors/vector/processor.rb
geo_concerns-0.0.6 app/processors/geo_concerns/processors/vector/processor.rb
geo_concerns-0.0.5 app/processors/geo_concerns/processors/vector/processor.rb
geo_concerns-0.0.4 app/processors/geo_concerns/processors/vector/processor.rb
geo_concerns-0.0.3 app/processors/geo_concerns/processors/vector/processor.rb
geo_concerns-0.0.2 app/processors/geo_concerns/processors/vector/processor.rb