pyinterp.geodetic.LineString#

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.

Parameters:
  • 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.

from_geojson(array)

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.

read_wkt(wkt)

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

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

Simplifies this linestring using the Douglas-Peucker algorithm.

to_geojson(self)

Return the line string as a GeoJSON type.

wkt(self)

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

Special Methods

__copy__(self)

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.

__getstate__(self)

__iter__(self)

__len__(self)

Called to implement the built-in function len()

__ne__(self, other)

Overrides the default behavior of the != operator.

__repr__(self)

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

__setstate__(self, arg0)