GeoPandas 0.9.0 features a long list of new features, enhancements and bug fixes, see the full list below. In addition, there are many documentation improvements and a restyled and restructured website with a new logo (#1564, #1579, #1617, #1668, #1731, #1750, #1757, #1759).
New features and improvements:
geopandas.read_filefunction now accepts more general file-like objects (e.g.
fsspecopen file objects). It will now also automatically recognize zipped files (#1535).
GeoDataFrame.plot()method now provides access to the pandas plotting functionality for the non-geometry columns, either using the
kindkeyword or the accessor method (e.g.
to_wkb()methods for GeoSeries to construct a GeoSeries from geometries in WKT or WKB representation, or to convert a GeoSeries to a pandas Seriew with WKT or WKB values (#1710).
GeoSeries.zattribute to access the z-coordinates of Point geometries (similar to the existing
to_crs()method now handles missing values (#1618).
dissolve()method now allows dissolving by no column (
by=None) to create a union of all geometries (single-row GeoDataFrame) (#1568).
estimate_utm_crs()method on GeoSeries/GeoDataFrame to determine the UTM CRS based on the bounds (#1646).
geopandas.read_postgis()now supports both sqlalchemy engine and connection objects (#1638).
GeoDataFrame.explode()method now allows exploding based on a non-geometry column, using the pandas implementation (#1720).
GeoDataFrame/GeoSeries.explode()when using the PyGEOS backend (#1693).
intersects()) have a new
alignkeyword which allows optionally not aligning on the index before performing the operation with
GeoDataFrame.dissolve()method now supports all relevant keywords of
groupby(), i.e. the
geopandas.overlay()function now accepts
make_valid=Falseto skip the step to ensure the input geometries are valid using
GeoDataFrame.to_json()method gained a
drop_idkeyword to optionally not write the GeoDataFrame's index as the "id" field in the resulting JSON (#1637).
aspectkeyword in the plotting methods to optionally allow retaining the original aspect (#1512)
intervalkeyword in the
legend_kwdsgroup of the
plot()method to control the appearance of the legend labels when using a classification scheme (#1605).
sindexattribute) is now stored on the underlying array. This ensures that the spatial index is preserved in more operations where possible, and that multiple geometry columns of a GeoDataFrame can each have a spatial index (#1444).
has_sindexattribute on the GeoSeries/GeoDataFrame to check if a spatial index has already been initialized (#1627).
assert_geodataframe_equal()testing utilities now have a
normalizekeyword (False by default) to normalize geometries before comparing for equality (#1826). Those functions now also give a more informative error message when failing (#1808).
Deprecations and compatibility notes:
is_ringattribute currently returns True for Polygons. In the future, this will be False (#1631). In addition, start to check it for LineStrings and LinearRings (instead of always returning False).
objectskeyword in the
intersection()method of the
GeoDataFrame/GeoSeries.sindexspatial index object has been removed (#1444).
plot()method raising an error with empty geometries (#1702, #1828).
geopandas.overlay()to preserve geometries of the correct type which are nested within a GeometryCollection as a result of the overlay operation (#1582). In addition, a warning will now be raised if geometries of different type are dropped from the result (#1554).
.crsfor empty GeoDataFrames (#1560).
geopandas.clipto preserve the correct geometry column name (#1566).
plot()method when using
legend_kwdswith multiple subplots (#1583)
missing_kwdskeyword of the
plot()method when there are no areas with missing data (#1600).
plot()method to correctly align values passed to the
columnkeyword as a pandas Series (#1670).
rename_geometry()method now raises a more informative error message when a duplicate column name is used (#1602).
explode()method to preserve the CRS (#1655)
GeoSeries.apply()method to again accept the
convert_dtypekeyword to be consistent with pandas (#1636).
GeoDataFrame.apply()to preserve the CRS when possible (#1848).
geom in geoseries(#1753).
shift()method of a GeoSeries/GeoDataFrame now preserves the CRS (#1744).
GeoSeriesconstructor without passing data but only an index (#1798).
Notes on (optional) dependencies:
descartespackage is no longer required for plotting polygons. This functionality is now included by default in GeoPandas itself, when matplotlib is available (#1677).
to_file. This means you can now force geopandas to install without fiona installed (although it is still a default requirement) (#1775).
Thanks to everyone who contributed to this release!
A total of 29 people contributed patches to this release. People with a "+" by their names contributed a patch for the first time.