brendan-ward / spherely

Manipulation and analysis of geometric objects on the sphere.

Home Page:https://spherely.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spherely

Tests Docs

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

  • Python
  • Numpy
  • s2geography
  • s2geometry

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

Clone and install s2geography (https://github.com/paleolimbot/s2geography):

$ 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

Build and install s2spherely:

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

Run the tests:

$ pytest . -v

About

Manipulation and analysis of geometric objects on the sphere.

https://spherely.readthedocs.io/

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 67.2%Language:Python 25.2%Language:CMake 7.6%