Skip to content

Commit

Permalink
Format explode_linestring
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderJuestel committed Jul 28, 2024
1 parent c5def25 commit 29e8199
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gemgis/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
_______
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 29e8199

Please sign in to comment.