geoswift/geos
This library is an SPM-compatible repackaging of the source code from [libgeos/geos](https://github.com/libgeos/geos) for use on Apple and Linux systems.
Requirements
- Swift 5.9+
- iOS 12.0+ / macOS 10.13+ / tvOS 12.0+ / watchOS 4.0+ / visionOS 1.0+
- Linux
Usage
Swift Package Manager (SPM)
Add the following to your Package.swift:
let package = Package(
name: "YourPackage",
dependencies: [
.package(url: "https://github.com/GEOSwift/geos.git", from: "11.0.0")
],
targets: [
.target(
name: "YourTarget",
dependencies: [
.product(name: "geos", package: "geos")
]
)
]
)Basic Usage
import geos
// The geos C API is now available for use[!NOTE]
geosis built as a dynamically-linked library for maximum compliance with the LGPL 2.1 license. Use of statically-linkedgeosis discouraged.
Versioning
Currently version 11.0.0 packages libgeos/geos 3.14.1.
This package follows SemVer principles and therefore its versions don't map 1:1 with the underlying geos library. When a geos release identifies any changes as breaking, we will release a new major version of this library.
Licensing
The source code contained in this repo is released under a dual license:
- The contents of the
Sourcesdirectory are taken from libgeos/geos and distributed under the LGPL 2.1 license (see COPYING). - The other content of this repo is distributed under the MIT LICENSE.
Releasing a new version
- Create a new branch.
- Modify
update.shto successfully pull the new version of geos and construct an SPM-compatibleSourcesdirectory. This only entails pointing at a new source archive unless geos releases a new version with different build structure (rare). - Run
update.sh. - Modify
Package.swiftif necessary. - Test the supported platforms (Apple Devices/Linux) with both CLI and Xcode.
- Update this
README.mdwith any relevant information (e.g. new version numbers). - Commit all modifications and open a PR.
- Once merged, release a new version numbered according to SemVer principles. If the underlying geos release contains any breaking changes, increment the major release here. Minor and patch version increments are at your discretion.
Package Metadata
Repository: geoswift/geos
Default branch: main
README: README.md