geopandas.GeoSeries.envelope¶
- property GeoSeries.envelope¶
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.00000 0.00000, 1.00000 1.00000, 0.... 1 LINESTRING (0.00000 0.00000, 1.00000 1.00000, ... 2 MULTIPOINT (0.00000 0.00000, 1.00000 1.00000) 3 POINT (0.00000 0.00000) dtype: geometry
>>> s.envelope 0 POLYGON ((0.00000 0.00000, 1.00000 0.00000, 1.... 1 POLYGON ((0.00000 0.00000, 1.00000 0.00000, 1.... 2 POLYGON ((0.00000 0.00000, 1.00000 0.00000, 1.... 3 POINT (0.00000 0.00000) dtype: geometry