class pyinterp.geodetic.LineString(self, lon: numpy.ndarray, lat: numpy.ndarray)#

Bases: pybind11_object

A linestring (named so by OGC) is a collection of points.

  • lon – Longitudes coordinates in degrees.

  • lat – Latitude coordinates in degrees.

Public Methods

append(self, point)

Appends a point to this instance.

closest_point(*args, **kwargs)

Overloaded function.

curvilinear_distance(self[, strategy, wgs])

Computes the curvilinear distance between the points of this instance.


Creates a line string from a GeoJSON coordinates array.

intersection(*args, **kwargs)

Overloaded function.

intersects(self, rhs[, wgs])

Test if this linestring intersects with another linestring.


Parses OGC Well-Known Text (WKT) into a LineString.

simplify(self, tolerance[, strategy, wgs])

Simplifies this linestring using the Douglas-Peucker algorithm.


Return the line string as a GeoJSON type.


Gets the OGC Well-Known Text (WKT) representation of this instance.

Special Methods


Implements the shallow copy operation.

__eq__(self, other)

Overrides the default behavior of the == operator.

__getitem__(self, index)

Returns the point at the given index.




Called to implement the built-in function len()

__ne__(self, other)

Overrides the default behavior of the != operator.


Called by the repr() built-in function to compute the string representation of a point.

__setstate__(self, arg0)