geopandas.GeoSeries.extract_unique_points#
- GeoSeries.extract_unique_points()[source]#
Returns a
GeoSeries
of MultiPoints representing all distinct vertices of an input geometry.See also
GeoSeries.get_coordinates
extract coordinates as a
DataFrame
Examples
>>> 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