4.2.4. GridPointContainer¶
-
class
pyprom.lib.containers.gridpoint.GridPointContainer(gridPointList)[source]¶ GridPoint Container for GridPoint type lists. Storage and functions for
pyprom.lib.locations.gridpoint.GridPoint-
__init__(gridPointList)[source]¶ - Parameters
gridPointList (list(
pyprom.lib.locations.gridpoint.GridPoint)) – list of GridPoints- Raises
TypeError when gridPointList contains non
pyprom.lib.locations.gridpoint.GridPoint
-
__str__()¶ - Returns
String representation of this object
-
__unicode__()¶ - Returns
String representation of this object
-
append(gridPoint)[source]¶ Append a
pyprom.lib.locations.gridpoint.GridPointto the container.- Parameters
gridPoint (
pyprom.lib.locations.gridpoint.GridPoint) – GridPoint to append- Raises
TypeError if gridPoint not of
pyprom.lib.locations.gridpoint.GridPoint
-
findClosestPoints(otherGridpointContainer)[source]¶ Calculates and returns The the two closest
pyprom.lib.locations.gridpoint.GridPointobjects from thisGridPointContainerand otherGridpointContainer and their distance.- Parameters
otherGridpointContainer – The other
GridPointContainerto compare against.- Returns
This
GridPointContainerand otherGridPointContainerclosestpyprom.lib.locations.gridpoint.GridPoint, and distance between them.- Return type
pyprom.lib.locations.gridpoint.GridPoint,pyprom.lib.locations.gridpoint.GridPoint, float
-
findPseudoSummits()[source]¶ - Similiar in concept to finding summits and multipoint blobs,but smaller in scope.Essentially this returns locally scoped Summit points, that is,anything that meets the effective definition of a summit with allthe available data in a
GridPointContainer.This is intended for use for finding high portions along an edge like:[1][2][3][2][2][3][4][4][3][2]`` ^ ^^^^```` PSEUDO SUMMITS (simple 1D example)``No distinction is made between the pseudo summits. This is becasuethese points are used as a jumping off point for Saddle -> Summitwalks.
-
classmethod
from_dict(gpcDict)[source]¶ Create this object from dictionary representation
- Parameters
gpcDict (dict) – dict representation of
GridPointContainer- Returns
a new GridPointContainer
- Return type
-
genFastLookup()[source]¶ Generates a fast lookup hash of all GridPoints in this container in the format of: {x: {y:
pyprom.lib.locations.gridpoint.GridPoint}}
-
property
highest¶ - Returns
list of highest GridPoint objects found in this container
- Return type
-
iterNeighborFull(point)[source]¶ Iterate through existing diagonal/orthogonal
pyprom.lib.locations.gridpoint.GridPointneighbors found in thisGridPointContainer.- Parameters
point (
pyprom.lib.locations.gridpoint.GridPoint) – gridpoint to find neighbors of.- Return type
-
iterNeighborOrthogonal(point)[source]¶ Iterate through existing orthogonal
pyprom.lib.locations.gridpoint.GridPointneighbors found in thisGridPointContainer.- Parameters
point (
pyprom.lib.locations.gridpoint.GridPoint) – gridpoint to find neighbors of.- Return type
-
property
lowest¶ - Returns
list of lowest GridPoint objects found in this container
- Return type
-
to_dict()[source]¶ Create the dictionary representation of this object.
- Returns
dict() representation of
GridPointContainer- Return type
dict()
-
to_tuples()[source]¶ - Returns
GridPointContainermembers as a list of (x, y, elevation) tuples.
-