{"id":10097,"library":"pygeos","title":"PyGEOS","description":"PyGEOS provides GEOS (Geometry Engine - Open Source) operations wrapped in NumPy ufuncs for vectorized geospatial operations. Its development has ceased, and its core functionality has been merged into Shapely starting with version 2.0. The last release is 0.14, and no further major releases are expected as users are encouraged to migrate to Shapely 2.x.","status":"deprecated","version":"0.14","language":"python","source_language":"en","source_url":"https://github.com/pygeos/pygeos","tags":["gis","geospatial","geometry","numpy","shapely","vectorized"],"install":[{"cmd":"pip install pygeos","lang":"bash","label":"Install PyPI package"}],"dependencies":[{"reason":"Core dependency for vectorized operations and ufuncs.","package":"numpy"},{"reason":"Required GEOS C library (>= 3.5.0) for core geometry operations. Not a Python package, needs system installation.","package":"geos","optional":false}],"imports":[{"symbol":"pygeos","correct":"import pygeos"}],"quickstart":{"code":"import pygeos\n\n# Create a single point\npoint_a = pygeos.points(0, 0)\n\n# Create an array of points\npoints_array = pygeos.points([\n    [1, 1],\n    [2, 2],\n    [3, 3]\n])\n\n# Create a polygon\npolygon = pygeos.polygons([(0, 0), (0, 4), (4, 4), (4, 0), (0, 0)])\n\n# Perform a spatial operation: check intersection\nintersects = pygeos.intersects(polygon, points_array)\n\nprint(f\"Point A: {point_a}\")\nprint(f\"Points array: {points_array}\")\nprint(f\"Polygon: {polygon}\")\nprint(f\"Intersects with polygon: {intersects}\") # Expected: [True, True, True]","lang":"python","description":"Demonstrates creating basic geometry objects (points, polygon) and performing a vectorized spatial operation (intersects)."},"warnings":[{"fix":"For new projects, use `shapely` (install `pip install shapely`). For existing projects, refer to the Shapely 2.0 migration guide for `pygeos` users (e.g., `shapely.from_pygeos()`, `shapely.to_pygeos()`).","message":"PyGEOS is officially deprecated as its core functionality has been merged into Shapely 2.0+. No new major features or releases are expected. New projects should use Shapely 2.x, and existing projects should plan to migrate.","severity":"breaking","affected_versions":"All versions, especially relevant since Shapely 2.0+"},{"fix":"Install GEOS via your system's package manager (e.g., `sudo apt-get install libgeos-dev` on Ubuntu, `brew install geos` on macOS) or through a package manager like Conda (`conda install -c conda-forge pygeos`).","message":"PyGEOS requires the GEOS C library (>= 3.5.0, preferably >= 3.6.0 for full features) to be installed on your system. `pip install pygeos` only installs the Python bindings, not the underlying C library. Failure to install GEOS will result in runtime errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Convert geometries between the libraries using `pygeos.from_shapely()` or `shapely.to_pygeos()` when necessary. For a unified approach, migrate to Shapely 2.x, which uses the same internal geometry representation.","message":"PyGEOS objects are distinct from Shapely 1.x objects. Direct interoperation between them without explicit conversion methods (e.g., `pygeos.from_shapely`, `shapely.to_pygeos`) can lead to `TypeError` or unexpected behavior.","severity":"gotcha","affected_versions":"All versions when interoperating with Shapely < 2.0"},{"fix":"Always pass NumPy arrays of geometries or coordinate arrays directly to `pygeos` functions for best performance. For example, `pygeos.area(geometry_array)` instead of `[pygeos.area(g) for g in geometry_list]`.","message":"Optimal performance in PyGEOS is achieved by leveraging its vectorized ufuncs, which expect NumPy arrays of geometries or coordinates as input. Iterating over scalar PyGEOS geometries in Python loops negates much of the performance benefit.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.14':39 '2':55 '2.0':34 'ceas':21 'core':24 'develop':19 'encourag':50 'engin':6 'expect':46 'function':25 'geo':4 'geometri':5,59 'geospati':16,58 'gis':57 'last':36 'major':43 'merg':28 'migrat':52 'numpi':12,60 'open':7 'oper':9,17 'provid':3 'pygeo':1,2 'releas':37,44 'shape':30,54,61 'sourc':8 'start':31 'ufunc':13 'user':48 'vector':15,62 'version':33 'wrap':10 'x':56","created_at":"2026-04-17T01:22:22.363452+00:00","updated_at":"2026-04-17T01:22:22.363452+00:00","problems":{"verify_error":"× Failed to build `pygeos==0.14`\n  ├─▶ The build backend returned an error\n  ╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)\n\n      [stderr]\n      Traceback (most recent call last):\n        File \"<string>\", line 14, in <module>\n        File\n      \"/home/xor/.cache/uv/builds-v"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.14","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/pygeos/pygeos","docs":null,"changelog":null,"pypi":"https://pypi.org/project/pygeos/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"install_fail","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-05","install_tag":null}}