Skip to content

Commit c6e403b

Browse files
Format remove_objects_within_buffer
1 parent 4f984d9 commit c6e403b

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

gemgis/vector.py

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4817,7 +4817,6 @@ def remove_object_within_buffer(
48174817
remove_interfaces_within_fault_buffers : Remove interfaces of layer boundaries within fault line buffers
48184818
48194819
"""
4820-
48214820
# Checking that the buffer object is a Shapely Point or LineString
48224821
if not isinstance(buffer_object, shapely.geometry.base.BaseGeometry):
48234822
raise TypeError("Buffer object must be a Shapely Point or LineString")
@@ -4877,48 +4876,50 @@ def remove_objects_within_buffer(
48774876
Union[List[shapely.geometry.base.BaseGeometry], gpd.geodataframe.GeoDataFrame],
48784877
Union[List[shapely.geometry.base.BaseGeometry], gpd.geodataframe.GeoDataFrame],
48794878
]:
4880-
"""Removing objects from a buffered object by providing a distance
4879+
"""Remove objects from a buffered object by providing a distance.
48814880
48824881
Parameters
48834882
__________
48844883
48854884
buffer_object : shapely.geometry.base.BaseGeometry
4886-
Shapely object for which a buffer will be created, e.g. ``buffer_object=Point(0, 0)``
4885+
Shapely object for which a buffer will be created, e.g. ``buffer_object=Point(0, 0)``.
48874886
48884887
buffered_object_gdf: Union[gpd.geodataframe.GeoDataFrame, List[shapely.geometry.base.BaseGeometry]]
48894888
GeoDataFrame or List of Base Geometries containing Shapely objects that will be buffered by the buffer
4890-
object
4889+
object.
48914890
4892-
distance : float, int
4893-
Distance of the buffer around the geometry object, e.g. ``distance=10``
4891+
distance : float, int, default: ``10``
4892+
Distance of the buffer around the geometry object, e.g. ``distance=10``.
48944893
4895-
return_gdfs : bool
4894+
return_gdfs : bool, default: ``False``
48964895
Variable to create GeoDataFrames of the created list of Shapely Objects.
4897-
Options include: ``True`` or ``False``, default set to ``False``
4896+
Options include: ``True`` or ``False``, default set to ``False``.
48984897
4899-
remove_empty_geometries : bool
4898+
remove_empty_geometries : bool, default: ``False``
49004899
Variable to remove empty geometries.
4901-
Options include: ``True`` or ``False``, default set to ``False``
4900+
Options include: ``True`` or ``False``, default set to ``False``.
49024901
4903-
extract_coordinates : bool
4902+
extract_coordinates : bool, default: ``False``
49044903
Variable to extract X and Y coordinates from resulting Shapely Objects.
4905-
Options include: ``True`` or ``False``, default set to ``False``
4904+
Options include: ``True`` or ``False``, default set to ``False``.
49064905
4907-
buffer : bool
4906+
buffer : bool, default: ``True``
49084907
Variable to create a buffer.
4909-
Options include: ``True`` or ``False``, default set to ``True``
4908+
Options include: ``True`` or ``False``, default set to ``True``.
49104909
49114910
Returns
49124911
_______
49134912
49144913
result_out : list, gpd.geodataframe.GeoDataFrame
4915-
List or GeoDataFrame of Shapely objects that remain after the buffering (outside the buffer)
4914+
List or GeoDataFrame of Shapely objects that remain after the buffering (outside the buffer).
49164915
49174916
result_in : list, gpd.geodataframe.GeoDataFrame
4918-
List or GeoDataFrame of Shapely objects that was buffered (inside the buffer)
4917+
List or GeoDataFrame of Shapely objects that was buffered (inside the buffer).
49194918
49204919
.. versionadded:: 1.0.x
49214920
4921+
.. versionchanged:: 1.2
4922+
49224923
Example
49234924
_______
49244925
@@ -4939,7 +4940,7 @@ def remove_objects_within_buffer(
49394940
>>> linestring2.wkt
49404941
'LINESTRING (0 0, 10 10, 20 20)'
49414942
4942-
>>> # Create list of buffer objects
4943+
>>> # Creating list of buffer objects
49434944
>>> buffer_objects = [linestring1, linestring2]
49444945
49454946
>>> # Removing objects within buffer
@@ -4958,8 +4959,8 @@ def remove_objects_within_buffer(
49584959
See Also
49594960
________
49604961
4961-
remove_object_within_buffer : Removing one object from one buffered object
4962-
remove_interfaces_within_fault_buffers : Removing interfaces of layer boundaries within fault line buffers
4962+
remove_object_within_buffer : Remove one object from one buffered object
4963+
remove_interfaces_within_fault_buffers : Remove interfaces of layer boundaries within fault line buffers
49634964
49644965
"""
49654966

0 commit comments

Comments
 (0)