Skip to main content

GEOS wrapped in numpy ufuncs

Project description

Documentation Status Github Actions status Github Actions status Appveyor CI status Travis CI status PyPI Anaconda Zenodo

PyGEOS is a C/Python library with vectorized geometry functions. The geometry operations are done in the open-source geometry library GEOS. PyGEOS wraps these operations in NumPy ufuncs providing a performance improvement when operating on arrays of geometries.

Note: PyGEOS is a very young package. While the available functionality should be stable and working correctly, it’s still possible that APIs change in upcoming releases. But we would love for you to try it out, give feedback or contribute!

What is a ufunc?

A universal function (or ufunc for short) is a function that operates on n-dimensional arrays in an element-by-element fashion, supporting array broadcasting. The for-loops that are involved are fully implemented in C diminishing the overhead of the Python interpreter.

Multithreading

PyGEOS functions support multithreading. More specifically, the Global Interpreter Lock (GIL) is released during function execution. Normally in Python, the GIL prevents multiple threads from computing at the same time. PyGEOS functions internally releases this constraint so that the heavy lifting done by GEOS can be done in parallel, from a single Python process.

Examples

Compare an grid of points with a polygon:

>>> geoms = points(*np.indices((4, 4)))
>>> polygon = box(0, 0, 2, 2)

>>> contains(polygon, geoms)

  array([[False, False, False, False],
         [False,  True, False, False],
         [False, False, False, False],
         [False, False, False, False]])

Compute the area of all possible intersections of two lists of polygons:

>>> from pygeos import box, area, intersection

>>> polygons_x = box(range(5), 0, range(10, 15), 10)
>>> polygons_y = box(0, range(5), 10, range(10, 15))

>>> area(intersection(polygons_x[:, np.newaxis], polygons_y[np.newaxis, :]))

array([[100.,  90.,  80.,  70.,  60.],
     [ 90.,  81.,  72.,  63.,  54.],
     [ 80.,  72.,  64.,  56.,  48.],
     [ 70.,  63.,  56.,  49.,  42.],
     [ 60.,  54.,  48.,  42.,  36.]])

See the documentation for more: https://pygeos.readthedocs.io

Relationship to Shapely

Both Shapely and PyGEOS are exposing the functionality of the GEOS C++ library to Python. While Shapely only deals with single geometries, PyGEOS provides vectorized functions to work with arrays of geometries, giving better performance and convenience for such usecases.

There is active discussion and work toward integrating PyGEOS into Shapely:

For now PyGEOS is developed as a separate project.

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygeos-0.10.tar.gz (106.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pygeos-0.10-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86-64

pygeos-0.10-cp39-cp39-win32.whl (953.8 kB view details)

Uploaded CPython 3.9Windows x86

pygeos-0.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ x86-64

pygeos-0.10-cp39-cp39-macosx_10_9_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

pygeos-0.10-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8Windows x86-64

pygeos-0.10-cp38-cp38-win32.whl (963.1 kB view details)

Uploaded CPython 3.8Windows x86

pygeos-0.10-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.5+ x86-64

pygeos-0.10-cp38-cp38-macosx_10_9_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

pygeos-0.10-cp37-cp37m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.7mWindows x86-64

pygeos-0.10-cp37-cp37m-win32.whl (960.4 kB view details)

Uploaded CPython 3.7mWindows x86

pygeos-0.10-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.5+ x86-64

pygeos-0.10-cp37-cp37m-macosx_10_9_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

pygeos-0.10-cp36-cp36m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.6mWindows x86-64

pygeos-0.10-cp36-cp36m-win32.whl (960.6 kB view details)

Uploaded CPython 3.6mWindows x86

pygeos-0.10-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.5+ x86-64

pygeos-0.10-cp36-cp36m-macosx_10_9_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

File details

Details for the file pygeos-0.10.tar.gz.

File metadata

  • Download URL: pygeos-0.10.tar.gz
  • Upload date:
  • Size: 106.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for pygeos-0.10.tar.gz
Algorithm Hash digest
SHA256 8ad4703cf8f983a6878a885765be975709a2fe300e54bc6c8623ddbca4903b6c
MD5 9d570d5008023e10fcbe31eb4b81d923
BLAKE2b-256 8046a7ef2a41b9cb5aef17c0ef5e2ce937766b45f7c704b9bccd86ea2a23fd63

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pygeos-0.10-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for pygeos-0.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a9e40b2a7f32cf231ddb8c87fdad775086dfa3db21b92304bef1d96df3cfd1b2
MD5 c88607fe5d37d10fae3e3adf2922d954
BLAKE2b-256 2d88dde6401d681e2971808463df3a4f57bc1cf9af117a8fd2dac2919fd3bdc7

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp39-cp39-win32.whl.

File metadata

  • Download URL: pygeos-0.10-cp39-cp39-win32.whl
  • Upload date:
  • Size: 953.8 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for pygeos-0.10-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 d85c669e447f522df74f27fd5164a66dcddf6b07b78cec5aaa6ff313e3d8bfb1
MD5 12b0f9ebe1af91969055edfea9d9b6eb
BLAKE2b-256 127e7161744a8015fa735e08fc4699eec40da3a51cad4f442420c06e338291d3

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

  • Download URL: pygeos-0.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.9, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/2.7.12

File hashes

Hashes for pygeos-0.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 571c5b108c0cb6cb2aa6a0b322939bb93826d5a6c8d7c9b2bba7ff82d7b6f6bf
MD5 495db18e4cf8f4ea10e08911d1464489
BLAKE2b-256 d2ec484340a756c4ee170c6e323f83ff153f3302f07cae7038fa0d244ac6c969

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pygeos-0.10-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for pygeos-0.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 53c230974fba77470c18de0f3c47baf88f1af44ca834604f5ed75341155fab8e
MD5 d293225d0535348a9d5c5815b8a5f911
BLAKE2b-256 93ca7f4179797d0934e79c92181635e28406433d346836f00696518fbb532a27

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pygeos-0.10-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7

File hashes

Hashes for pygeos-0.10-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 445e81a140422726e1e246ff3f2f06545aaedd1858c5e16c9f233b0117c1ffec
MD5 18e3290a8452220e12546cefea517037
BLAKE2b-256 3c9d377b6eebb1eca9f177689e14d20d7d3e863965e712b61d635ca51ca934cd

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp38-cp38-win32.whl.

File metadata

  • Download URL: pygeos-0.10-cp38-cp38-win32.whl
  • Upload date:
  • Size: 963.1 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7

File hashes

Hashes for pygeos-0.10-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 05f63f0cb6eb4065ec130bcd639184f482fcc02d4ec397dcf9542da779022e70
MD5 063c4516db66bc9d15792175e96001e4
BLAKE2b-256 a5bd67f0d66c58598e24feab6a1ee926521748004ed3e1247dcdbced73a3ef8a

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

  • Download URL: pygeos-0.10-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.8, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/2.7.12

File hashes

Hashes for pygeos-0.10-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e995123ecc6bc1209c9eb55a2ccfc4f13733885efe25f06c3fe3f8fb6cc34c92
MD5 7e42f846d95d41f19887f16925a8b003
BLAKE2b-256 f2bfae1dd738ef0bfb6b7ba39313f2892ffb9b0d5c9e4005d6694537e484a8c6

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pygeos-0.10-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7

File hashes

Hashes for pygeos-0.10-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4ef5374b8e975e1854b644ce574ec6342b151eb8bc6338a3839bd716d6430195
MD5 095e6680fa579a0322b0931bae7eb89b
BLAKE2b-256 63da9aa23cf840d3f1e2b89fead10fd79786e6abfa835aa4aee1fea8651359e4

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pygeos-0.10-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for pygeos-0.10-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e02c9e6d3dbc00439cfb2acc6670bfc00e8802b194a5d22bbc177cb0f351c349
MD5 1ba441a4b9600ee48e9e83fb4fba248d
BLAKE2b-256 e54f38cc71dbd71a1abd5584c1454a92d1a1d4cee7044566c45e9353ba833186

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp37-cp37m-win32.whl.

File metadata

  • Download URL: pygeos-0.10-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 960.4 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for pygeos-0.10-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 951a3331fc7b431b35357437369857485429703858506794be9f806aca03e123
MD5 01ccb0fd70f12c1666ed64e4c67df0d1
BLAKE2b-256 fb2f9c2cdabd3410b40b56d2cdfbefb4f0f2a89599dd0fbf3f9a21a72b19a935

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

  • Download URL: pygeos-0.10-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/2.7.12

File hashes

Hashes for pygeos-0.10-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 370d2376a84db3af957b6ed4442bcc63bc8ec2b76180ab128d4331fe9118aaf0
MD5 10e7fcce9c02f201a0d8ded1148c618a
BLAKE2b-256 2ac0c3c0ebaa718166af6ff03a4e575d4d1ff4ffbd3ccb658be4285fbeaf3c89

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pygeos-0.10-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for pygeos-0.10-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1733988f64ebe7bb9daaaa96d78f2b5020a617edd14a50068236edf43eac1065
MD5 d4dd81e8bb9aaf80cda125102cc7bb6d
BLAKE2b-256 9abebc52d34d9c0021eefd58f8ef17b2df8e91e23a932dfd6abd7211cf38e2a0

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pygeos-0.10-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for pygeos-0.10-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 a88a5be37774a297b33fb6d8f34e7d655fc1e538aced922fb7eecfad9d96e1b6
MD5 9a2e530a7f1ae1803f6f81825c69a17c
BLAKE2b-256 1f8ace85696087c538c3f820743f0d3e65ff85f8409828eaa410465e5b0a5d66

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp36-cp36m-win32.whl.

File metadata

  • Download URL: pygeos-0.10-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 960.6 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for pygeos-0.10-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 df63bce638fb3a2ffb6f9293a5dc120c3d462dd24e43904aba31e32b7b640309
MD5 84f8e535786c8cd30c3ed48352d73ee2
BLAKE2b-256 de7c805540ec1bb84f1789fd6d4a66ea82e436df347af098664bb437a3f07cba

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

  • Download URL: pygeos-0.10-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/2.7.12

File hashes

Hashes for pygeos-0.10-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 587bc281a61261425b01f2488cdccdd7240bf6ec1f892039d5a954b10db4df97
MD5 a7af1b4e7b5326c1359010e578e22fdf
BLAKE2b-256 2a0ea230f4ae50cb035448a7bdeaf0fbe9281817f4e60bc06d2d57dae5a1d0d1

See more details on using hashes here.

File details

Details for the file pygeos-0.10-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pygeos-0.10-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for pygeos-0.10-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b1f253633153efb01ed6f6ca50774dbc88627bb6a4afa207b077c51490d4ea1f
MD5 0ade8b26a8bf6e6be48613570e2b7c20
BLAKE2b-256 b46dea1dc08366feeaae7014ba658359ec700b3bc02067e7e0d629512a01bd5d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page