dask_geopandas.GeoSeries.centroid#
- property GeoSeries.centroid#
Return a
GeoSeriesof points representing the centroid of each geometry.This docstring was copied from geopandas.base.GeoPandasBase.centroid.
Some inconsistencies with the Dask version may exist.
Note that centroid does not have to be on or within original geometry.
See also
GeoSeries.representative_pointpoint guaranteed to be within each geometry
Examples
>>> from shapely.geometry import Polygon, LineString, Point >>> s = geopandas.GeoSeries( ... [ ... Polygon([(0, 0), (1, 1), (0, 1)]), ... LineString([(0, 0), (1, 1), (1, 0)]), ... Point(0, 0), ... ] ... ) >>> s 0 POLYGON ((0 0, 1 1, 0 1, 0 0)) 1 LINESTRING (0 0, 1 1, 1 0) 2 POINT (0 0) dtype: geometry
>>> s.centroid 0 POINT (0.33333 0.66667) 1 POINT (0.70711 0.5) 2 POINT (0 0) dtype: geometry