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
- 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.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.
-
__ne__(other)[source]¶ Determines if this object is not equal to another.
- Parameters
other – other
MultiPointto check.- Type
- Returns
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 (tuple()) – BaseGridPoint or tuple for setitem.
-
__str__()¶ - Returns
String representation of this object
-
__unicode__()¶ - Returns
String representation of this object
-
__weakref__¶ list of weak references to the object (if defined)
-
_check_and_return_incoming_point_type(point)[source]¶ Make sure incoming point type is a tuple with length 2, or explicitly a
pyprom.lib.locations.base_gridpoint.BaseGridPoint- Parameters
point – tuple, or :class:`pyprom.lib.locations.base_gridpoint.BaseGridPoint
- Raises
TypeError if point not of
pyprom.lib.locations.base_gridpoint.BaseGridPointor tuple- Raises
Exception if tuple length != 2
- Returns
tuple(x,y)
-
append(point)[source]¶ Add a BaseGridPoint to this container.
- Parameters
point (tuple) – BaseGridPoint or tuple to add.
- Raises
TypeError if point not of
BaseGridPointor tuple- Raises
Exception if tuple length != 2
-
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
-
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
-
property
pointsLatLong¶ Returns list() of Container
pyprom.lib.locations.base_gridpoint.BaseGridPointaspyprom.lib.locations.base_coordinate.BaseCoordinate- Returns
List of All blob points with lat/long instead of x/y
- Return type
-
points_with_elevation()[source]¶ Returns list of tuples of member points with (x, y, elevation)
- Returns
list(tuple(x, y, ele)))
-
to_dict()[source]¶ Create the dictionary representation of this object.
- Returns
dict() representation of
MultiPoint- Return type
dict()
-