Class: GeoConcerns::Processors::Vector::Processor

Inherits:
Hydra::Derivatives::Processors::Processor
  • Object
show all
Defined in:
app/processors/geo_concerns/processors/vector.rb

Instance Method Summary collapse

Instance Method Details

#processObject



5
6
7
8
9
# File 'app/processors/geo_concerns/processors/vector.rb', line 5

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



13
14
15
16
17
18
19
20
# File 'app/processors/geo_concerns/processors/vector.rb', line 13

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