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)]) ... ], ... crs=3857 ... ) >>> s 0 LINESTRING (0.000 0.000, 0.000 0.000, 1.000 1.... 1 POLYGON ((0.000 0.000, 0.000 0.000, 1.000 1.00... dtype: geometry
>>> s.extract_unique_points() 0 MULTIPOINT (0.000 0.000, 1.000 1.000) 1 MULTIPOINT (0.000 0.000, 1.000 1.000) dtype: geometry