Swiftpack.co - maximveksler/GeohashKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by maximveksler.
maximveksler/GeohashKit 0.1
Fast, accurate, fully tested geohashing library for Swift
⭐️ 47
🕓 1 year ago
.package(url: "https://github.com/maximveksler/GeohashKit.git", from: "0.1")

*** Looking for a core committer to help maintain the library, Swift evolution make the code collect virtual dust. ***

Carthage compatible

GeohashKit

GeohashKit is a native Swift implementation of the geohash hashing algorithem. Supporting encode, decode and neighbor search.

API

Encode

Geohash.encode(latitude: 42.6, longitude: -5.6) // "ezs42"
Specify desired precision
Geohash.encode(latitude: -25.382708, longitude: -49.265506, 12) // "6gkzwgjzn820"

Decode

Geohash.decode("ezs42")! // (latitude: 42.60498046875, longitude: -5.60302734375)

Neighbor Search

Geohash.neighbors("u000")! // ["u001", "u003", "u002", "spbr", "spbp", "ezzz", "gbpb", "gbpc"]

Install

GeohashKit is distribured with Carthage.

  1. Add github "maximveksler/GeohashKit" to your Cartfile
  2. Run carthage update --use-submodules to build the Framework
  3. Drag GeohashKit into XCode's Embedded Binaries section

License

MIT License (MIT)

GitHub

link
Stars: 47
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Related Packages

Release Notes

Backed Potato
8 years ago

Supporting encode, decode and neighbors lookup.

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