gis-tools

0.3.5

A collection of GIS tools (including a GeoJSON implementation and WKB/WKT support)
Outdooractive/gis-tools

What's New

0.3.5

2022-06-15T13:36:20Z

Added LINEARRING to WKTCoder

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

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Jun 29 2022 08:40:05 GMT-0500 (GMT-05:00)