pyinterp.geometry.cartesian.MultiLineString

Contents

pyinterp.geometry.cartesian.MultiLineString#

class pyinterp.geometry.cartesian.MultiLineString(self, lines: collections.abc.Sequence[pyinterp.core.geometry.cartesian.LineString] | None = None)#

Bases: object

A collection of linestrings in Cartesian coordinates.

Behaves like a Python container of LineString objects.

Construct a multilinestring from an optional sequence of linestrings.

Parameters:

lines – Optional sequence of LineString objects.

Attributes

lines

View over lines bound to multilinestring lifetime.

Public Methods

append(self, ls)

Append a linestring to the collection.

clear(self)

Remove all linestrings from the collection.

Special Methods

__bool__(self)

Return True if not empty.

__eq__(self, other)

Check if two multilinestrings are equal.

__getitem__(self, arg, /)

Get linestring at index.

__getstate__(self)

Return the state of the MultiLineString for pickling.

__iter__(self)

Iterate over linestrings.

__len__(self)

Number of linestrings.

__ne__(self, other)

Check if two multilinestrings are not equal.

__new__(*args, **kwargs)

__repr__(self)

Return the official string representation of the MultiLineString.

__setitem__(self, idx, ls)

Set linestring at index.

__setstate__(self, state)

Restore the state of the MultiLineString from pickling.

__str__(self)

Return the informal string representation of the MultiLineString.