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
Auth0 for AI Agents now in GA Icon
Auth0 for AI Agents now in GA

Ready to implement AI with confidence (without sacrificing security)?

Connect your AI agents to apps and data more securely, give users control over the actions AI agents can perform and the data they can access, and enable human confirmation for critical agent actions.
Start building today
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