s2geometry

Computational geometry and spatial indexing library for spherical surfaces

brewmacoslinux
Try with needOr install directly
Source

About

Computational geometry and spatial indexing on the sphere

Commands

s2geometry

Examples

Create spatial index for geographic coordinates$ s2geometry --build-index --input coords.txt --output index.s2
Query nearby points within a radius on sphere$ s2geometry --query --index index.s2 --lat 37.7749 --lon -122.4194 --radius 1000
Validate geometric operations on spherical data$ s2geometry --validate-geometry --input polygon.geo