Sha256: 892c4c7d7f8bd7a06546e202aa01d5c25686846578995a0024854fe3d59052df

Contents?: true

Size: 788 Bytes

Versions: 6

Compression:

Stored size: 788 Bytes

Contents

module GeoWorks
  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"'
            GeoWorks::Processors::Vector::Shapefile
          else
            GeoWorks::Processors::Vector::Base
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 app/processors/geo_works/processors/vector.rb
geo_works-0.1.4 app/processors/geo_works/processors/vector.rb
geo_works-0.1.3 app/processors/geo_works/processors/vector.rb
geo_works-0.1.2 app/processors/geo_works/processors/vector.rb
geo_works-0.1.1 app/processors/geo_works/processors/vector.rb
geo_works-0.1.0 app/processors/geo_works/processors/vector.rb