Class: OpenTopo::Net::Params::GlobaldemParams

Inherits:
BaseParams
  • Object
show all
Defined in:
lib/open_topo/net/params/globaldem_params.rb

Constant Summary collapse

OUTPUT_FORMATS =
{tif: "GTiff", hfa: "HFA", asc: "AAIGrid"}
DEM_TYPES =
{
  anadem: "ANADEM",                       # (DTM 30m)
  aw3_d30_e: "AW3D30_E",                  # (ALOS World 3D Ellipsoidal, 30m)
  aw3_d30: "AW3D30",                      # (ALOS World 3D 30m)
  ca_mrdem_dsm: "CA_MRDEM_DSM",           # (DSM 30m)
  ca_mrdem_dtm: "CA_MRDEM_DTM",           # (DTM 30m)
  cop30: "COP30",                         # (Copernicus Global DSM 30m)
  cop90: "COP90",                         # (Copernicus Global DSM 90m)
  eu_dtm: "EU_DTM",                       # (DTM 30m)
  gebco_ice_topo: "GEBCOIceTopo",         # (Global Bathymetry 500m)
  gebco_sub_ice_topo: "GEBCOSubIceTopo",  # (Global Bathymetry 500m)
  gedi_l3: "GEDI_L3",                     # (DTM 1000m)
  gedtm30: "GEDTM30",                     # (DTM 30m)
  nasadem: "NASADEM",                     # (NASADEM Global DEM)
  srtm15_plus: "SRTM15Plus",              # (Global Bathymetry SRTM15+ V2.1 500m)
  srtmgl1_e: "SRTMGL1_E",                 # (SRTM GL1 Ellipsoidal 30m)
  srtmgl1: "SRTMGL1",                     # (SRTM GL1 30m)
  srtmgl3: "SRTMGL3"                      # (SRTM GL3 90m)
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseParams

#error_messages, #valid?, #validate!, validate_with

Constructor Details

#initialize(south:, north:, west:, east:, demtype:, output_format:) ⇒ GlobaldemParams

Returns a new instance of GlobaldemParams.



32
33
34
35
36
37
38
39
40
41
# File 'lib/open_topo/net/params/globaldem_params.rb', line 32

def initialize(south:, north:, west:, east:, demtype:, output_format:)
  @south = south
  @north = north
  @west = west
  @east = east
  @demtype = demtype
  @output_format = output_format

  super()
end

Instance Attribute Details

#demtypeObject (readonly)

Returns the value of attribute demtype.



30
31
32
# File 'lib/open_topo/net/params/globaldem_params.rb', line 30

def demtype
  @demtype
end

#eastObject (readonly)

Returns the value of attribute east.



30
31
32
# File 'lib/open_topo/net/params/globaldem_params.rb', line 30

def east
  @east
end

#northObject (readonly)

Returns the value of attribute north.



30
31
32
# File 'lib/open_topo/net/params/globaldem_params.rb', line 30

def north
  @north
end

#output_formatObject (readonly)

Returns the value of attribute output_format.



30
31
32
# File 'lib/open_topo/net/params/globaldem_params.rb', line 30

def output_format
  @output_format
end

#southObject (readonly)

Returns the value of attribute south.



30
31
32
# File 'lib/open_topo/net/params/globaldem_params.rb', line 30

def south
  @south
end

#westObject (readonly)

Returns the value of attribute west.



30
31
32
# File 'lib/open_topo/net/params/globaldem_params.rb', line 30

def west
  @west
end

Instance Method Details

#to_paramsObject



43
44
45
46
47
48
49
50
51
52
# File 'lib/open_topo/net/params/globaldem_params.rb', line 43

def to_params
  {
    south:,
    north:,
    west:,
    east:,
    demtype: DEM_TYPES[demtype.to_sym],
    outputFormat: OUTPUT_FORMATS[output_format.to_sym]
  }
end