网页 综合 更新时间 2026-11-15 00:10:01

Changelog — GeoPandas 1.2.1.dev0+g199fc53c8.d20260928 documentation

自动蜘蛛 geopandas.org 正文约 5057 字
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=True within legend_kwds.
vmin and vmax keywords are supported when scheme is 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 vmin and/or vmax clip 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_labels keyword.
Static plots can include a basemap defined by the tiles keyword, exposing contextily.add_basemap from within the plot method. Requires contextily package to be installed.
scheme keyword can take a value "greedy" resulting in a greedy (topological) coloring where no two adjacent polygons share a color. Requires mapclassify and libpysal packages.
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_parquet now support direct reading from HTTP/HTTPS protocols (#3699).
GeoDataFrame.to_parquet and read_parquet will now write and read attrs respectively (#3597).
Added geopandas.make_grid and GeoSeries.make_grid to generate a square or hexagonal grids covering the input geometry (#2062).
Added geopandas.read_file_info to expose information about file layers, including layer metadata (this is an alias for pyogrio.read_info) (#3759).
Add grid_size parameter to union, difference, symmetric_difference and intersection (#3593).
Document how to access the feature ID (fid) as the index when reading files with read_file and the pyogrio engine, using fid_as_index=True (#3829).
Deprecations and compatibility notes:
The resolution keyword to buffer has been deprecated to align with the convention in shapely, quad_segs should be used instead (#3600).
Expired deprecations: option use_pygeos which had no functionality, seed keyword in sample_points (replaced by rng) (#3613).
Fix GeoSeries.sample_points looping without end on zero-area polygons, such as a collapsed ring; it now returns an empty MultiPoint, as it already did for empty and missing geometries (#3851).
Fix read_parquet ignoring the partitioning keyword when auto-detecting the columns to read, so that partitioning=None no 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_features raising a ValueError for an empty list of features when a crs is provided; it now returns an empty GeoDataFrame with a geometry column (#3777).
Fix the index level of the parts created by explode(index_parts=True) and get_coordinates(index_parts=True) being int32 instead of int64 on 32-bit platforms (#3865).
Various compatibility fixes for pandas 3.1 (#3802, #3831).
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).
Further hardening of to_postgis against SQL injection (#3800).
Ensure that points generated by sample_points are not sorted along x-axis (#3773).
Fix GeoDataFrame.explore() ignoring custom legend_kwds={"labels": ...} for categorical and boolean columns (#3496).
More graceful handling of keep_geom_type in the overlay() function with empty input (#3745).
This release addresses a handful of small compatibility issues with pandas 3.0 and backports some bugfixes.
访问原文 返回搜索 https://geopandas.org/en/stable/docs/changelog.html
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。