Class: GeoWorks::Derivatives::Processors::Vector::Processor

Inherits:
Hydra::Derivatives::Processors::Processor
  • Object
show all
Defined in:
lib/geo_works/derivatives/processors/vector.rb

Instance Method Summary collapse

Instance Method Details

#processObject



11
12
13
14
15
# File 'lib/geo_works/derivatives/processors/vector.rb', line 11

def process
  vector_processor_class.new(source_path,
                             directives,
                             output_file_service: output_file_service).process
end

#vector_processor_classObject

Returns a vector processor class based on mime type passed in the directives object.

Returns:

  • vector processing class



19
20
21
22
23
24
25
26
# File 'lib/geo_works/derivatives/processors/vector.rb', line 19

def vector_processor_class
  case directives.fetch(:input_format)
  when 'application/zip; ogr-format="ESRI Shapefile"'
    GeoWorks::Derivatives::Processors::Vector::Shapefile
  else
    GeoWorks::Derivatives::Processors::Vector::Base
  end
end