4.2.9. SaddlesContainer¶
-
class
pyprom.lib.containers.saddles.SaddlesContainer(saddleList)[source]¶ Container for Saddles. Allows for various list transformations.
-
__init__(saddleList)[source]¶ - Parameters
saddleList (list(
pyprom.lib.locations.saddle.Saddle)) – list of Saddle objects to reside in this container.
-
__setitem__(idx, saddle)[source]¶ Gives
SaddlesContainerlist like set capabilities- Parameters
idx (int) – index
saddle (
pyprom.lib.locations.saddle.Saddle) – Saddle object to add.
-
__str__()¶ - Returns
String representation of this object
-
__unicode__()¶ - Returns
String representation of this object
-
append(saddle)[source]¶ Append a
pyprom.lib.locations.saddle.Saddleto this container.- Parameters
saddle (
pyprom.lib.locations.saddle.Saddle) – Saddle to append.- Raises
TypeError if not of type
pyprom.lib.locations.saddle.Saddle
-
property
disqualified¶ - Returns
list of all disqualified
pyprom.lib.locations.saddle.Saddlein this container.- Return type
-
extend(saddles)[source]¶ Extend a list of
pyprom.lib.locations.saddle.Saddleto this container.- Parameters
saddles – list of Saddles to append.
- Raises
TypeError if point not of
pyprom.lib.locations.saddle.Saddle
-
classmethod
from_dict(saddleContainerDict, datamap=None)[source]¶ Load this object and child objects from a dict.
- Parameters
saddleContainerDict – dict() representation of this object.
datamap (
Datamapobject.) – datamap which MultiPoint style Saddles use.
- Returns
New SaddlesContainer
- Return type
-
property
multipoints¶ - Returns list of all multipoint
pyprom.lib.locations.saddle.Saddlewithin container
- Returns
-
rebuildSaddles(datamap)[source]¶ Uses the saddles contained in this container and rebuilds any saddle which contains >= 2 high edges as (n-1) new saddles where n is the number of high edges. The old saddle is tossed out unless it is an edge effect saddle, in which it is kept and disqualified. Saddles with 2 high edges are added back in. This in effect deals with waterbodies and other similiar features.
- Parameters
datamap (
pyprom.lib.datamap.DataMap) – datamap to use while rebuilding.- Returns
New SaddlesContainer
- Return type
-
property
saddles¶ Getter alias for self.points
- Returns
all Saddles in the container
- Return type
list
-
to_dict()[source]¶ - Returns
dict() representation of
SaddlesContainer
-