Highlights of this release:
- A new
sjoin_nearest()
method to join based on proximity, with the
ability to set a maximum search radius (#1865). In addition, thesindex
attribute gained a new method for a "nearest" spatial index query (#1865,
#2053). - A new
explore()
method on GeoDataFrame and GeoSeries with native support
for interactive visualization based on folium / leaflet.js (#1953) - The
geopandas.sjoin()
/overlay()
/clip()
functions are now also
available as methods on the GeoDataFrame (#2141, #1984, #2150).
New features and improvements:
- Add support for pandas'
value_counts()
method for geometry dtype (#2047). - The
explode()
method has a newignore_index
keyword (consistent with
pandas' explode method) to reset the index in the result, and a new
index_parts
keywords to control whether a cumulative count indexing the
parts of the exploded multi-geometries should be added (#1871). points_from_xy()
is now available as a GeoSeries methodfrom_xy
(#1936).- The
to_file()
method will now attempt to detect the driver (if not
specified) based on the extension of the provided filename, instead of
defaulting to ESRI Shapefile (#1609). - Support for the
storage_options
keyword inread_parquet()
for
specifying filesystem-specific options (e.g. for S3) based on fsspec (#2107). - The read/write functions now support
~
(user home directory) expansion (#1876). - Support the
convert_dtypes()
method from pandas to preserve the
GeoDataFrame class (#2115). - Support WKB values in the hex format in
GeoSeries.from_wkb()
(#2106). - Update the
estimate_utm_crs()
method to handle crossing the antimeridian
with pyproj 3.1+ (#2049). - Improved heuristic to decide how many decimals to show in the repr based on
whether the CRS is projected or geographic (#1895). - Switched the default for
geocode()
from GeoCode.Farm to the Photon
geocoding API (https://photon.komoot.io) (#2007).
Deprecations and compatibility notes:
- The
op=
keyword ofsjoin()
to indicate which spatial predicate to use
for joining is being deprecated and renamed in favor of a newpredicate=
keyword (#1626). - The
cascaded_union
attribute is deprecated, useunary_union
instead (#2074). - Constructing a GeoDataFrame with a duplicated "geometry" column is now
disallowed. This can also raise an error in thepd.concat(.., axis=1)
function if this results in duplicated active geometry columns (#2046). - The
explode()
method currently returns a GeoSeries/GeoDataFrame with a
MultiIndex, with an additional level with indices of the parts of the
exploded multi-geometries. For consistency with pandas, this will change in
the future and the newindex_parts
keyword is added to control this.
Bug fixes:
- Fix in the
clip()
function to correctly clip MultiPoints instead of
leaving them intact when partly outside of the clip bounds (#2148). - Fix
GeoSeries.isna()
to correctly return a boolean Series in case of an
empty GeoSeries (#2073). - Fix the GeoDataFrame constructor to preserve the geometry name when the
argument is already a GeoDataFrame object (i.e.GeoDataFrame(gdf)
) (#2138). - Fix loss of the values' CRS when setting those values as a column
(GeoDataFrame.__setitem__
) (#1963) - Fix in
GeoDataFrame.apply()
to preserve the active geometry column name
(#1955). - Fix in
sjoin()
to not ignore the suffixes in case of a right-join
(how="right
) (#2065). - Fix
GeoDataFrame.explode()
with a MultiIndex (#1945). - Fix the handling of missing values in
to/from_wkb
andto_from_wkt
(#1891). - Fix
to_file()
andto_json()
when DataFrame has duplicate columns to
raise an error (#1900). - Fix bug in the colors shown with user-defined classification scheme (#2019).
- Fix handling of the
path_effects
keyword inplot()
(#2127). - Fix
GeoDataFrame.explode()
to preserveattrs
(#1935)
Notes on (optional) dependencies:
- GeoPandas 0.9.0 dropped support for Python 3.6 and pandas 0.24. Further,
the minimum required versions are numpy 1.18, shapely 1.6, fiona 1.8,
matplotlib 3.1 and pyproj 2.2. - Plotting with a classification schema now requires mapclassify version >=
2.4 (#1737). - Compatibility fixes for the latest numpy in combination with Shapely 1.7 (#2072)
- Compatibility fixes for the upcoming Shapely 1.8 (#2087).
- Compatibility fixes for the latest PyGEOS (#1872, #2014) and matplotlib
Acknowledgments
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.
- Adrian Garcia Badaracco
- Alan D. Snow
- Alison Hopkin +
- Andreas Eliasson +
- Ariel Núñez +
- Brendan Ward
- Daniel Mesejo-León +
- Flavin
- Imanol
- James A. Bednar +
- James McBride
- James Myatt +
- John Flavin +
- Joris Van den Bossche
- Martin Fleischmann
- Matt Richards +
- Matthew Law +
- Mike Taves
- Murat Can Üste +
- Qiusheng Wu +
- Ray Bell +
- TLouf +
- Tom Augspurger +
- Tom Russell +
- Zero +
- danielpallen +
- m-richards +
- simberaj +
- standakozak +