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
Fully Managed MySQL, PostgreSQL, and SQL Server Icon
Fully Managed MySQL, PostgreSQL, and SQL Server

Automatic backups, patching, replication, and failover. Focus on your app, not your database.

Cloud SQL handles your database ops end to end, so you can focus on your app.
Try 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