All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
The public API of this library consists of the functions declared in file h3api.h.in.
- Added experimental new algorithm for
polygonToCells
, calledpolygonToCellsExperimental
, that supports more containment flags and is more memory-efficient (#785, #800) h3
binary for shell scripts ready for use (#818, #826, #846, #923, #924, #931, #933)
- Fixed compacting all or many resolution 1 cells (#919)
compactCells
internally uses int64 for array indexing. (#920)- Reorganize tests into public / internal. (#762)
- Performance enhancement for aarch64, may improve other platforms (#790, #792, #852, #905, #913)
clang-format
upgraded to version 14. (#834)- Fixed tests that incorrectly did not test resolution 15. (#820)
- Use
CMAKE_INSTALL_LIBDIR
when choosing where to install library files. (#819)
- Functions for
cellToChildPos
andchildPosToCell
(#719)
- Fixed possible signed integer overflow in
h3NeighborRotations
(#707) - Fixed possible signed integer overflow in
localIjToCell
(#706, #735)
assert
on defensive code blocks that are not already covered. (#720)clang-format
upgraded to version 11. (#734)
- Changing an internal
float
todouble
improves the precision of geographic coordinate output (#652) - Fixed compacting all children of a resolution 0 cell (#679)
- Fixed possible signed integer overflow in
maxGridDiskSize
(#686) - Fixed possible use of uninitialized values in
cellToVertex
(#683, #690) - Fixed possible out of bounds read in
localIjToCell
(#684) - Fixed possible memory leak in
compactCells
(#685) - Fixed possible out of bounds read in
areNeighborCells
(#677) - Fixed possible memory leak in
cellsToLinkedMultiPolygon
(#673)
- Build script does not use toolchain file (#641)
- Removed a duplicated include preprocessor directive (#682)
- Improvements to the fuzzer suite and their automatic runs in CI (#671, #674, #687)
- Increased test coverage (#642)
- Added a fuzzer targetting internal
algos.c
functions (#675)
- Rename functions according to the terminology RFC (#622, #586, #571, #403, #466, #495, #466)
- Functions that can experience errors now have an
H3Error
return value. (#617, #586, #581, #551, #550, #509, #505, #507, #508, #503, #478, #468, #436, #359) - Cell count parameters use
int64_t
instead ofint
. polygonToCells
(previouslypolyfill
) accepts a flags argument for future expansion. (#570)cellToLocalIj
andlocalIjToCell
accept a mode argument for future expansion. (#586)exactEdgeLength
functions renamed toedgeLength
(#639)
- Fix polyfill bug when vertex latitude exactly matches cell center. (#603)
- A number of issues detected via unit tests and fuzzers were fixed. (#568, #562, #558, #559, #560, #430)
polygonToCells
returns an error if Infinity is passed in. (#636)
- The file
CMakeTests.cmake
is no longer included ifENABLE_TESTING
is off. (#609)
- Vertex mode and associated functions: (#422, #420, #417)
cellToVertex(cell, vertexNum)
cellToVertexes(cell, out)
vertexToLatLng(vertex, out)
isValidVertex(vertex)
h3
CLI application. (#556, #497)
- Generally use
lng
instead oflon
- Closed-form implementation of
numHexagons
- A number of fuzzer harnesses are now included in the H3 core library. (#557, #553, #545, #433)
- Additional benchmarks are added and benchmarks are regularly run in CI. (#524, #518)
exactEdgeLength
functions renamed toedgeLength
(#639)
polygonToCells
returns an error if Infinity is passed in. (#636)
distance*
functions (distanceKm
, etc) renamed togreatCircleDistance*
. (#622)- Error code
E_MEMORY
renamed toE_MEMORY_ALLOC
. (#617)
- Fix polyfill bug when vertex latitude exactly matches cell center. (#603)
- The file
CMakeTests.cmake
is no longer included ifENABLE_TESTING
is off. (#609)
experimentalH3ToLocalIj
andexperimentalLocalIjToH3
renamed tocellToLocalIj
andlocalIjToCell
respectively. (#586)cellToLocalIj
andlocalIjToCell
accept a mode argument for future expansion. (#586)cellToCenterChild
(previouslyh3ToCenterChild
) returns an error code. (#581)
E_OPTION_INVALID
error code added. (#586)
- Rename functions according to the terminology RFC (#571, #403, #466, #495, #466)
- Functions that can experience errors now have an
H3Error
return value. (#551, #550, #509, #505, #507, #508, #503, #478, #468, #436, #359) - Cell count parameters use
int64_t
instead ofint
. polygonToCells
(previouslypolyfill
) accepts a flags argument for future expansion. (#570)
- Vertex mode and associated functions: (#422, #420, #417)
cellToVertex(cell, vertexNum)
cellToVertexes(cell, out)
vertexToLatLng(vertex, out)
isValidVertex(vertex)
h3
CLI application. (#556, #497)
- A number of issues detected via unit tests and fuzzers were fixed. (#568, #562, #558, #559, #560, #430)
- Generally use
lng
instead oflon
- Closed-form implementation of
numHexagons
- A number of fuzzer harnesses are now included in the H3 core library. (#557, #553, #545, #433)
- Additional benchmarks are added and benchmarks are regularly run in CI. (#524, #518)
gridDisk
of invalid indexes should not crash. (#498)
- Finding invalid edge boundaries should not crash. (#399)
- Build fixes for FreeBSD. (#397)
- Area and haversine distance functions (#377):
cellAreaRads2
cellAreaKm2
cellAreaM2
pointDistRads
pointDistKm
pointDistM
exactEdgeLengthRads
exactEdgeLengthKm
exactEdgeLengthM
- Refactor
getH3UnidirectionalEdgeBoundary
for accuracy at small resolutions. (#391)- Speeds up
getH3UnidirectionalEdgeBoundary
by about 3x. - Implement core logic for future vertex mode.
- Speeds up
- Fixed building the library with custom memory allocation functions on Mac OSX. (#362)
- The installed H3 CMake target should have include directories specified. (#381)
- Tests now use
bash
on Windows. (#381)
H3_MEMORY_PREFIX
CMake option for replacing the memory management functions used in H3. (#317)- Support for building Debian packages of H3. (#352)
- Removed duplicate include statements. (#333)
- Fixed macro
H3_DIGIT_MASK_NEGATIVE
. (#329)
- Again implement new
polyfill
algorithm. (#313)
compact
detects and fails on cases with duplicated input indexes. (#299)
h3IsValid
returns false for indexes that have non-zero reserved bits. (#300)h3IsValid
andh3UnidirectionalEdgeIsValid
return false for indexes with the high bit set. (#300)
- Revert new
polyfill
algorithm until reported issues are fixed. (#293)
compact
handles zero length input correctly. (#278)bboxHexRadius
scaling factor adjusted to guarantee containment forpolyfill
. (#279)polyfill
new algorithm for up to 3x perf boost. (#282)- Fix CMake targets for KML generation. (#285)
h3ToCenterChild
function to find center child at given resolution (#267)getPentagonIndexes
(andpentagonIndexCount
) function to find pentagons at given resolution (#267)
- Fix bounds check for local IJ coordinates (#271)
- CMake options for excluding filter applications or benchmarks from the build. (#247)
h3GetFaces
function to find icosahedron faces for an index, and helper functionmaxFaceCount
(#253)
- Argument parsing for all filter applications is more flexible. (#238)
- Fix printing program name in
h3ToHier
error messages. (#254)
- Local coordinate spaces cannot cross more than one icosahedron edge. (#234)
- All dynamic internal memory allocations happen on the heap instead of the stack. (#235)
- Argument parsing for
h3ToGeo
,geoToH3
, andh3ToGeoBoundary
is more flexible. (#227)
localIjToH3
filter application (#222)- An option to print distances in the
kRing
filter application (#222)
- Arguments parsing for
kRing
filter application is more flexible. (#224)
benchmarkPolyfill
allocates its memory on the heap (#198)- Fixed constraints of vertex longitudes (#213)
- Zero only input to
uncompact
does not produce an error (#223)
binding-functions
build target generates an ASCII file on Windows (#193)
binding-functions
build target fixed when running the build out of source (#188)
getRes0Indexes
function for getting all base cells, and helper functionres0IndexCount
(#174)- Include defined constants for current library version (#173)
h3Line
andh3LineSize
functions for getting the line of indexes between some start and end (inclusive) (#165)
- Indexes in deleted pentagon subsequences are not considered valid.
experimentalH3ToLocalIj
function for getting local coordinates for an index. (#102)experimentalLocalIjToH3
function for getting an index from local coordinates. (#102)- Benchmarks for the kRing method for k's of size 10, 20, 30, and 40. (#142, #144)
- Internal
h3ToIjk
function renamed toh3ToLocalIjk
. (#102) h3ToIjk
filter application replaced withh3ToLocalIj
. (#102)
- Added
#include <stdio.h>
tobenchmark.h
(#142)
- Fixed bounding box bug for polygons crossing the antimeridian (#130)
- Normalize output of h3SetToMultiPolygon to align with the GeoJSON spec, ensuring that each polygon has only one outer loop, followed by holes (#131)
- Longitude outputs are now guaranteed to be in the range [-Pi, Pi]. (#93)
- Implemented closed form formula for maxKringSize. Source: https://oeis.org/A003215 (#138)
- Improved test and benchmark harnesses (#126, #128)
h3Distance
function for determining the grid distance between H3 indexes (#83)- Internal
h3ToIjk
function for getting IJK+ coordinates from an index (#83) - Internal
ijkDistance
function for determining the grid distance between IJK+ coordinates (#83) h3ToIjk
filter application for experimenting withh3ToIjk
(#83)
- Don't require a C++ compiler (#107)
- Most dynamic internal memory allocations happen on the heap instead of the stack (#100)
- Added Direction enum, replacing int and defined constants (#77)
- Ensured unused memory is cleared for pentagon children. (#84)
- Fixed compiler warnings in
h3ToGeoHier
andh3ToGeoBoundaryHier
. (#90) - Fixed a segfault in
h3SetToLinkedGeo
(#94)
- Warnings are not errors by default. (#90)
- Generator for the faceCenterPoint table (#67)
- Generator for number of indexes per resolution (#69)
- Added CMake
WARNINGS_AS_ERRORS
option, default on, for Clang and GCC (#70) - Added CMake
TEST_WRAPPER
setting whenWRAP_VALGRIND
is on (#66)
- Moved Vec3d structure to
vec3d.h
(#67) - Added input validation when getting the origin or destination of an edge (#74)
- Changed signature of internal function h3NeighborRotations.
- Do not require support for
hexRange
,hexRanges
, orhexRangeDistances
in the bindings. These functions may be deprecated in the public API in future releases; consumers should usekRing
andkRingDistances
instead. - Performance improvement in core indexing logic for
geoToH3
(thanks @wewei!)
- Fixed duplicate vertex in h3ToGeoBoundary for certain class III hexagons (#46)
- Release guide
- Assertions when allocating memory on the heap.
- Most internal memory allocations happen on the stack instead of the heap.
- CMake config installation to ease use of h3 from CMake projects.
- Add CMake toolchain file to set build options upfront.
- Add CMake
C_CLANG_TIDY
property to integrate clang-tidy checks during build. - YouCompleteMe completion support.
- Improved resilience to out of range inputs.
- Minimum CMake version to 3.1.
- Set
CMAKE_C_STANDARD
to11
instead of using compiler flag-std=c1x
. - Use
CMAKE_POSITION_INDEPENDENT_CODE
instead of using compiler flag-fPIC
. - Rename library target from
h3.1
toh3
withSONAME
property of 1.
- CMake
H3_COMPILER
option in favor of built-inCMAKE_C_COMPILER
. - CMake
BUILD_STATIC
option in favor of built-inBUILD_SHARED_LIBS
. - CMake
ENABLE_TESTS
option in favor of built-inBUILD_TESTING
. - File globbing in CMake in favor of listing source files.
- Removed the
H3IndexFat
internal structure.
- Simplified build process on Windows.
- Fixed an issue where tests would fail on ARM systems.
- Added a
make install
target.
- Improved compatability with building on Windows.
- Fixed various cases where the test suite could crash or not compile.
- First public release.