Class: GeoConcerns::Processors::Raster::Processor
- Inherits:
-
Hydra::Derivatives::Processors::Processor
- Object
- Hydra::Derivatives::Processors::Processor
- GeoConcerns::Processors::Raster::Processor
- Defined in:
- app/processors/geo_concerns/processors/raster.rb
Instance Method Summary collapse
- #process ⇒ Object
-
#raster_processor_class ⇒ Object
Returns a raster 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/raster.rb', line 5 def process raster_processor_class.new(source_path, directives, output_file_service: output_file_service).process end |
#raster_processor_class ⇒ Object
Returns a raster processor class based on mime type passed in the directives object.
13 14 15 16 17 18 19 20 21 22 |
# File 'app/processors/geo_concerns/processors/raster.rb', line 13 def raster_processor_class case directives.fetch(:input_format) when 'text/plain; gdal-format=USGSDEM' GeoConcerns::Processors::Raster::Dem when 'application/octet-stream; gdal-format=AIG' GeoConcerns::Processors::Raster::Aig else GeoConcerns::Processors::Raster::Base end end |