Class: GeoConcerns::Processors::Raster::Dem

Inherits:
Base
  • Object
show all
Defined in:
app/processors/geo_concerns/processors/raster/dem.rb

Class Method Summary collapse

Methods inherited from Base

encode, encode_raster, reproject_raster

Methods included from BaseGeoProcessor

#basename, #id, #label, #options_for, #output_size, #output_srid

Class Method Details

.encode_queueArray

Set of commands to run to encode the DEM thumbnail.

Returns:

  • (Array)

    set of command name symbols



7
8
9
# File 'app/processors/geo_concerns/processors/raster/dem.rb', line 7

def self.encode_queue
  [:hillshade, :convert]
end

.hillshade(in_path, out_path, _options) ⇒ Object

Executes a gdal hillshade command. Calculates hillshade on a raster that contains elevation data.

Parameters:

  • in_path (String)

    file input path

  • out_path (String)

    processor output file path

  • options (Hash)

    creation options



22
23
24
25
# File 'app/processors/geo_concerns/processors/raster/dem.rb', line 22

def self.hillshade(in_path, out_path, _options)
  execute "gdaldem hillshade -q "\
            "-of GTiff \"#{in_path}\" #{out_path}"
end

.reproject_queueArray

Set of commands to run to reproject the DEM.

Returns:

  • (Array)

    set of command name symbols



13
14
15
# File 'app/processors/geo_concerns/processors/raster/dem.rb', line 13

def self.reproject_queue
  [:hillshade, :warp]
end