Git Product home page Git Product logo

geohashkit's Introduction

*** 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)

geohashkit's People

Contributors

andreyz avatar mattsellars avatar maximveksler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

geohashkit's Issues

CocoaPods

Hi,

Can you add library to CocoaPods?

Thanks!

Dependency "GeohashKit" has no shared framework schemes for any of the platforms: iOS

I tried to install GeohashKit using carthage with platform target = iOS and received the following error:

Dependency "GeohashKit" has no shared framework schemes for any of the platforms: iOS
`Nathan$ carthage update --platform ios
*** Fetching GeohashKit
*** Checking out GeohashKit at "0.1"

*** Skipped building GeohashKit due to the error:
Dependency "GeohashKit" has no shared framework schemes for any of the platforms: iOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/maximveksler/GeohashKit/issues/new
`

Improve calculated precision of hash code

Currently precision, is hard coded by measuring bounding box lat / lon is below 0.5 deg. It would be wise to improve the way hash precision is calculated by following a “significantly more precise” measurements.

Suggestion: For (each new hash precision cycle), check if calculating the precision is wise, by measuring the precious distance for lat,lon from the previous bounding box, calculate distance for

    case North // Top
    case South // Bottom
    case East // Right
    case West  // Left

then, complete first iteration of new hash loop, and check if either lat or lon precision has been imported by at least 25% compared to previous measurement, if so - continue, else break the calculation loop.

The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift

I make a Cartfile in my base directory and write:

github "maximveksler/GeohashKit"

Then I run: carthage update --use-submodules

It failed! It says:

usr/bin/xcrun xcodebuild -project /Users/zhutao/Documents/xcode/geohash/geohash/Carthage/Checkouts/GeohashKit/GeohashKit.xcodeproj -scheme GeohashKit -configuration Release -derivedDataPath /Users/zhutao/Library/Caches/org.carthage.CarthageKit/DerivedData/9.1_9B55/GeohashKit/0.1 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath ./ SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO (launched in /Users/zhutao/Documents/xcode/geohash/geohash/Carthage/Checkouts/GeohashKit)User defaults from command line:
    IDEArchivePathOverride = /Users/zhutao/Documents/xcode/geohash/geohash/Carthage/Checkouts/GeohashKit
    IDEDerivedDataPathOverride = /Users/zhutao/Library/Caches/org.carthage.CarthageKit/DerivedData/9.1_9B55/GeohashKit/0.1

Build settings from command line:
    CARTHAGE = YES
    CLANG_ENABLE_CODE_COVERAGE = NO
    CODE_SIGN_IDENTITY =
    CODE_SIGNING_REQUIRED = NO
    GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
    ONLY_ACTIVE_ARCH = NO
    SKIP_INSTALL = YES

=== BUILD TARGET GeohashKit OF PROJECT GeohashKit WITH CONFIGURATION Release ===

Check dependencies
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.

** ARCHIVE FAILED **


The following build commands failed:
        Check dependencies
(1 failure)

My carthage version is 0.26.2 and my Xcode version is 9.1

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.