proxpero / geodesy Goto Github PK
View Code? Open in Web Editor NEWA Swift implementation of the geohash algorithm.
License: MIT License
A Swift implementation of the geohash algorithm.
License: MIT License
Can you update your documentation with a tiny bit more verbosity? I'd like a few examples in code. Complete code. I don't see exactly how to compare a set of hashes to a hashed single location.
let location: CLLocation = manager.currentLocation
let geohash = location.geohash(precision: 8) // An eight-character geohash of type String
let neighbors = location.neighbors(precision: 8) // An array of nine eight-character strings representing the eight regions surrounding the original region.
I get all that, makes sense. What's next? Iterate through neighbors and check for what ?? Greater than, less than? How does the hashing work here?
How come https://cocoapods.org/ only has version 1.1.1 for Geodesy? How do we get it updated? When I do PodInstall I can't get the newest version 1.2.0
I'm getting the following neighbors:
["gcpvhgm", "gcpvhgm", "gcpvhgj", "gcpvhfv", "gcpvhfv", "gcpvhfv", "gcpvhgj", "gcpvhgm"]
Sure there shouldn't be any duplicates right?
When I use Geodesy as shown below:
< let CurrentGeoHash = self.currentLocation.geohash(precision: 4)
let CurrentNeighbors = self.currentLocation.neighbors(precision: 4)
print("Geohash: ", CurrentGeoHash, " Geohash Neighbors: ", CurrentNeighbors) >
I get the following geohash for the current location and the array for the neighbors:
Geohash: 9tbr
Geohash Neighbors: ["9w02", "9w02", "9tbr", "9tbq", "9tbq", "9tbq", "9tbr", "9w02"]
I believe the returned Geohash Neighbors for "9tbr" should be [N, NE, E, SE, S, SW, W, NW]:
["9w02", "9w08", 9tbx", 9tbw", 9tbq", 9tbn", 9tbp", 9w00"]
We should add swift package manager support.
Hello. I use Cocoapods to install your library. Very useful, thanks!
I got some issues:
What I did?
pod Geodesy
What went wrong?
I saw that a commit which should fix exactly that, but the build for that commit has failed, so it's possible that commit was ignored and did not get into a master branch. Another options is that the .podspec version has to be also bumped again.
Really enjoying your work, but I have to manually use the files because of those errors. That would wonderful if I could just use the pod directly.
When I use Geodesy as shown below:
<
let CurrentGeoHash = self.currentLocation.geohash(precision: 4)
let CurrentNeighbors = self.currentLocation.neighbors(precision: 4)
print("Geohash: ", CurrentGeoHash, " Geohash Neighbors: ", CurrentNeighbors)
I get "Value of type CLLLocationCoordinate2D has no member 'neighbors.'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.