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
- Returns
equality
- Return type
bool
- Raises
TypeError if other not of
SpotElevationContainer
-
__getitem__(idx)[source]¶ Gives
SpotElevationContainerlist like get capabilities- Parameters
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
- Returns
equality
- Return type
bool
- Raises
TypeError if other not of
SpotElevationContainer
-
__setitem__(idx, spotElevation)[source]¶ Gives
SpotElevationContainerlist like set capabilities- Parameters
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
-
by_id(id)[source]¶ Returns member SpotElevation derivative by ID if it exists. :param string id: string ID of SpotElevation derivative :return: SpotElevation derivative object
-
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
-
extend(spotElevations)[source]¶ Extend a list of
pyprom.lib.locations.spot_elevation.SpotElevationto this container.- Parameters
spotElevations – list of SpotElevations to append.
- Raises
TypeError if point not of
pyprom.lib.locations.spot_elevation.SpotElevation
-
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
-
property
highest¶ - Returns
list of highest
pyprom.lib.locations.spot_elevation.SpotElevationobject(s) found in this container- Return type
-
index(spotElevation)[source]¶ Returns the index that this
pyprom.lib.locations.spot_elevation.SpotElevationor child object occurs. if none, return None- Parameters
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
-
property
lowest¶ - Returns
list of lowest
pyprom.lib.locations.spot_elevation.SpotElevationobject(s) found in this container- Return type
-
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
SpotElevationContainer- Return type
dict()
-