From 29e819911710e8b7904a331f1c6f14efdd6cd85c Mon Sep 17 00:00:00 2001 From: AlexanderJuestel Date: Sun, 28 Jul 2024 12:30:43 +0200 Subject: [PATCH] Format explode_linestring --- gemgis/vector.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gemgis/vector.py b/gemgis/vector.py index cdb82bc4..b7dcb612 100644 --- a/gemgis/vector.py +++ b/gemgis/vector.py @@ -2564,23 +2564,25 @@ def extract_xyz( def explode_linestring( linestring: shapely.geometry.linestring.LineString, ) -> List[shapely.geometry.point.Point]: - """Exploding a LineString to its vertices, also works for LineStrings with Z components + """Explode a LineString to its vertices, also works for LineStrings with Z components. Parameters __________ linestring : shapely.geometry.linestring.LineString Shapely LineString from which vertices are extracted, - e.g. ``linestring = LineString([(0, 0), (10, 10), (20, 20)])`` + e.g. ``linestring = LineString([(0, 0), (10, 10), (20, 20)])``. Returns _______ points_list : List[shapely.geometry.point.Point] - List of extracted Shapely Points + List of extracted Shapely Points. .. versionadded:: 1.0.x + .. versionchanged:: 1.2 + Example _______ @@ -2613,10 +2615,9 @@ def explode_linestring( See Also ________ - explode_linestring_to_elements : Exploding a LineString with more than two vertices into single LineStrings + explode_linestring_to_elements : Explode a LineString with more than two vertices into single LineStrings """ - # Checking that the input geometry is a Shapely LineString if not isinstance(linestring, shapely.geometry.linestring.LineString): raise TypeError("Input geometry must be a Shapely LineString")