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 containsmultiple :class:`pyprom.lib.locations.base_gridpoint.BaseGridPoint`s.These points are all of equal elevation and neighbor each otherOrthogonally 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 neighborMultiPoint 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 MultiPointto check.Type: MultiPointReturns: 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.BaseGridPointself.point at idx
-
__init__(points, elevation, datamap, perimeter=None)[source]¶ Parameters: - points (list(
pyprom.lib.locations.base_gridpoint.BaseGridPoint)) – list ofpyprom.lib.locations.base_gridpoint.BaseGridPointobjects. These are the inside points that make up a Multipoint. - elevation (int, float) – elevation in meters
- datamap (
pyprom.lib.datamap.DataMap) – datamap which this MultiPoint uses. - perimeter (
pyprom.lib.containers.perimeter.Perimeter) – Perimeter of MultiPoint. These are the points that make up the orthogonally/diagonally connected border of the multipoint outside of the multipoint.
- points (list(
-
__ne__(other)[source]¶ Determines if this object is not equal to another.
Parameters: other – other MultiPointto check.Type: MultiPointReturns: inequality Return type: bool Raises: TypeError if other not of MultiPoint
-
__setitem__(idx, point)[source]¶ Gives MultiPoint list like set capabilities
Parameters: - idx (int) – index value
- point (
pyprom.lib.locations.base_gridpoint.BaseGridPoint) – BaseGridPoint for setitem.
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: - gridPoint (
pyprom.lib.locations.gridpoint.GridPoint) – GridPoint to check. - asSpotElevation (bool) – If True, returns SpotElevation object.
Returns: GridPoint if asSpotElevation == False SpotElevation if asSpotElevation == True
- gridPoint (
-
classmethod
from_dict(multiPointDict, datamap=None)[source]¶ Create this object from dictionary representation
Parameters: - multiPointDict – dict() representation of this
MultiPoint. - datamap (
pyprom.lib.datamap.DataMap) – datamap which this MultiPoint uses.
Returns: a new Multipoint.
Return type: - multiPointDict – dict() representation of this
-
pointsLatLong¶ Returns list() of Container
pyprom.lib.locations.base_gridpoint.BaseGridPointaspyprom.lib.locations.base_coordinate.BaseCoordinateReturns: 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 MultiPointReturn type: dict()
-