Class: GeoWorks::Derivatives::Processors::Raster::Base
- Inherits:
-
Hydra::Derivatives::Processors::Processor
- Object
- Hydra::Derivatives::Processors::Processor
- GeoWorks::Derivatives::Processors::Raster::Base
- Includes:
- BaseGeoProcessor, Gdal, Image, Hydra::Derivatives::Processors::ShellBasedProcessor
- Defined in:
- lib/geo_works/derivatives/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
12 13 14 15 16 17 18 19 |
# File 'lib/geo_works/derivatives/processors/raster/base.rb', line 12 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.
23 24 25 |
# File 'lib/geo_works/derivatives/processors/raster/base.rb', line 23 def self.encode_queue [:translate, :convert, :trim, :center] end |
.encode_raster(in_path, out_path, options) ⇒ Object
33 34 35 |
# File 'lib/geo_works/derivatives/processors/raster/base.rb', line 33 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.
29 30 31 |
# File 'lib/geo_works/derivatives/processors/raster/base.rb', line 29 def self.reproject_queue [:warp, :cloud_optimized_geotiff] end |
.reproject_raster(in_path, out_path, options) ⇒ Object
37 38 39 |
# File 'lib/geo_works/derivatives/processors/raster/base.rb', line 37 def self.reproject_raster(in_path, out_path, ) run_commands(in_path, out_path, reproject_queue, ) end |