pyinterp.geometry.geographic.MultiPoint

Contents

pyinterp.geometry.geographic.MultiPoint#

class pyinterp.geometry.geographic.MultiPoint(self, points: collections.abc.Sequence[pyinterp.core.geometry.geographic.Point] | None = None)#
class pyinterp.geometry.geographic.MultiPoint(self, lons: numpy.ndarray[dtype=float64, shape=(*), writable=False], lats: numpy.ndarray[dtype=float64, shape=(*), writable=False])

Bases: object

A collection of points in geographic coordinates.

Behaves like a Python container of Point objects.

Overloaded function.

  1. __init__(self, points: collections.abc.Sequence[pyinterp.core.geometry.geographic.Point] | None = None) -> None

Construct a multipoint from an optional sequence of points.

Parameters:

points – Optional sequence of Point objects.

  1. __init__(self, lons: numpy.ndarray[dtype=float64, shape=(*), writable=False], lats: numpy.ndarray[dtype=float64, shape=(*), writable=False]) -> None

Construct a multipoint from separate longitude and latitude arrays.

Parameters:
  • lons – Longitude array.

  • lats – Latitude array.

Attributes

points

View over points bound to multipoint lifetime.

Public Methods

append(self, pt)

Append a point to the collection.

clear(self)

Remove all points from the collection.

Special Methods

__bool__(self)

Return True if not empty.

__eq__(self, other)

Check if two multipoints are equal.

__getitem__(self, arg, /)

Get point at index.

__getstate__(self)

Return the serialized state for pickling.

__iter__(self)

Iterate over points.

__len__(self)

Number of points.

__ne__(self, other)

Check if two multipoints are not equal.

__new__(*args, **kwargs)

__repr__(self)

Return the official string representation of the multipoint.

__setitem__(self, idx, pt)

Set point at index.

__setstate__(self, state)

Restore the multipoint from the serialized state.

__str__(self)

Return the string representation of the multipoint.