geopandas.GeoSeries.envelope#
- property GeoSeries.envelope#
返回一个
GeoSeries
表示每个几何图形的包络的几何图形。几何图形的包络是边界矩形。也就是说,包含几何体的点或最小矩形多边形(其边平行于坐标轴)。
参见
示例
>>> 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