Skip to content

Commit

Permalink
Format explode_geometry_collection
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderJuestel committed Jul 28, 2024
1 parent e5713f3 commit e73687f
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 @@ -3108,22 +3108,24 @@ def explode_polygons(
def explode_geometry_collection(
collection: shapely.geometry.collection.GeometryCollection,
) -> List[shapely.geometry.base.BaseGeometry]:
"""Exploding a Shapely Geometry Collection to a List of Base Geometries
"""Explode a Shapely Geometry Collection to a List of Base Geometries.
Parameters
__________
collection : shapely.geometry.collection.GeometryCollection
Shapely Geometry Collection consisting of different Base Geometries
Shapely Geometry Collection consisting of different Base Geometries.
Returns
_______
collection_exploded : List[shapely.geometry.base.BaseGeometry]
List of Base Geometries from the original Geometry Collection
List of Base Geometries from the original Geometry Collection.
.. versionadded:: 1.0.x
.. versionchanged:: 1.2
Example
_______
Expand Down Expand Up @@ -3153,10 +3155,9 @@ def explode_geometry_collection(
See Also
________
explode_geometry_collections : Exploding a GeoDataFrame containing different Base Geometries
explode_geometry_collections : Explode a GeoDataFrame containing different Base Geometries
"""

# Checking that the Geometry Collection is a Shapely Geometry Collection
if not isinstance(collection, shapely.geometry.collection.GeometryCollection):
raise TypeError("Geometry Collection must be a Shapely Geometry Collection")
Expand Down

0 comments on commit e73687f

Please sign in to comment.