s2geometry is Google’s open source geometry library designed for representing, analyzing, and manipulating geometric shapes on a sphere rather than a flat plane. This makes it particularly suited for applications involving geospatial data, such as mapping, spatial indexing, and geographic information systems (GIS). The library provides a robust mathematical framework for spherical geometry, allowing developers to work with polygons, points, and regions on the Earth’s surface using consistent and precise algorithms. Unlike traditional 2D geometry libraries, S2 ensures accuracy over large scales by modeling the globe directly, avoiding distortions caused by map projections. The project includes core C++ support, optional Python bindings, and integrations with Bazel and CMake for flexible builds. It relies on Abseil, OpenSSL, and googletest, and is tested across major platforms.

Features

  • Provides geometry operations for spherical (Earth-like) surfaces
  • Optimized for geospatial applications like mapping and region indexing
  • Supports C++20 and includes optional Python bindings
  • Integrates with Bazel and CMake build systems
  • Cross-platform support for Linux and macOS (with partial Windows compatibility)
  • Based on accurate, efficient algorithms for high-precision geometry computation

Project Samples

Project Activity

See All Activity >

Categories

Mathematics

License

Apache License V2.0

Follow S2 Geometry

S2 Geometry Web Site

Other Useful Business Software
$300 Free Credits to Build on Google Cloud Icon
$300 Free Credits to Build on Google Cloud

New customers can spin up VMs, build with AI, and query data at no cost.

Put your $300 in credit toward real workloads, then keep building with free monthly usage for 20+ products. No commitment and no charge until you upgrade.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of S2 Geometry!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

C++

Related Categories

C++ Mathematics Software

Registered

2025-10-10