Class: GeoConcerns::Processors::Vector::Processor
- Inherits:
-
Hydra::Derivatives::Processors::Processor
- Object
- Hydra::Derivatives::Processors::Processor
- GeoConcerns::Processors::Vector::Processor
- Defined in:
- app/processors/geo_concerns/processors/vector.rb
Instance Method Summary collapse
- #process ⇒ Object
-
#vector_processor_class ⇒ Object
Returns a vector processor class based on mime type passed in the directives object.
Instance Method Details
#process ⇒ Object
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_class ⇒ Object
Returns a vector processor class based on mime type passed in the directives object.
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 |