4.2.10. SpotElevationContainer¶
-
class
pyprom.lib.containers.spot_elevation.SpotElevationContainer(spotElevationList)[source]¶ Container for Spot Elevation type lists. Allows for various list transformations.
This is intended to be inherited from, namely for:
pyprom.lib.containers.saddles.SaddlesContainer,pyprom.lib.containers.summits.SummitsContainer, andpyprom.lib.containers.runoffs.RunOffsContainer-
__eq__(other)[source]¶ Determines if
SpotElevationContaineris equal to another.Parameters: other – other SpotElevationContainerto check.Type: SpotElevationContainerReturns: equality Return type: bool Raises: TypeError if other not of SpotElevationContainer
-
__getitem__(idx)[source]¶ Gives
SpotElevationContainerlist like get capabilitiesParameters: idx (int) – index value Returns: pyprom.lib.locations.spot_elevation.SpotElevationself.point at idx
-
__init__(spotElevationList)[source]¶ Parameters: spotElevationList ( pyprom.lib.locations.spot_elevation.SpotElevation) – list of SpotElevation objects which will reside in this container.
-
__ne__(other)[source]¶ Determines if
SpotElevationContaineris not equal to another.Parameters: other – other SpotElevationContainerto check.Type: SpotElevationContainerReturns: equality Return type: bool Raises: TypeError if other not of SpotElevationContainer
-
__setitem__(idx, spotElevation)[source]¶ Gives
SpotElevationContainerlist like set capabilitiesParameters: - idx (int) – index value
- spotElevation (
pyprom.lib.locations.spot_elevation.SpotElevation) – Spot Elevation object to set.
Raises: TypeError if spotElevation not of
pyprom.lib.locations.spot_elevation.SpotElevation
-
__str__()¶ Returns: String representation of this object
-
__unicode__()¶ Returns: String representation of this object
-
append(spotElevation)[source]¶ Append a
pyprom.lib.locations.spot_elevation.SpotElevationto this container.Parameters: spotElevation ( pyprom.lib.locations.spot_elevation.SpotElevation) – SpotElevation to append.Raises: TypeError if point not of pyprom.lib.locations.spot_elevation.SpotElevation
-
elevationRange(lower=-100000, upper=100000)[source]¶ Returns all members of this container within a certain elevation range in feet
Parameters: - lower (int, float) – lower limit in feet
- upper (int, float) – upper limit in feet
Returns: all points in range between lower and upper (exclusive)
Return type:
-
elevationRangeMetric(lower=-100000, upper=100000)[source]¶ Returns all members of this container within a certain elevation range using meters
Parameters: - lower (int, float) – lower limit in meters
- upper (int, float) – upper limit in meters
Returns: all points in range between lower and upper (exclusive)
Return type:
-
classmethod
from_dict(spotElevationContainerDict, datamap=None)[source]¶ Create this object from dictionary representation
Parameters: - spotElevationContainerDict (dict) – dict() representation of
SpotElevationContainer. - datamap (
pyprom.lib.datamap.DataMap) – datamap which MultiPoint style SpotElevations use.
Returns: a new SpotElevationContainer
Return type: - spotElevationContainerDict (dict) – dict() representation of
-
highest¶ Returns: list of highest pyprom.lib.locations.spot_elevation.SpotElevationobject(s) found in this containerReturn type: list( pyprom.lib.locations.spot_elevation.SpotElevation)
-
index(spotElevation)[source]¶ Returns the index that this
pyprom.lib.locations.spot_elevation.SpotElevationor child object occurs. if none, return NoneParameters: gridPoint ( pyprom.lib.locations.spot_elevation.SpotElevation) – Gridpoint to find index of.Returns: index in points list where this spotElevation exists Return type: int, None
-
lowest¶ Returns: list of lowest pyprom.lib.locations.spot_elevation.SpotElevationobject(s) found in this containerReturn type: list( pyprom.lib.locations.spot_elevation.SpotElevation)
-
radius(lat, long, value, unit='m')[source]¶ Returns all members of this container within a certain radius.
Parameters: - lat (float, int) – latitude of center in dotted decimal
- long (float, int) – longitude of center in dotted decimal
- value (float, int) – number of units of distance
- unit (str) – type of unit (m, km, mi, ft)
Returns: SpotElevationContainer loaded with results.
Return type:
-
rectangle(lat1, long1, lat2, long2)[source]¶ Returns all members of this container in a rectangle of (lat1, long1) - (lat2, long2)
Parameters: - lat1 (float, int) – latitude of point 1
- long1 (float, int) – longitude of point 1
- lat2 (float, int) – latitude of point 2
- long2 (float, int) – longitude of point 2
Returns: SpotElevationContainer loaded with all points within (inclusive) the specified rectangle.
Return type:
-
to_dict()[source]¶ Create the dictionary representation of this object.
Returns: dict() representation of SpotElevationContainerReturn type: dict()
-