geopandas.GeoSeries.reverse#
- GeoSeries.reverse()[source]#
Returns a
GeoSeries
with the order of coordinates reversed.See also
GeoSeries.normalize
normalize order of coordinates
Examples
>>> from shapely.geometry import Polygon, LineString, Point >>> s = geopandas.GeoSeries( ... [ ... Polygon([(0, 0), (1, 1), (0, 1)]), ... LineString([(0, 0), (1, 1), (1, 0)]), ... Point(0, 0), ... ] ... ) >>> s 0 POLYGON ((0 0, 1 1, 0 1, 0 0)) 1 LINESTRING (0 0, 1 1, 1 0) 2 POINT (0 0) dtype: geometry
>>> s.reverse() 0 POLYGON ((0 0, 0 1, 1 1, 0 0)) 1 LINESTRING (1 0, 1 1, 0 0) 2 POINT (0 0) dtype: geometry