MA
maximveksler/GeohashKit
Fast, accurate, fully tested geohashing library for Swift
*** Looking for a core committer to help maintain the library, Swift evolution make the code collect virtual dust. ***
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.
- Add
github "maximveksler/GeohashKit"to yourCartfile - Run
carthage update --use-submodulesto build the Framework - Drag GeohashKit into XCode's Embedded Binaries section
License
MIT License (MIT)
On this page
Languages
Swift95.6%Objective-C4.4%
Latest Release
0.1May 15, 2015MIT License
Created May 2, 2015
Updated October 13, 2024