Geos ExtensionArray#

class pgpd.GeosArray(data)#
dtype = <pgpd._array.GeosDtype object>#

Dtype for this ExtensionArray

ndim = 1#

Number of dimensions of this ExtensionArray

Serialization#

Serialization & Deserialization functionality.

GeosArray.__init__

Create a GeosArray from Shapely data.

GeosArray.from_wkb

Create a GeosArray from WKB data.

GeosArray.from_wkt

Create a GeosArray from WKT data.

GeosArray.to_wkb

Transform the GeosArray to a NumPy array of WKB bytes.

GeosArray.to_wkt

Transform the GeosArray to a NumPy array of WKT strings.

ExtensionArray Specific#

Necessary methods for the ExtensionArray.

GeosArray._from_sequence

Construct a new ExtensionArray from a sequence of scalars.

GeosArray._values_for_factorize

Return an array and missing value suitable for factorization.

GeosArray._from_factorized

Reconstruct an ExtensionArray after factorization.

GeosArray.__getitem__

Select a subset of self.

GeosArray.__setitem__

Set one or more values inplace.

GeosArray.__len__

Length of this array

GeosArray.__eq__

Return for self == other (element-wise equality).

GeosArray.dtype

Dtype for this ExtensionArray

GeosArray.nbytes

The number of bytes needed to store this object in memory.

GeosArray.isna

A 1-D array indicating if each value is missing.

GeosArray.take

Take elements from an array.

GeosArray.copy

Return a copy of the array.

GeosArray._concat_same_type

Concatenate multiple array of this dtype.

GeosArray._values_for_argsort

Return values for sorting.

NumPy Specific#

Methods to make the GeosArray a NumPy Array Container.

GeosArray.size

The number of elements in the array.

GeosArray.shape

Return a tuple of the array dimensions.

GeosArray.__array__

Return internal NumPy array.

Custom#

Custom methods to add more functionality.

GeosArray.affine

Performs a 2D or 3D affine transformation on all the coordinates.

GeosArray.__add__

Performs an addition between the coordinates array and other.

GeosArray.__sub__

Performs a subtraction between the coordinates array and other.

GeosArray.__mul__

Performs a multiplication between the coordinates array and other.

GeosArray.__truediv__

Performs a division between the coordinates array and other.

GeosArray.__floordiv__

Performs a division between the coordinates array and other.