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

Upgrade core library to 3.6.1 #74

Merged
merged 3 commits into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
All notable changes to this project will be documented in this file. This library adheres to a versioning policy described in [the README](./README.md#versioning). The public API of this library consists of the functions exported in [h3core.js](./lib/h3core.js).

## [Unreleased]
### Fixed
- Improved TypeScript typedefs (#73)
- Fix `polyfill` edge cases, improve perfomance (#74)
### Changed
- Updated the core library to v3.6.1 (#74)

## [3.6.1] - 2019-09-19
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion H3_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.6.0
3.6.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# h3-js

[![H3 Version](https://img.shields.io/badge/h3_api-v3.6.0-blue.svg)](https://github.com/uber/h3/releases/tag/v3.6.0) [![Build Status](https://travis-ci.com/uber/h3-js.svg?branch=master)](https://travis-ci.com/uber/h3-js) [![Coverage Status](https://coveralls.io/repos/github/uber/h3-js/badge.svg?branch=master)](https://coveralls.io/github/uber/h3-js?branch=master)
[![H3 Version](https://img.shields.io/badge/h3_api-v3.6.1-blue.svg)](https://github.com/uber/h3/releases/tag/v3.6.1) [![Build Status](https://travis-ci.com/uber/h3-js.svg?branch=master)](https://travis-ci.com/uber/h3-js) [![Coverage Status](https://coveralls.io/repos/github/uber/h3-js/badge.svg?branch=master)](https://coveralls.io/github/uber/h3-js?branch=master)

The `h3-js` library provides a pure-JavaScript version of the [H3 Core Library](https://github.com/uber/h3), a hexagon-based geographic grid system. It can be used either in Node >= 6 or in the browser. The core library is transpiled from C using [emscripten](http://kripken.github.io/emscripten-site), offering full parity with the C API and highly efficient operations.

Expand Down
6 changes: 3 additions & 3 deletions out/libh3.js

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions test/h3core.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,20 @@ test('polyfill - With Two Holes', assert => {
assert.end();
});

test('polyfill - BBox corners (#67)', assert => {
const {north, south, east, west} = {
east: -56.25,
north: -33.13755119234615,
south: -34.30714385628804,
west: -57.65625
};
const vertices = [[north, east], [north, west], [south, west], [south, east]];
const hexagons = h3core.polyfill(vertices, 7);

assert.equal(hexagons.length, 4499, 'got the expected number of hexagons back');
assert.end();
});

test('h3SetToMultiPolygon - Empty', assert => {
const h3Indexes = [];
const multiPolygon = h3core.h3SetToMultiPolygon(h3Indexes);
Expand Down