{"library":"geopandas","title":"GeoPandas","description":"GeoPandas extends the popular Python data analysis library pandas by adding support for geographic data. It introduces GeoSeries and GeoDataFrame types, which are subclasses of pandas.Series and pandas.DataFrame, respectively, allowing for the manipulation and analysis of geometric objects. GeoPandas is currently at version 1.1.3, with frequent patch releases addressing compatibility and bug fixes, and major releases periodically introducing significant changes and dependency updates.","status":"active","version":"1.1.3","language":"en","source_language":"en","source_url":"https://github.com/geopandas/geopandas","tags":["geospatial","GIS","pandas","vector data","geometry","mapping","spatial analysis"],"install":[{"cmd":"pip install geopandas","lang":"bash","label":"Basic Pip Install"},{"cmd":"conda install -c conda-forge geopandas","lang":"bash","label":"Recommended Conda Install (for C dependencies)"}],"dependencies":[{"reason":"Core data structures and analysis.","package":"pandas","optional":false},{"reason":"Manipulation and analysis of planar geometric objects (required >= 2.0).","package":"shapely","optional":false},{"reason":"Default high-performance vector I/O library (interface to GDAL).","package":"pyogrio","optional":false},{"reason":"Cartographic projections and coordinate transformations (interface to PROJ).","package":"pyproj","optional":false},{"reason":"Utilities for version handling.","package":"packaging","optional":false},{"reason":"For plotting and visualization.","package":"matplotlib","optional":true},{"reason":"Alternative vector I/O library (interface to GDAL).","package":"fiona","optional":true},{"reason":"Provides sample datasets for examples.","package":"geodatasets","optional":true}],"imports":[{"symbol":"GeoDataFrame","correct":"from geopandas import GeoDataFrame"},{"symbol":"GeoSeries","correct":"from geopandas import GeoSeries"},{"symbol":"read_file","correct":"import geopandas as gpd\ngdf = gpd.read_file(...)"}],"quickstart":{"code":"import geopandas as gpd\nimport geodatasets\nimport matplotlib.pyplot as plt\n\n# Load a sample dataset (New York City boroughs)\npath = geodatasets.get_path('ny.bb')\nnybb = gpd.read_file(path)\n\nprint(\"GeoDataFrame Head:\")\nprint(nybb.head())\n\nprint(\"\\nCoordinate Reference System (CRS):\")\nprint(nybb.crs)\n\n# Plot the GeoDataFrame\nfig, ax = plt.subplots(1, 1, figsize=(10, 10))\nnybb.plot(ax=ax, color='lightgray', edgecolor='black')\nax.set_title('New York City Boroughs')\nplt.show()","lang":"python","description":"This quickstart demonstrates how to load a built-in geospatial dataset using `geodatasets` and `gpd.read_file()`, inspect its basic properties (like the first few rows and Coordinate Reference System), and create a simple static map using the `.plot()` method."},"warnings":[{"fix":"Ensure `shapely>=2.0` is installed. Review and update code that explicitly used PyGEOS or `rtree` for spatial indexing.","message":"GeoPandas 1.0 dropped support for Shapely < 2 and PyGEOS. It strictly requires Shapely >= 2. The `rtree` package for spatial indexing was also removed. If your project relied on older Shapely versions or PyGEOS, you must upgrade Shapely to version 2.0 or newer.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"No direct code changes are usually needed, but be aware of potential subtle differences in behavior or performance. If explicit Fiona usage is desired, ensure it's installed and potentially specify `engine='fiona'` where applicable.","message":"The default I/O engine for reading and writing files (`gpd.read_file`, `gdf.to_file`) changed from Fiona to Pyogrio in GeoPandas 1.0. While `pyogrio` is now installed by default, ensure compatibility if you had specific configurations or relied on Fiona's unique behaviors.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Install `geodatasets` (`pip install geodatasets`) and update imports and calls from `geopandas.datasets.get_path` to `geodatasets.get_path`.","message":"The `geopandas.datasets` module (e.g., `geopandas.datasets.get_path('naturalearth_lowres')`) has been removed in GeoPandas 1.0. Sample datasets are now available through the `geodatasets` library.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use the `GeoDataFrame.set_crs()` method (e.g., `gdf = gdf.set_crs('EPSG:4326')`) for setting the CRS. For re-projecting, use `GeoDataFrame.to_crs()`.","message":"Manually setting the Coordinate Reference System (CRS) via direct assignment (e.g., `gdf.crs = 'EPSG:4326'`) is deprecated. This method can lead to unexpected behavior or data corruption.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"The recommended installation method is using the `conda` package manager (e.g., `conda install -c conda-forge geopandas`), which provides pre-built binaries for these complex dependencies across different platforms. Using isolated virtual environments is also crucial.","message":"Installing GeoPandas with `pip` can be challenging on some systems due to its dependencies on low-level C libraries like GEOS, GDAL, and PROJ. Missing or incorrectly compiled C libraries often lead to installation failures or import errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Validate geometries using `gdf.geometry.is_valid` and consider running `gdf.geometry.buffer(0)` or `gdf.geometry.make_valid()` to fix invalid geometries. Ensure DataFrame indices are reset with `df.reset_index(drop=True)` before performing spatial joins.","message":"Spatial join operations (`gpd.sjoin()`) and spatial indexing (`sindex`) can fail with `RTreeError: Coordinates must not have minimums more than maximums` or similar errors if geometries are invalid (e.g., self-intersections, empty geometries) or if DataFrame indices are not clean and sequential.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade your Python environment to 3.10+ and ensure all listed core dependencies meet or exceed their minimum required versions.","message":"GeoPandas 1.1 requires Python 3.10 or greater, and updated minimum versions for core dependencies: pandas 2.0, numpy 1.24, and pyproj 3.5.","severity":"breaking","affected_versions":">=1.1.0"}],"env_vars":null,"last_verified":"2026-04-05T00:00:00.000Z","next_check":"2026-07-04T00:00:00.000Z"}