Class: OpenTopo::Net::Params::UsgsdemParams
- Inherits:
-
BaseParams
- Object
- BaseParams
- OpenTopo::Net::Params::UsgsdemParams
- Defined in:
- lib/open_topo/net/params/usgsdem_params.rb
Constant Summary collapse
- OUTPUT_FORMATS =
{tif: "GTiff", hfa: "HFA", asc: "AAIGrid"}
- DEM_TYPES =
{ usgs1m: "USGS1m", usgs10m: "USGS10m", usgs30m: "USGS30m" }
Instance Attribute Summary collapse
-
#demtype ⇒ Object
readonly
Returns the value of attribute demtype.
-
#east ⇒ Object
readonly
Returns the value of attribute east.
-
#north ⇒ Object
readonly
Returns the value of attribute north.
-
#output_format ⇒ Object
readonly
Returns the value of attribute output_format.
-
#south ⇒ Object
readonly
Returns the value of attribute south.
-
#west ⇒ Object
readonly
Returns the value of attribute west.
Instance Method Summary collapse
-
#initialize(south:, north:, west:, east:, dataset_name:, output_format:) ⇒ UsgsdemParams
constructor
A new instance of UsgsdemParams.
- #to_params ⇒ Object
Methods inherited from BaseParams
#error_messages, #valid?, #validate!, validate_with
Constructor Details
#initialize(south:, north:, west:, east:, dataset_name:, output_format:) ⇒ UsgsdemParams
Returns a new instance of UsgsdemParams.
18 19 20 21 22 23 24 25 |
# File 'lib/open_topo/net/params/usgsdem_params.rb', line 18 def initialize(south:, north:, west:, east:, dataset_name:, output_format:) @south = south @north = north @west = west @east = east @demtype = dataset_name @output_format = output_format end |
Instance Attribute Details
#demtype ⇒ Object (readonly)
Returns the value of attribute demtype.
16 17 18 |
# File 'lib/open_topo/net/params/usgsdem_params.rb', line 16 def demtype @demtype end |
#east ⇒ Object (readonly)
Returns the value of attribute east.
16 17 18 |
# File 'lib/open_topo/net/params/usgsdem_params.rb', line 16 def east @east end |
#north ⇒ Object (readonly)
Returns the value of attribute north.
16 17 18 |
# File 'lib/open_topo/net/params/usgsdem_params.rb', line 16 def north @north end |
#output_format ⇒ Object (readonly)
Returns the value of attribute output_format.
16 17 18 |
# File 'lib/open_topo/net/params/usgsdem_params.rb', line 16 def output_format @output_format end |
#south ⇒ Object (readonly)
Returns the value of attribute south.
16 17 18 |
# File 'lib/open_topo/net/params/usgsdem_params.rb', line 16 def south @south end |
#west ⇒ Object (readonly)
Returns the value of attribute west.
16 17 18 |
# File 'lib/open_topo/net/params/usgsdem_params.rb', line 16 def west @west end |
Instance Method Details
#to_params ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/open_topo/net/params/usgsdem_params.rb', line 27 def to_params { south:, north:, west:, east:, datasetName: DEM_TYPES[demtype.to_sym], outputFormat: OUTPUT_FORMATS[output_format.to_sym] } end |