__init__#

GeosArray.__init__(data)#

Create a GeosArray from Shapely data.

Parameters:

data (Iterable) – Shapely data (see Note)

Returns:

Data wrapped in a GeosArray.

Return type:

pgpd.GeosArray

Raises:

ValueError – data is not of correct type

Note

The data argument can be one of different types:

  • GeosArray

    Shallow copy of the internal data.

  • None or shapely.lib.Geometry

    Wrap data in an array.

  • Iterable of shapely.lib.Geometry

    use np.asarray(data).