gemgis.vector.create_buffer
gemgis.vector.create_buffer#
- gemgis.vector.create_buffer(geom_object: shapely.geometry.base.BaseGeometry, distance: Union[float, int]) shapely.geometry.polygon.Polygon #
Creating a buffer around a Shapely LineString or a Point
- Parameters
geom_object (shapely.geometry.base.BaseGeometry) – Shapely LineString or Point, e.g.
geom_object=Point(0, 0)
distance (float, int) – Distance of the buffer around the geometry object, e.g.
distance=10
- Returns
polygon – Polygon representing the buffered area around a geometry object
- Return type
shapely.geometry.polygon.Polygon
New in version 1.0.x.
Example
>>> # Loading Libraries and creating Point >>> import gemgis as gg >>> from shapely.geometry import Point >>> point = Point(0,0) >>> point.wkt 'POINT (0 0)'
>>> # Creating Buffer around Point >>> point_buffered = gg.vector.create_buffer(geom_object=point, distance=10) >>> point_buffered.wkt 'POLYGON ((100 0, 99.5184726672197 -9.801714032956051, 98.07852804032305 -19.50903220161281, 95.69403357322089 -29.02846772544621, 92.38795325112869 -38.26834323650894, 88.19212643483553...))'
See also
create_unified_buffer
Creating a unified buffer around Shapely LineStrings or Points