s2geometry
« Back to VersTracker
Description:
Computational geometry and spatial indexing on the sphere
Type: Formula  |  Latest Version: 0.13.1@1  |  Tracked Since: Dec 1, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: geometry geospatial indexing c++ library
Install: brew install s2geometry
About:
S2 Geometry is a library for accurate and efficient geometric computations on the surface of a sphere. It provides spatial indexing capabilities using hierarchical spherical tessellation, enabling fast proximity searches and region queries. This makes it ideal for handling geospatial data where Euclidean approximations are insufficient.
Key Features:
  • Hierarchical spherical tessellation (S2 cells)
  • Fast spatial indexing and querying
  • Support for complex geometric shapes (polygons, loops)
  • Robust point-in-region checks
Use Cases:
  • Geospatial indexing for large-scale mapping applications
  • Proximity searches (e.g., 'find points within radius')
  • Calculating distances and intersections on a globe
Alternatives:
  • GEOS – GEOS is planar (2D) focused, whereas S2 Geometry is specifically designed for spherical geometry.
  • Turf.js – Turf.js is JavaScript-based and often relies on planar projections, while S2 offers C++ performance for spherical math.
Version History
Detected Version Rev Change Commit
Jan 11, 2026 10:54am 1 REVISION_ONLY 39658dfc
Dec 1, 2025 11:09pm 0 VERSION_BUMP 74098c7a
Sep 16, 2025 12:54am 3 VERSION_BUMP 18662173
Sep 14, 2024 4:21pm 1 VERSION_BUMP a9cb21a0