s2geometry

A library for geometry and spatial indexing on a sphere rather than a flat map. It is used to handle shapes and locations on the globe, such as region covering and spatial lookups.

Share on XLicense: Apache-2.0

Overview

S2 is a C++ library for manipulating geometric shapes. Unlike most geometry libraries, it is designed mainly for spherical geometry, meaning shapes drawn on a sphere instead of a flat 2D map. That makes it well suited to geographic data. It builds with CMake and needs a C++ compiler with C++11 support and OpenSSL. Documentation is on s2geometry.io.

Key features

  • Geometry on the sphere rather than on a planar map
  • Suited to geographic data
  • Builds with CMake using a C++11 compiler
  • Guides and quick start published on s2geometry.io

Best for

C++ developers working with geographic shapes and locations on the globe who need spherical rather than planar geometry.

Upstream
mapillary/s2geometry
Fork on GitHub
Guo-astro/s2geometry
Upstream stars
1
Category
Maps and geospatial
License
Apache-2.0
Forked
2020-12-06
Sync status
In syncLast synced 2026-09-29