A type-safe Swift interface to the GEOS library for handling geometric objects and performing topological operations.
GEOSwift is a Swift library that provides a type-safe, MIT-licensed interface to the OSGeo GEOS geometry engine. It allows developers to model geometric objects (points, linestrings, polygons) and perform spatial operations like intersections, unions, and predicates directly in Swift. It solves the problem of integrating advanced geospatial computations into Swift applications without dealing with low-level C++ APIs.
Swift developers building iOS, macOS, tvOS, watchOS, or Linux applications that require geospatial data processing, such as mapping apps, GIS tools, or location-based services.
Developers choose GEOSwift because it offers a native Swift API that is type-safe, thread-safe, and integrates seamlessly with Swift's Codable system for GeoJSON. It provides the full power of the industry-standard GEOS engine while maintaining Swift's modern language features and safety guarantees.
The Swift Geometry Engine.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a pure-Swift, optional-aware interface that enforces compile-time safety for geometry handling, reducing runtime errors as highlighted in the README's features.
Supports a wide range of predicates and topological operations like intersections and unions, leveraging the full power of the GEOS engine, as demonstrated in the README images and feature list.
Offers robust Codable support for reading and writing GeoJSON data, making it easy to work with common geospatial formats without manual parsing.
Designed for safe concurrent use in multi-threaded environments, which is essential for performance in modern Swift applications.
Relies on the GEOS C++ library under LGPL 2.1, where static linking is discouraged, potentially causing legal and deployment headaches for commercial projects.
Managing Z/M coordinates and NaN values adds significant complexity, as the README warns about unexpected equality checks and the need for careful type conversions.
Version 5 is a ground-up rewrite, requiring non-trivial migration efforts for existing users, as noted in the VERSION_5.md file.