geopandas.GeoSeries.envelope#
- property GeoSeries.envelope[source]#
Returns a
GeoSeries
of geometries representing the envelope of each geometry.The envelope of a geometry is the bounding rectangle. That is, the point or smallest rectangular polygon (with sides parallel to the coordinate axes) that contains the geometry.
See also
GeoSeries.convex_hull
convex hull geometry
Examples
>>> from shapely.geometry import Polygon, LineString, Point, MultiPoint >>> s = geopandas.GeoSeries( ... [ ... Polygon([(0, 0), (1, 1), (0, 1)]), ... LineString([(0, 0), (1, 1), (1, 0)]), ... MultiPoint([(0, 0), (1, 1)]), ... Point(0, 0), ... ] ... ) >>> s 0 POLYGON ((0 0, 1 1, 0 1, 0 0)) 1 LINESTRING (0 0, 1 1, 1 0) 2 MULTIPOINT ((0 0), (1 1)) 3 POINT (0 0) dtype: geometry
>>> s.envelope 0 POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)) 1 POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)) 2 POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)) 3 POINT (0 0) dtype: geometry