4.1.5. Saddle¶
-
class
pyprom.lib.locations.saddle.Saddle(latitude, longitude, elevation, *args, **kwargs)[source]¶ - Saddle object stores relevant saddle data.A Saddle is by definition a point, or set of equal height points(MultiPoint) which have at least 2 non contiguous sets of pointsaround the Perimeter that are higher than the point or Multipoint.These are called “High Shores”. A Saddle is a Child object ofExamples:Single Point Saddle:
v------high shore[0][2][0][0][1][0] [1] = Saddle[0][3][0]^------high shoreMultiPoint Saddle:v--------high shore[0][2][0][0][0][1][1][0] [1][1] = Saddle[0][3][0][0]^-----high shore-
__hash__()[source]¶ hash takes into account the lat, long, and elevation of the saddle As well as a hash of all the highShores. This is a costly calculation and should probably be avoided if possible.
- Returns
Hash representation of this object
- Return type
str
-
__init__(latitude, longitude, elevation, *args, **kwargs)[source]¶ - Parameters
latitude (int, float) – latitude in dotted decimal
longitude (int, float) – longitude in dotted decimal
elevation (int, float) – elevation in meters
multipoint (
pyprom.lib.containers.multipoint.MultiPoint, None) – MultiPoint objecthighShores (list(
pyprom.lib.containers.gridPoint.GridPointContainer)) – list of GridPointContainers representing a highShoreedge (bool) – Does this
Saddlehave an edge Effect?id (str) – kwarg for id
children (list) – list of child Saddles. These are
Saddlederived from thisSaddleparent – Parent saddle These are
Saddlewhich from thisSaddleis derived.singleSummit (bool) – kwarg for Saddles disqualified for being linked to a Single Summit.
basinSaddle (bool) – kwarg for Saddles disqualified for being a Basin Saddle.
basinSaddleAlternatives (list) – kwarg for Saddles which are basin saddles of equivalent height :type basinSaddleAlternatives: list(
Saddle)disqualified (bool) – kwarg for a generic disqualified Saddle.
-
__str__()¶ - Returns
String representation of this object
-
__unicode__()¶ - Returns
String representation of this object
-
addSummitLinker(linker)[source]¶ Add a
pyprom.lib.containers.linker.Linkerto this Saddle. This in effect links apyprom.lib.locations.summit.Summitto this Saddle.- Parameters
linker (
pyprom.lib.containers.linker.Linker) – linker to add.
-
all_neighbors(filterDisqualified=True)[source]¶ all_neighbors will return all neighboring saddles by way of the connected summit. This function deliberately makes no effort to filter out redundant neighbors.
- Parameters
filterDisqualified (bool) – Filter out disqualified linkers.
- Returns
list of neighboring saddles by way of neighboring summits.
- Return type
list(
Saddle)
-
property
disqualified¶ - Returns
if any values that indicate disqualification are set, return True.
- Return type
bool
-
disqualify_self_and_linkers(basinSaddle=False, singleSummit=False)[source]¶ Disqualify this
Saddleand linkedpyprom.lib.containers.linker.Linkers- Parameters
basinSaddle (bool) – set basinSaddle
singleSummit (bool) – set singleSummit
-
property
domains¶ - Returns
list of SummitDomains associated with this Saddle
-
feature_neighbors()[source]¶ - Returns
returns all linked Summits. This is, in effect, an interface.
- Return type
-
classmethod
from_dict(saddleDict, datamap=None)[source]¶ Create this object from dictionary representation
- Parameters
saddleDict (dict) – dict representation of this object.
datamap (
pyprom.lib.datamap.DataMap) – Datamap to build this object from.
- Returns
a new Saddle object.
- Return type
-
high_shore_shortest_path(datamap)[source]¶ Finds the two closest opposing high shore points. This follows a path inside the saddle. Also returns the midpoint.
- Parameters
datamap (
pyprom.lib.datamap.DataMap) – Datamap required for distance calculations.- Returns
HS1, HS2, Midpoint
-
property
neighbors¶ neighbors will return all neighboring saddles by way of the connected summit. This function will filter out redundant neighbors.
- Parameters
filterDisqualified (bool) – Filter out disqualified linkers.
- Returns
list of unique neighboring saddles by way of neighboring summits excluding self.
- Return type
list(
Saddle)
-
soft_delete()[source]¶ Soft deletes this Saddle, that is, disassociates itself from other saddle attributes
-
property
summits_set¶ - Returns
set of linked Summits
- Return type
-