hec.location

Provides location info

class KIND(enum.Enum):

An enumeration.

SITE = <KIND.SITE: 1>
STREAM = <KIND.STREAM: 2>
BASIN = <KIND.BASIN: 3>
PROJECT = <KIND.PROJECT: 4>
EMBANKMENT = <KIND.EMBANKMENT: 5>
OUTLET = <KIND.OUTLET: 6>
TURBINE = <KIND.TURBINE: 7>
LOCK = <KIND.LOCK: 8>
STREAM_LOCATION = <KIND.STREAM_LOCATION: 9>
GATE = <KIND.GATE: 10>
OVERFLOW = <KIND.OVERFLOW: 11>
STREAM_GAGE = <KIND.STREAM_GAGE: 12>
STREAM_REACH = <KIND.STREAM_REACH: 13>
PUMP = <KIND.PUMP: 14>
WEATHER_GAGE = <KIND.WEATHER_GAGE: 15>
ENTITY = <KIND.ENTITY: 16>
class LocationException(builtins.Exception):

Exception specific to Location operations

class Location:

Holds information about locations

Location( name: str, office: Optional[str] = None, latitude: Optional[float] = None, longitude: Optional[float] = None, horizontal_datum: Optional[str] = None, elevation: Optional[float] = None, elevation_unit: Optional[str] = None, vertical_datum: Optional[str] = None, time_zone: Optional[str] = None, kind: Optional[str] = None, vertical_datum_info: Union[str, dict[str, Any], NoneType] = None, **other_info)

Initializes a Location object

Arguments:
  • name (str): The location name
  • office (Optional[str]): The office that owns the location, if applicable. Defaults to None.
  • latitude (Optional[float]): The latitude of the location. Defaults to None.
  • longitude (Optional[float]): The longitude of the location. Defaults to None.
  • horizontal_datum (Optional[str]): The horizontal datum of the specified lat/lon. Defaults to None.
  • elevation (Optional[float]): The elevation of the location. Defaults to None.
  • elevation_unit (Optional[str]): The unit of elevation of the location. Defaults to None.
  • vertical_datum (Optional[str]): The native vertical datum of the specified elevation. Defaults to None.
  • vertical_datum_info (Optional[Union[str, dict[str,Any]]]): The vertical datum info for the location. Overrides elevation, elevation_unit, and vertical_datum parameters, if also specified. Defaults to None.
  • other_info (Optional[dict[str,Any]]): Optional dictionary of other location info. Is accessible via other_info property
basename: str

The name of the location up to any initial '-' character

Operations:

Read Only

def copy(self) -> Location:
elevation: Optional[hec.UnitQuantity]

The elevation of the location

Operations:

Read/Write

horizontal_datum: Optional[str]

The horizontal datum of the location's latitude/longitude

Operations:

Read/Write

kind: Optional[str]

The kind of the location

Operations:

Read/Write

latitude: Optional[float]

The latitude of the location

Operations:

Read/Write

longitude: Optional[float]

The longitude of the location

Operations:

Read/Write

name: str

The full name of the location

Operations:

Read/Write

office: Optional[str]

The office that owns the location

Operations:

Read/Write

other_info: Optional[dict[str, Any]]

Dictionary of information provided to initializer.

Operations:

Read-Only

subname: Optional[str]

The name of the location after any initial '-' character

Operations:

Read Only

time_zone: Optional[str]

The time zone of the location

Operations:

Read/Write

vertical_datum: Optional[str]

The native vertical datum of the location's elevation

Operations:

Read/Write

vertical_datum_info: Optional[hec.parameter.ElevParameter._VerticalDatumInfo]

The vertical datum information for the location. * The getter returns a _VerticalDatumInfo object. * The setter accepts _VerticalDatumInfo objects

Operations:

Read/Write

vertical_datum_json: Optional[str]

The vertical datum info of the location, if any, as a JSON object

Operations:

Read-Only

vertical_datum_xml: Optional[str]

The vertical datum info of the location, if any, as an XML instance

Operations:

Read-Only