Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add h3Distance, and internal h3ToIjk and ijkDistance #83

Merged
merged 8 commits into from
Jul 25, 2018

Commits on Jul 19, 2018

  1. Add h3ToIjk, along with ijkDistance and h3Distance

    Adds an h3ToIjk function which produces users consumable IJK+ coordinates. An "origin" for the coordinate system must be specified, and coordinates are only comparable if they were obtained from the same origin. This is limited to obtaining coordinates for indexes which are on the same base cell or neighboring base cells. Pentagons have more restrictions about crossing the pentagonal distortion. The intention is in the future this could be improved to handle pentagon distortion better, which may make current coordinates invalid. Coordinates should not be persisted or passed between library versions.
    
    Pentagon cases were mostly restricted by experimentally disabling a number of cases.
    
    With IJK+ coordinates, it's possible to determine the grid distance of cells, with the same limitations of h3ToIjk. This is done under the assumption that the distances that are of interest are below the granularity of a base cell (at that resolution, haversine may be a better approach.)
    
    Along with this change, CoordIJK is moved to the public API.
    Isaac Brodsky committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    58ee5c3 View commit details
    Browse the repository at this point in the history
  2. Make h3ToIjk and ijkDistance internal

    Isaac Brodsky committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    e9eaec6 View commit details
    Browse the repository at this point in the history
  3. Stack alloc in testH3ToIjk

    Isaac Brodsky committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    b8fd4e8 View commit details
    Browse the repository at this point in the history
  4. Add some coverage of invalid mode, resolution cases

    Isaac Brodsky committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    b245905 View commit details
    Browse the repository at this point in the history
  5. Change another case of calloc to stack alloc in tests

    Isaac Brodsky committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    53ccd77 View commit details
    Browse the repository at this point in the history
  6. Refactor _getBaseCellDirection to its own function

    Also change some tests to stack allocation and remove an `else if` chain.
    Isaac Brodsky committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    5924008 View commit details
    Browse the repository at this point in the history
  7. _imax is now a macro MAX

    Also updated some copyright headers
    Isaac Brodsky committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    d1deaa9 View commit details
    Browse the repository at this point in the history
  8. Add h3ToIjk filter application to changelog

    Isaac Brodsky committed Jul 19, 2018
    Configuration menu
    Copy the full SHA
    6b7299f View commit details
    Browse the repository at this point in the history