upoints.weather_stations.Station

Package upoints :: Module weather_stations :: Class Station |
[hide private]
[frames] | no frames]

# Class Station

          object --+
                   |
         point.Point --+
                       |
    trigpoints.Trigpoint --+
                           |
                          Station

Class for representing a weather station from a NOAA data file

Since: 0.2.0

Instance Methods | [hide private]
__init__(self, alt_id, name, state, country, wmo, latitude, longitude, ua_latitude, ua_longitude, altitude, ua_altitude, rbsn) Initialise a new Station object |
`str` |
__str__(self, mode=`'``dd``'`) Pretty printed location string |
Inherited from `point.Point`: `__dict__`, `__eq__`, `__hash__`, `__ne__`, `__repr__`, `__unicode__`, `bearing`, `destination`, `distance`, `final_bearing`, `forward`, `inverse`, `midpoint`, `sun_events`, `sunrise`, `sunset`, `to_grid_locator` Inherited from `point.Point` (private): `_set_location` Inherited from `object`: `__delattr__`, `__getattribute__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`

Instance Variables | [hide private]
| alt_id Alternate location identifier(either ICAO or WMO)
| altitude Location's altitude
| country Country name
| latitude Location's latitude
| longitude Locations's longitude
| name Location's name
| rbsn True if station belongs to RSBN
| state State name, if station is in the US
| ua_altitude Station's upper air elevation
| ua_latitude Station's upper air latitude
| ua_longitude Station's upper air longitude
| wmo WMO region code
Inherited from `trigpoints.Trigpoint`: `identity` Inherited from `point.Point`: `rad_latitude`, `rad_longitude`, `timezone`, `units`

Properties | [hide private]
Inherited from `point.Point` (private): `_angle`, `_latitude`, `_longitude`, `_rad_latitude`, `_rad_longitude` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, alt_id, name, state, country, wmo, latitude, longitude, ua_latitude, ua_longitude, altitude, ua_altitude, rbsn) (Constructor) |
Initialise a new Station object
    >>> Station('EGLL', 'London / Heathrow Airport', None,
    ...         'United Kingdom', 6, 51.4833333333, -0.45, None, None, 24,
    ...         0, True)
    Station('EGLL', 'London / Heathrow Airport', None, 'United Kingdom', 6,
            51.4833333333, -0.45, None, None, 24, 0, True)
Parameters: `alt_id` (`str` or `None`) - Alternate location identifier `name` (`str`) - Station's name `state` (`str` or `None`) - State name, if station is in the US `country` (`str`) - Country name `wmo` (`int`) - WMO region code `latitude` (`float`) - Station's latitude `longitude` (`float`) - Station's longitude `ua_latitude` (`float` or `None`) - Station's upper air latitude `ua_longitude` (`float` or `None`) - Station's upper air longitude `altitude` (`int` or `None`) - Station's elevation `ua_altitude` (`int` or `None`) - Station's upper air elevation `rbsn` (`bool`) - True if station belongs to RSBN Raises: `ValueError` - Unknown value for `angle` `ValueError` - Unknown value for units `ValueError` - Invalid value for latitude or longitude Overrides: object.__init__

### __str__(self, mode=`'``dd``'`) (Informal representation operator) |
Pretty printed location string
    >>> Heathrow = Station("EGLL", "London / Heathrow Airport", None,
    ...                    "United Kingdom", 6, 51.048333, -0.450000, None,
    ...                    None, 24, 0, True)
    >>> print(Heathrow)
    London / Heathrow Airport (EGLL - N51.048°; W000.450°)
    >>> print(Heathrow.__str__(mode="dms"))
    London / Heathrow Airport (EGLL - 51°02'53"N, 000°27'00"W)
    >>> print(Heathrow.__str__(mode="dm"))
    London / Heathrow Airport (EGLL - 51°02.90'N, 000°27.00'W)
    >>> Heathrow.alt_id = None
    >>> print(Heathrow)
    London / Heathrow Airport (N51.048°; W000.450°)
Parameters: `mode` (`str`) - Coordinate formatting system to use Returns: `str` Human readable string representation of Station object Raises: `ValueError` - Unknown value for `mode` Overrides: object.__str__ See Also: trigpoints.point.Point