4.2.12. WalkPath

class pyprom.lib.containers.walkpath.WalkPath(points)[source]

WalkPath Container. A Walk path is an ordered list of (X,Y) coordinates which creates a path.

__eq__(other)[source]

Determines if this object is equal to another.

Parameters:other (WalkPath) – WalkPath to be compared against
Returns:equality
Return type:bool
__init__(points)[source]
Parameters:points (list(tuple(int, int))) – List of (X,Y) tuples. making a path
__repr__()[source]
Returns:String representation of this object
__weakref__

list of weak references to the object (if defined)

baseCoordinate()[source]
Returns:List of points as pyprom.lib.locations.base_coordinate.BaseCoordinate
Return type:list(pyprom.lib.locations.base_coordinate.BaseCoordinate)
baseGridPoint(datamap)[source]
Parameters:datamap (pyprom.lib.datamap.DataMap) – Datamap used to look up elevation of point.
Returns:List of points as pyprom.lib.locations.base_gridpoint.BaseGridPoint
Return type:list(pyprom.lib.locations.base_gridpoint.BaseGridPoint)
classmethod from_dict(pathDict)[source]

Create this object from dictionary representation

Parameters:pathDict (dict) – dict() representation of this object.
Returns:a new WalkPath
Return type:WalkPath
gridPoint(datamap)[source]
Parameters:datamap (pyprom.lib.datamap.DataMap) – Datamap used to look up elevation of point.
Returns:List of points as pyprom.lib.locations.gridpoint.GridPoint
Return type:list(pyprom.lib.locations.gridpoint.GridPoint)
iterateBaseCoordinate()[source]

Iterator for BaseCoordinate representation of the Walk Path.

Returns:Basecoordinate along path.
Return type:pyprom.lib.locations.base_coordinate.BaseCoordinate
iterateBaseGridPoint(datamap)[source]

Iterator for BaseGridPoint representation of the Walk Path.

Parameters:datamap (pyprom.lib.datamap.DataMap) – Datamap used to look up elevation of point.
Returns:BaseGridPoint along path
Return type:pyprom.lib.locations.base_gridpoint.BaseGridPoint
iterateGridPoint(datamap)[source]

Iterator for GridPoint representation of the Walk Path.

Parameters:datamap (pyprom.lib.datamap.DataMap) – Datamap used to look up elevation of point.
Returns:GridPoint along path
Return type:pyprom.lib.locations.gridpoint.GridPoint
iterateSpotElevation(datamap)[source]

Iterator for SpotElevation representation of the Walk Path.

Parameters:datamap (pyprom.lib.datamap.DataMap) – Datamap used to look up elevation of point.
Returns:SpotElevation along path.
Return type:pyprom.lib.locations.spot_elevation.SpotElevation
path

Returns the path as BaseCoordinates

Returns:List of points as pyprom.lib.locations.base_coordinate.BaseCoordinate
Return type:list(pyprom.lib.locations.base_coordinate.BaseCoordinate)
spotElevation(datamap)[source]
Parameters:datamap (pyprom.lib.datamap.DataMap) – Datamap used to look up elevation of point.
Returns:List of points as pyprom.lib.locations.spot_elevation.SpotElevation
Return type:list(pyprom.lib.locations.spot_elevation.SpotElevation)
to_dict()[source]

Create the dictionary representation of this object.

Returns:dict() representation of WalkPath
Return type:dict()