Sha256: a38267abeee305e4bdbc8cc36bcc64d88bb4b8158aaa21263690f55611ccec5d

Contents?: true

Size: 961 Bytes

Versions: 6

Compression:

Stored size: 961 Bytes

Contents

module GeoWorks
  module Processors
    module Raster
      class Dem < GeoWorks::Processors::Raster::Base
        # Set of commands to run to encode the DEM thumbnail.
        # @return [Array] set of command name symbols
        def self.encode_queue
          [:hillshade, :convert]
        end

        # Set of commands to run to reproject the DEM.
        # @return [Array] set of command name symbols
        def self.reproject_queue
          [:hillshade, :warp]
        end

        # Executes a gdal hillshade command. Calculates hillshade
        # on a raster that contains elevation data.
        # @param in_path [String] file input path
        # @param out_path [String] processor output file path
        # @param options [Hash] creation options
        def self.hillshade(in_path, out_path, _options)
          execute "gdaldem hillshade -q "\
                    "-of GTiff \"#{in_path}\" #{out_path}"
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 app/processors/geo_works/processors/raster/dem.rb
geo_works-0.1.4 app/processors/geo_works/processors/raster/dem.rb
geo_works-0.1.3 app/processors/geo_works/processors/raster/dem.rb
geo_works-0.1.2 app/processors/geo_works/processors/raster/dem.rb
geo_works-0.1.1 app/processors/geo_works/processors/raster/dem.rb
geo_works-0.1.0 app/processors/geo_works/processors/raster/dem.rb