Class: OpenTopo::DemFile

Inherits:
Object
  • Object
show all
Defined in:
lib/open_topo/dem_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original_file:, dem_type:, output_format:) ⇒ DemFile

Returns a new instance of DemFile.



13
14
15
16
17
# File 'lib/open_topo/dem_file.rb', line 13

def initialize(original_file:, dem_type:, output_format:)
  @original_file = original_file
  @dem_type = dem_type
  @output_format = output_format
end

Instance Attribute Details

#dem_typeObject (readonly)

Returns the value of attribute dem_type.



9
10
11
# File 'lib/open_topo/dem_file.rb', line 9

def dem_type
  @dem_type
end

#original_fileObject (readonly) Also known as: file

Returns the value of attribute original_file.



6
7
8
# File 'lib/open_topo/dem_file.rb', line 6

def original_file
  @original_file
end

#output_formatObject (readonly)

Returns the value of attribute output_format.



11
12
13
# File 'lib/open_topo/dem_file.rb', line 11

def output_format
  @output_format
end

Instance Method Details

#convert_to(format, file_path: nil) ⇒ Object



19
20
21
# File 'lib/open_topo/dem_file.rb', line 19

def convert_to(format, file_path: nil)
  Services::DemConverter.call(original_file, format, file_path: file_path)
end