Class: GeoWorks::Derivatives::Processors::Raster::Dem

Inherits:
Base
  • Object
show all
Defined in:
lib/geo_works/derivatives/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



9
10
11
# File 'lib/geo_works/derivatives/processors/raster/dem.rb', line 9

def self.encode_queue
  [:hillshade, :convert, :trim, :center]
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



24
25
26
27
# File 'lib/geo_works/derivatives/processors/raster/dem.rb', line 24

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



15
16
17
# File 'lib/geo_works/derivatives/processors/raster/dem.rb', line 15

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