Description
GEOSwift is a Swift library for working with geometry, such as points, lines and polygons, and for running topological operations on them, including intersections and overlaps. It is a type-safe Swift interface to the GEOS library routines from OSGeo. The library is written in pure Swift and offers a programming interface that handles optional values safely. It supports XY, XYZ, XYM and XYZM coordinates, and it can read and write WKT and WKB as well as GeoJSON through Codable. The project is thread-safe, uses Swift-native error handling and includes a test suite. It runs on iOS 16, tvOS 16, macOS 13, watchOS 9, visionOS 1 and Linux, and it requires Swift 5.9. You can add it to a project with the Swift Package Manager. The README notes that GEOS itself is licensed under LGPL 2.1, and that static linking can be controversial, so dynamic linking is recommended. Separate packages are available for MapKit and MapboxGL integration. GEOSwift is MIT licensed.…
Highlights
- Points, lines, polygons and other geometry types
- Intersections, overlaps and other topological operations
- Reads and writes WKT, WKB and GeoJSON
- Supports XY, XYZ, XYM and XYZM coordinates
- Installs with Swift Package Manager on Apple platforms and Linux
Ratings & Reviews
No ratings yet
Be the first to rate GEOSwift.
People also visit
GEOSwift FAQ
What is GEOSwift?
A type-safe Swift library for geometry and topological operations, built on the GEOS routines.
Who is it for?
Swift developers who need geometry, spatial predicates or geographic data formats in iOS, macOS, Linux or other Apple-platform apps.
How do I install it?
Add the GEOSwift package to your Package.swift with the Swift Package Manager, then add GEOSwift to your target's dependencies.
Which platforms are supported?
iOS 16, tvOS 16, macOS 13, watchOS 9, visionOS 1 and Linux, with Swift 5.9 or newer.
What license is it under?
MIT. The README notes that the underlying GEOS library is licensed under LGPL 2.1.
Does it handle GeoJSON?
Yes, through Codable. Decoding requires you to specify the coordinate type, and GeoJSON does not carry M values.
What are the best GEOSwift alternatives?
Popular alternatives to GEOSwift include SwiftGtk, GeoLibre and Geo Downloader. See all GEOSwift alternatives







