Class: GeoConcerns::Processors::Vector::Base
- Inherits:
-
Hydra::Derivatives::Processors::Processor
- Object
- Hydra::Derivatives::Processors::Processor
- GeoConcerns::Processors::Vector::Base
- Includes:
- BaseGeoProcessor, Gdal, Image, Ogr, Rendering, Zip, Hydra::Derivatives::Processors::ShellBasedProcessor
- Defined in:
- app/processors/geo_concerns/processors/vector/base.rb
Direct Known Subclasses
Class Method Summary collapse
- .encode(path, options, output_file) ⇒ Object
-
.encode_queue ⇒ Array
Set of commands to run to encode the vector thumbnail.
- .encode_vector(in_path, out_path, options) ⇒ Object
-
.reproject_queue ⇒ Array
Set of commands to run to reproject the vector.
- .reproject_vector(in_path, out_path, options) ⇒ Object
Methods included from Rendering
Methods included from BaseGeoProcessor
#basename, #id, #label, #options_for, #output_size, #output_srid
Class Method Details
.encode(path, options, output_file) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/processors/geo_concerns/processors/vector/base.rb', line 13 def self.encode(path, , output_file) case [:label] when :thumbnail encode_vector(path, output_file, ) when :display_vector reproject_vector(path, output_file, ) end end |
.encode_queue ⇒ Array
Set of commands to run to encode the vector thumbnail.
24 25 26 |
# File 'app/processors/geo_concerns/processors/vector/base.rb', line 24 def self.encode_queue [:reproject, :vector_thumbnail, :trim, :center] end |
.encode_vector(in_path, out_path, options) ⇒ Object
34 35 36 |
# File 'app/processors/geo_concerns/processors/vector/base.rb', line 34 def self.encode_vector(in_path, out_path, ) run_commands(in_path, out_path, encode_queue, ) end |
.reproject_queue ⇒ Array
Set of commands to run to reproject the vector.
30 31 32 |
# File 'app/processors/geo_concerns/processors/vector/base.rb', line 30 def self.reproject_queue [:reproject, :zip] end |
.reproject_vector(in_path, out_path, options) ⇒ Object
38 39 40 |
# File 'app/processors/geo_concerns/processors/vector/base.rb', line 38 def self.reproject_vector(in_path, out_path, ) run_commands(in_path, out_path, reproject_queue, ) end |