An Elixir library for performing geographic calculations including distance, bearing, and geofencing.
Geocalc is an Elixir library for performing precise geographic calculations on Earth's surface using latitude and longitude coordinates. It solves the problem of computing distances, bearings, destinations, and geometric relationships between points, which is essential for location-based applications. The library includes geofencing capabilities to determine if points are inside or outside defined geographic areas.
Elixir developers building location-aware applications such as mapping services, logistics platforms, ride-sharing apps, or any system requiring geographic computations. It's also suitable for researchers or engineers working with geospatial data in Elixir.
Developers choose Geocalc for its comprehensive set of accurate geographic functions, extensible point protocol that works with various data structures, and performance-optimized implementation benchmarked for speed. It provides a pure Elixir solution without external dependencies for common geospatial calculations.
Geographic calculations for Elixir
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Adapts formulas from trusted sources like movable-type.co.uk and ETSI standards, ensuring reliable calculations for distances, bearings, and geofencing as shown in the documentation.
Supports any data structure (list, tuple, map, or custom) via the Geocalc.Point protocol, allowing seamless integration with diverse application data models without conversion overhead.
Offers a wide range of functions including distance, bearing, destination, intersection, geofencing with shapes, and advanced operations like cross-track distances, covering most geospatial needs in one library.
Benchmark results show operations like distance calculation at ~2.33 µs per op, making it efficient for high-throughput applications such as real-time location processing.
Formulas are tailored for Earth's geometry using latitude/longitude, so it's unsuitable for calculations on other planets or in 3D space, which might be required for advanced spatial simulations.
For large datasets, users must implement their own spatial indexing or caching solutions, as the library focuses on per-calculation performance without optimization for bulk data processing.
Geofencing supports only circles, rectangles, and ellipses; complex polygons or custom shapes require additional implementation or integration with external libraries, limiting out-of-the-box flexibility.