buffer

Contents

buffer#

buffer(vector: GeoDataFrame, buffer_m: float, **kwargs) GeoDataFrame[source]#

Add a buffer on a vector.

gpd.buffer algorithm returning a GeoDataFrame instead of a GeoSeries.

Parameters:
  • vector (gpd.GeoDataFrame) – Input vector

  • buffer_m (int) – Buffer size in meters.

  • **kwargs – Other buffer arguments

Returns:

Buffered vector

Return type:

gpd.GeoDataFrame

Example

>>> lines = vectors.read(r"lines.shp")
>>> lines.area
0    0.0
1    0.0
dtype: float64
>>> lines_buffer = buffer(lines, 10)
>>> lines_buffer.area
0    5695.213033
1    5898.723719
dtype: float64