Skip to main content

LineString

This class represents a linear geometry composed of a sequence of points. It provides methods to access individual points by index, retrieve coordinate dimensions, and export the geometry as a tuple of coordinates. The class also supports extracting separate lists for X, Y, Z, and M coordinate components.

Attributes

AttributeTypeDescription
coordstupleReturn the tuple representation of this LineString.

Methods


tuple()

@classmethod
def tuple() - > tuple

Return the tuple representation of this LineString.

Returns

TypeDescription
tupleA nested tuple where each element is a coordinate tuple representing a point in the line.

x()

@classmethod
def x() - > list

Return the X coordinates in a list.

Returns

TypeDescription
listA list of floating-point values representing the X-coordinates of all points in the LineString.

y()

@classmethod
def y() - > list

Return the Y coordinates in a list.

Returns

TypeDescription
listA list of floating-point values representing the Y-coordinates of all points in the LineString.

z()

@classmethod
def z() - > list | None

Return the Z coordinates in a list.

Returns

TypeDescription
`listNone`

m()

@classmethod
def m() - > list | None

Return the M coordinates in a list.

Returns

TypeDescription
`listNone`