Skip to main content

Manipulation and analysis of geometric objects on the sphere

Project description

spherely

Tests Docs Coverage

Python library for manipulation and analysis of geometric objects on the sphere.

Spherely is the counterpart of Shapely (2.0+) for manipulation and analysis of spherical geometric objects. It is using the widely deployed open-source geometry library s2geometry via the library s2geography which provides a GEOS compatibility layer on top of s2geometry.

This library is at an early stage of development.

Requirements

Additional requirements when building spherely from source:

(Note: C++11 or C++14 should work too but we have no plan to maintain compatibility with those older standards)

Installation

There is no pre-compiled package available at the moment. See the section below for instructions on how to setup a development environment and build / install spherely from source.

Setting up a development environment using conda

After cloning this repo, create a conda environment using the ci/environment.yml file with the required dependencies:

$ conda env create -f spherely/ci/environment.yml
$ conda activate spherely-dev

Build and install s2spherely:

$ cd spherely
$ python -m pip install . -v --no-build-isolation

Note that you can specify a build directory in order to avoid rebuilding the whole library from scratch each time after editing the code (requires scikit-build-core v0.2.0+):

$ python -m pip install . -v --no-build-isolation --config-settings build-dir=build/skbuild

Run the tests:

$ pytest . -v

Spherely also uses pre-commit for code auto-formatting and linting at every commit. After installing it, you can enable pre-commit hooks with the following command:

$ pre-commit install

(Note: you can skip the pre-commit checks with git commit --no-verify)

Using the latest s2geography version

If you want to compile spherely against the latest version of s2geography, use:

$ git clone https://github.com/paleolimbot/s2geography
$ cmake -S s2geography -B s2geography/build -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
$ cmake --build s2geography/build
$ cmake --install s2geography/build

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

spherely-0.0.1.tar.gz (230.8 kB view hashes)

Uploaded Source

Built Distributions

spherely-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

spherely-0.0.1-cp313-cp313-macosx_14_0_arm64.whl (3.6 MB view hashes)

Uploaded CPython 3.13 macOS 14.0+ ARM64

spherely-0.0.1-cp313-cp313-macosx_13_0_x86_64.whl (3.5 MB view hashes)

Uploaded CPython 3.13 macOS 13.0+ x86-64

spherely-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

spherely-0.0.1-cp312-cp312-macosx_14_0_arm64.whl (3.6 MB view hashes)

Uploaded CPython 3.12 macOS 14.0+ ARM64

spherely-0.0.1-cp312-cp312-macosx_13_0_x86_64.whl (3.5 MB view hashes)

Uploaded CPython 3.12 macOS 13.0+ x86-64

spherely-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

spherely-0.0.1-cp311-cp311-macosx_14_0_arm64.whl (3.6 MB view hashes)

Uploaded CPython 3.11 macOS 14.0+ ARM64

spherely-0.0.1-cp311-cp311-macosx_13_0_x86_64.whl (3.5 MB view hashes)

Uploaded CPython 3.11 macOS 13.0+ x86-64

spherely-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

spherely-0.0.1-cp310-cp310-macosx_14_0_arm64.whl (3.6 MB view hashes)

Uploaded CPython 3.10 macOS 14.0+ ARM64

spherely-0.0.1-cp310-cp310-macosx_13_0_x86_64.whl (3.5 MB view hashes)

Uploaded CPython 3.10 macOS 13.0+ x86-64

Supported by

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