Coder Social home page Coder Social logo

turf-swift's Introduction

Turf-swift

Warning: The Turf-swift API is experimental and will change. It is published to be able to get feedback from the community. Please use with caution and open issues for any problems you see or missing features that should be added.

๐Ÿ“ฑ ๐Ÿ–ฅ๐Ÿ’ป

A spatial analysis library written in Swift for native iOS and macOS applications, ported from Turf.js.

Installation

Although there has not yet been a beta release of this library yet, you can still experiment with it in your application by using CocoaPods to install it. Edit your Podfile to include:

pod 'Turf-swift', '~> 0.0.4'

Alternatively, you can clone this repo and drag and drop Turf.swift and CoreLocation.swift into your project in Xcode.

Available functionality

This work-in-progress port of Turf.js contains the following functionality:

Turf.js Turf-swift
turf-along Polyline.coordinateFromStart(distance:)
turf-destination CLLocationCoordinate2D.coordinate(at:facing:)
RadianCoordinate2D.coordinate(at:facing:)
turf-distance CLLocationCoordinate2D.distance(to:)
RadianCoordinate2D.distance(to:)
turf-helpers#lineString Polyline(_:)
turf-helpers#degrees2radians CLLocationDegrees.toRadians()
turf-helpers#radians2degrees CLLocationDegrees.toDegrees()
turf-line-distance Polyline.distance(from:to:)
turf-line-intersect Turf.intersection(_:_:)
turf-line-slice Polyline.sliced(from:to:)
turf-line-slice-along Polyline.trimmed(from:distance:)
turf-point-on-line Polyline.closestCoordinate(to:)
โ€” CLLocationCoordinate2D.direction(to:)
RadianCoordinate2D.direction(to:)
โ€” CLLocationDirection.differenceBetween(_:)
โ€” CLLocationDirection.wrap(min:max:)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.