GeoPandas
Description
What's Changed
New features and improvements:
Static plotting in GeoPandas has been re-implemented. The new tooling shall be mostly backwards compatible while bringing a set of enhancements:
- Categorical plotting now allows dict-based mapping of categories to colors and other styles.
- Legends now reflect the geometry type and complete set of styles, not just a color.
- Plotting of continuous variables with a classification scheme can now produce
a colorbar instead of a categorical legend when using
colorbar=Truewithinlegend_kwds. vminandvmaxkeywords are supported whenschemeis defined, not ignored.- When using categorical colormap with categorical plots, colors are now assigned in order to optimize the contrast of the resulting map.
- Colorbar size is automatically adjusted to be approximately the size of the plot.
- Colorbar now indicates extensions if the
vminand/orvmaxclip the values. - Legends are created automatically by matplotlib. This also means that you can
create a single legend from a layered map by calling
ax.legend()directly. - GeoPandas now labels axes using the information on units from CRS. This can be
controlled via the
add_labelskeyword. - Static plots can include a basemap defined by the
tileskeyword, exposingcontextily.add_basemapfrom within theplotmethod. Requirescontextilypackage to be installed. schemekeyword can take a value"greedy"resulting in a greedy (topological) coloring where no two adjacent polygons share a color. Requiresmapclassifyandlibpysalpackages.
The related refactoring of the plotting infrastructure has changed the internal representation of the figure generated by GeoPandas. This can be considered a breaking change if you rely the composition of collections, as that has changed. A number of plotting-related bugs has been fixed along as a side effect. All changes are reflected in an updated user guide. (#3708, #3728, #3748, #3752, #3753, #3763, #3767, #3689).
GeoParquet improvements:
- The upcoming GeoParquet 2.0 specification is now supported for both writing and reading (#3632).
read_parquetnow support direct reading from HTTP/HTTPS protocols (#3699).GeoDataFrame.to_parquetandread_parquetwill now write and readattrsrespectively (#3597).
Added
geopandas.make_gridandGeoSeries.make_gridto generate a square or hexagonal grids covering the input geometry (#2062).Added
geopandas.read_file_infoto expose information about file layers, including layer metadata (this is an alias forpyogrio.read_info) (#3759).Add
grid_sizeparameter tounion,difference,symmetric_differenceandintersection(#3593).Document how to access the feature ID (
fid) as the index when reading files withread_fileand the pyogrio engine, usingfid_as_index=True(#3829).
Deprecations and compatibility notes:
- The
resolutionkeyword tobufferhas been deprecated to align with the convention in shapely,quad_segsshould be used instead (#3600). - Expired deprecations: option
use_pygeoswhich had no functionality,seedkeyword in sample_points (replaced byrng) (#3613).
Bug fixes:
- Fix
GeoSeries.sample_pointslooping without end on zero-area polygons, such as a collapsed ring; it now returns an emptyMultiPoint, as it already did for empty and missing geometries (#3851). - Fix
read_parquetignoring thepartitioningkeyword when auto-detecting the columns to read, so thatpartitioning=Noneno longer raises (#3459). - Fix
GeoDataFrame.explode()raising a cryptic error when passing multiple (non-geometry) columns; it now falls back to the pandas multi-column explode (#2753). - Fix
GeoDataFrame.from_featuresraising aValueErrorfor an empty list of features when acrsis provided; it now returns an emptyGeoDataFramewith ageometrycolumn (#3777). - Fix the index level of the parts created by
explode(index_parts=True)andget_coordinates(index_parts=True)beingint32instead ofint64on 32-bit platforms (#3865). - Various compatibility fixes for pandas 3.1 (#3802, #3831).
Community:
- GeoPandas now uses the NumFOCUS Code of Conduct.
- GeoPandas has a new software paper which can be used as canonical citation, see https://geopandas.org/en/latest/about/citing.html
Notes on dependencies:
- GeoPandas 1.2 now requires Python 3.11 or greater and pandas 2.2, numpy 2.0, pyproj 3.7, and shapely 2.1, are now the minimum required version for these dependencies. Furthermore, the minimum tested version for optional dependencies has been updated to fiona 1.8.21, scipy 1.9, matplotlib 3.9, mapclassify 2.7 folium 0.15, pyarrow 15.0 and SQLAlchemy 2.0. Older versions of these libraries may continue to work, but are no longer considered supported (#3371, #3581).
Acknowledgments
Thanks to everyone who contributed to this release! People with a "+" by their names contributed a patch for the first time.
- Achim Gädke +
- Adam J. Stewart
- Alina Cherkas +
- Alon +
- Ammar Yasser Abdel-Azim Ahmed +
- Barış Öztaş +
- Bas Couwenberg +
- CaptainInler +
- Christine P. Chai
- Dylan Pulver +
- Egor Sanin +
- Giacomo Caria
- Hans Then +
- James Gaboardi
- Joris Van den Bossche
- Julia Signell
- Karl Hill +
- Kavin +
- Khaled Hammami +
- KshitijAucharmal +
- Madhav-C +
- Martin Fleischmann
- Matt Richards
- Matteo Ghetta +
- Mike Taves
- Neil +
- Nicholas YS Tan
- Peter Nguyen +
- Pieter Roggemans
- Recoordinate +
- Ruth Comer +
- Sebastian Cao +
- Sergio P +
- Steve Berdy
- Vikram Kumar +
- Volodymyr Borysenko +
- Yunus AYDIN +
- bretttully
- janmanuelwinkler +
- moss-xyz
- yamayuki-hub +
New Contributors
- @HammamiKhaled made their first contribution in https://github.com/geopandas/geopandas/pull/3610
- @kshitijaucharmal made their first contribution in https://github.com/geopandas/geopandas/pull/3614
- @petern48 made their first contribution in https://github.com/geopandas/geopandas/pull/3619
- @alinacherkas made their first contribution in https://github.com/geopandas/geopandas/pull/3599
- @rcomer made their first contribution in https://github.com/geopandas/geopandas/pull/3636
- @sape94 made their first contribution in https://github.com/geopandas/geopandas/pull/3630
- @kavin160100 made their first contribution in https://github.com/geopandas/geopandas/pull/3674
- @hansthen made their first contribution in https://github.com/geopandas/geopandas/pull/3691
- @aydinnyunus made their first contribution in https://github.com/geopandas/geopandas/pull/3681
- @egorbn made their first contribution in https://github.com/geopandas/geopandas/pull/3684
- @sebastic made their first contribution in https://github.com/geopandas/geopandas/pull/3704
- @yamayuki-hub made their first contribution in https://github.com/geopandas/geopandas/pull/3716
- @AchimGaedkeLynker made their first contribution in https://github.com/geopandas/geopandas/pull/3722
- @vkverma9534 made their first contribution in https://github.com/geopandas/geopandas/pull/3719
- @ghtmtt made their first contribution in https://github.com/geopandas/geopandas/pull/3739
- @AmmarYasser455 made their first contribution in https://github.com/geopandas/geopandas/pull/3723
- @madhavcodez made their first contribution in https://github.com/geopandas/geopandas/pull/3784
- @CaptainInler made their first contribution in https://github.com/geopandas/geopandas/pull/3815
- @latent-9 made their first contribution in https://github.com/geopandas/geopandas/pull/3826
- @alonfaraj made their first contribution in https://github.com/geopandas/geopandas/pull/3834
- @nS-101 made their first contribution in https://github.com/geopandas/geopandas/pull/3829
- @cycsmail made their first contribution in https://github.com/geopandas/geopandas/pull/3813
- @barisoztas made their first contribution in https://github.com/geopandas/geopandas/pull/3792
- @karlhillx made their first contribution in https://github.com/geopandas/geopandas/pull/3811
- @dylanpulver made their first contribution in https://github.com/geopandas/geopandas/pull/3839
- @janmanuelwinkler made their first contribution in https://github.com/geopandas/geopandas/pull/2197
- @VolodymyrLinuxovich made their first contribution in https://github.com/geopandas/geopandas/pull/3871
Full Changelog: https://github.com/geopandas/geopandas/compare/v1.1.0...v1.2.0
Notes
Files
geopandas/geopandas-v1.2.0.zip
Additional details
Related works
- Is supplement to
- Software: https://github.com/geopandas/geopandas/tree/v1.2.0 (URL)
Software
- Repository URL
- https://github.com/geopandas/geopandas