/
Shapely and PyGEOS

Shapely and PyGEOS

Shapely is a Python package for manipulation and analysis of planar geometric objects.

PyGEOS is a C/Python library with vectorized geometry functions

Shapely and PyGEOS doesn’t have python binary wheels for windows on arm. You can find instructions on building both packages locally here.

Compile LibGEOS

Shapely and PyGEOS require GEOS library.

No prebuilt libraries are provided for windows on arm yet. So you will need to build it locally.

Clone repository from GitHub - libgeos/geos: Geometry Engine, Open Source

We’ve tested Release 3.10.2 · libgeos/geos but other versions probably would work as well.

And run the following cmake commands to build and install the library

cmake -B build -A ARM64 cmake --build build/ --config Release cmake --install build/ --config Release

This will install library to `C:\Program Files(x86)`, you can change it you providing required prefix to cmake command.

Set environment variables for GEOS

Shapely and PyGEOS look for couple of environment variables to find out GEOS path. Please set the following environment variables.

$env:GEOS_LIBRARY_PATH="C:/Program Files/GEOS/lib" $env:GEOS_INCLUDE_PATH="C:/Program Files/GEOS/include"

Install Shapely and PyGEOS

Shapely and PyGEOS can be installed with pip

pip install shapely

pip install pygeos

 

 

Related content

Package building tutorial
Package building tutorial
Read with this
CMake
More like this
Python package analysis
Python package analysis
Read with this
Pyproj
More like this
SciPy
More like this
PyWin32
More like this