4.2.6. MultiPoint

class pyprom.lib.containers.multipoint.MultiPoint(points, elevation, datamap, perimeter=None)[source]
A MultiPoint Container. This is a special kind of feature which contains
multiple :class:`pyprom.lib.locations.base_gridpoint.BaseGridPoint`s.
These points are all of equal elevation and neighbor each other
Orthogonally or Diagonally.

[4][3][4][6][4]
[3][5][5][5][6]
[2][3][5][6][3]
[3][5][4][3]
[6][7][6]

In the above example, all [5] points represent a valid MultiPoint.
All non [5] points are Perimeter Points, that is, they neighbor
MultiPoint members Diagonally or Orthogonally.

[5][5][5]
[5]   <- Without Perimeter
[5]


[4][3][4][6][4]
[3]         [6] <- Just the Perimeter.
[2][3]   [6][3]
[3]   [4][3]
[6][7][6]
__eq__(other)[source]

Determines if this object is equal to another.

Parameters:other – other MultiPoint to check.
Type:MultiPoint
Returns:equality
Return type:bool
Raises:TypeError if other not of MultiPoint
__getitem__(idx)[source]

Gives MultiPoint list like get capabilities

Parameters:idx (int) – index value
Returns:pyprom.lib.locations.base_gridpoint.BaseGridPoint self.point at idx
__init__(points, elevation, datamap, perimeter=None)[source]
Parameters:
__iter__()[source]
Returns:self.points as iterator
__len__()[source]
Returns:number of items in self.points
Return type:int
__ne__(other)[source]

Determines if this object is not equal to another.

Parameters:other – other MultiPoint to check.
Type:MultiPoint
Returns:inequality
Return type:bool
Raises:TypeError if other not of MultiPoint
__repr__()[source]
Returns:String representation of this object
__setitem__(idx, point)[source]

Gives MultiPoint list like set capabilities

Parameters:
Raises:

TypeError if point not of BaseGridPoint

__str__()
Returns:String representation of this object
__unicode__()
Returns:String representation of this object
__weakref__

list of weak references to the object (if defined)

append(point)[source]

Add a BaseGridPoint to this container.

Parameters:point (pyprom.lib.locations.base_gridpoint.BaseGridPoint) – BaseGridPoint to add.
Raises:TypeError if point not of pyprom.lib.locations.base_gridpoint.BaseGridPoint
closestPoint(gridPoint, asSpotElevation=False)[source]

Returns the closest point in this container to the GridPoint passed in.

Parameters:
Returns:

GridPoint if asSpotElevation == False SpotElevation if asSpotElevation == True

:rtype pyprom.lib.locations.gridpoint.GridPoint,
pyprom.lib.locations.spot_elevation.SpotElevation
classmethod from_dict(multiPointDict, datamap=None)[source]

Create this object from dictionary representation

Parameters:
Returns:

a new Multipoint.

Return type:

MultiPoint

pointsLatLong

Returns list() of Container pyprom.lib.locations.base_gridpoint.BaseGridPoint as pyprom.lib.locations.base_coordinate.BaseCoordinate

Returns:List of All blob points with lat/long instead of x/y
Return type:list(pyprom.lib.locations.base_coordinate.BaseCoordinate)
to_dict()[source]

Create the dictionary representation of this object.

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