Skip to content

Commit

Permalink
Merge a83c4af into 56edf17
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacbrodsky committed Mar 21, 2022
2 parents 56edf17 + a83c4af commit 9b65864
Show file tree
Hide file tree
Showing 42 changed files with 3,765 additions and 1,146 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ file [H3Core.java](./src/main/java/com/uber/h3core/H3Core.java), and support
for the Linux x64 and Darwin x64 platforms.

## [Unreleased]
### Breaking Changes
- Changed the API of `H3Core` to align it with the core library, and introduced `H3CoreV3` for users who wish to use the old names. (#91)

### Added
- Vertex mode API. (#91)

### Changed
- Upgraded the core library to v4.0.0. (#91)

### Removed
- Removed support for Linux MIPSEL (#92)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ double lat = 37.775938728915946;
double lng = -122.41795063018799;
int res = 9;

String hexAddr = h3.geoToH3Address(lat, lng, res);
String hexAddr = h3.latLngToCellAddress(lat, lng, res);
```

Decode a hexagon address into coordinates:

```java
List<GeoCoord> geoCoords = h3.h3ToGeoBoundary(hexAddr);
List<LatLng> LatLngs = h3.cellToGeoBoundary(hexAddr);
```

## Supported Operating Systems
Expand Down
21 changes: 21 additions & 0 deletions docs/migrating-from-v3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Migrating from h3-java version 3

The H3 library introduced breaking [changes](https://h3geo.org/docs/next/library/migrating-3.x) in 4.0.0 which are reflected in H3-Java 4.0.0.

Cell indexes generated in 3.x and 4.x are the same and can be used in either library version interchangably.

## Renaming

Functions and classes were renamed in H3 version 4.0.0 to have a more consistent and predictable naming scheme. The corresponding H3-Java names were changed to match.

### Legacy API

If you do not wish to use the new names, the H3-Java library provides `H3CoreV3` as a temporary compatability layer for applications. Your application can use `H3CoreV3` where it previously used `H3Core` and continue using the same function names. Because `H3CoreV3` uses the core library version 4.0.0 internally, exceptions and error codes are not backwards compatible.

## Exceptions

Specialized exceptions in H3-Java have been replaced with `H3Exception`, which is a `RuntimeException`. This exception wraps the error codes now returned by the H3 core library. The library may also throw standard Java exceptions like `IllegalArgumentException`.

## Removed

* `kRings`: This function is no longer exposed in the H3 library as it existed only for FFI performance reasons.
2 changes: 1 addition & 1 deletion h3version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
h3.git.reference=v3.7.2
h3.git.reference=v4.0.0-rc2

0 comments on commit 9b65864

Please sign in to comment.