Swiftpack.co - Outdooractive/gis-tools as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Outdooractive.
Outdooractive/gis-tools 0.3.5
A collection of GIS tools (including a GeoJSON implementation and WKB/WKT support)
⭐️ 1
🕓 1 week ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/Outdooractive/gis-tools.git", from: "0.3.5")

GISTools

GIS tools for Swift, including a GeoJSON implementation and many algorithms ported from https://github.com/Turfjs/turf/tree/master/packages (https://turfjs.org)

Notes

This package makes some assumptions about what is equal, i.e. coordinates that are inside of 1e-10 degrees are regarded as equal. See GISTool.equalityDelta.

Installation with Swift Package Manager

dependencies: [
    .package(url: "https://github.com/Outdooractive/gis-tools", from: "0.3.4"),
],
targets: [
    .target(name: "MyTarget", dependencies: [
        .product(name: "GISTools", package: "gis-tools"),
    ]),
]

Features

  • Supports the full GeoJSON standard, with some exceptions (see TODO.md)

Usage

import GISTools

var feature = Feature(Point(Coordinate3D(latitude: 3.870163, longitude: 11.518585)))
feature.properties = [
    "test": 1,
    "test2": 5.567,
    "test3": [1, 2, 3],
    "test4": [
        "sub1": 1,
        "sub2": 2
    ]
]

See the tests for more examples.

Contributing

Please create an issue or open a pull request with a fix

License

MIT

Author

Thomas Rasch, Outdooractive

GitHub

link
Stars: 1
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

0.3.5
1 week ago

Added LINEARRING to WKTCoder

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics