geopandas.GeoSeries.extract_unique_points#
- GeoSeries.extract_unique_points()[来源]#
返回一个
GeoSeries的多点,表示输入几何的所有不同顶点。另请参阅
GeoSeries.get_coordinates提取坐标作为一个
DataFrame
示例
>>> from shapely import LineString, Polygon >>> s = geopandas.GeoSeries( ... [ ... LineString([(0, 0), (0, 0), (1, 1), (1, 1)]), ... Polygon([(0, 0), (0, 0), (1, 1), (1, 1)]) ... ], ... ) >>> s 0 LINESTRING (0 0, 0 0, 1 1, 1 1) 1 POLYGON ((0 0, 0 0, 1 1, 1 1, 0 0)) dtype: geometry
>>> s.extract_unique_points() 0 MULTIPOINT ((0 0), (1 1)) 1 MULTIPOINT ((0 0), (1 1)) dtype: geometry