Class: GeoConcerns::Processors::Raster::Base
- Inherits:
-
Hydra::Derivatives::Processors::Processor
- Object
- Hydra::Derivatives::Processors::Processor
- GeoConcerns::Processors::Raster::Base
- Includes:
- BaseGeoProcessor, Gdal, Image, Hydra::Derivatives::Processors::ShellBasedProcessor
- Defined in:
- app/processors/geo_concerns/processors/raster/base.rb
Class Method Summary collapse
- .encode(path, options, output_file) ⇒ Object
-
.encode_queue ⇒ Array
Set of commands to run to encode the raster thumbnail.
- .encode_raster(in_path, out_path, options) ⇒ Object
-
.reproject_queue ⇒ Array
Set of commands to run to reproject the raster.
- .reproject_raster(in_path, out_path, options) ⇒ Object
Methods included from BaseGeoProcessor
#basename, #id, #label, #options_for, #output_size, #output_srid
Class Method Details
.encode(path, options, output_file) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/processors/geo_concerns/processors/raster/base.rb', line 10 def self.encode(path, , output_file) case [:label] when :thumbnail encode_raster(path, output_file, ) when :display_raster reproject_raster(path, output_file, ) end end |
.encode_queue ⇒ Array
Set of commands to run to encode the raster thumbnail.
21 22 23 |
# File 'app/processors/geo_concerns/processors/raster/base.rb', line 21 def self.encode_queue [:translate, :convert] end |
.encode_raster(in_path, out_path, options) ⇒ Object
31 32 33 |
# File 'app/processors/geo_concerns/processors/raster/base.rb', line 31 def self.encode_raster(in_path, out_path, ) run_commands(in_path, out_path, encode_queue, ) end |
.reproject_queue ⇒ Array
Set of commands to run to reproject the raster.
27 28 29 |
# File 'app/processors/geo_concerns/processors/raster/base.rb', line 27 def self.reproject_queue [:warp, :compress] end |
.reproject_raster(in_path, out_path, options) ⇒ Object
35 36 37 |
# File 'app/processors/geo_concerns/processors/raster/base.rb', line 35 def self.reproject_raster(in_path, out_path, ) run_commands(in_path, out_path, reproject_queue, ) end |