pyinterp.geodetic.LineString#
- class pyinterp.geodetic.LineString(self, lon: numpy.ndarray[tuple[int], numpy.dtype[numpy.float64]], lat: numpy.ndarray[tuple[int], numpy.dtype[numpy.float64]])#
Bases:
pybind11_objectCreate a linestring as a collection of points.
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])Compute 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])Simplify this linestring using the Douglas-Peucker algorithm.
to_geojson(self)Return the line string as a GeoJSON type.
wkt(self)Get the OGC Well-Known Text (WKT) representation of this instance.
Special Methods
__copy__(self)Implement the shallow copy operation.
__eq__(self, other)Override the default behavior of the
==operator.__getitem__(self, index)Return the point at the given index.
__getstate__(self, /)__iter__(self)__len__(self)Return the length of the linestring.
__ne__(self, other)Override the default behavior of the
!=operator.__repr__(self)Return the string representation of this linestring.
__setstate__(self, arg0)