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

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
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