Skip to content

feat: v4.5.0 - #141

Merged
pocketken merged 1 commit into
mainfrom
dev/km/v4-5-0
Jul 10, 2026
Merged

feat: v4.5.0#141
pocketken merged 1 commit into
mainfrom
dev/km/v4-5-0

Conversation

@pocketken

@pocketken pocketken commented Jul 10, 2026

Copy link
Copy Markdown
Owner

H3.net 4.5.0 'better late than never': upstream alignment, modern targets, structs, perf.

Aligns the port with upstream H3 4.5.0 and modernizes the codebase; see the 4.5.0 entry in CHANGES.md for the full breakdown.

  • retarget to net10.0/net8.0/netstandard2.1/netstandard2.0; drop EOL TFMs; netstandard targets carry no System.Text.Json dependency (Unity-consumable; JSON support on net8.0+) (Add .NET 7 target #98, is .dll available to use in Unity? #140)
  • fix IsValidCell 32-bit shift wraparound rejecting res 11+ cells (IsValid returns false for valid value (4.0.0) #111) and EdgeLength* silently returning 0 for non-edge input (EdgeLengthMeters returning 0 #109), plus the polar pentagon 'is not 118 or 8' precedence bug, stale 3.x average edge/area tables and other latent issues
  • port upstream 4.0.1-4.5.0: CellToChildPos/ChildPosToCell/ CellToChildrenSize, pentagon-safe GridRing, bidirectional GridPathCells, Cagnoli/Kahan cell areas, IsValidIndex, ReverseDirectedEdge, CellsToMultiPolygon, grid statistics, overflow/OOB fixes and upstream test suites (Align with upstream 4.1.0 Release #102)
  • convert H3Index, CoordIJK, FaceIJK and LatLng to structs (using struct instead of sealed class? #93): FromLatLng/ToLatLng measured allocation-free; remove GeoCoord and scratch-buffer parameters; annotate pure members readonly
  • polyfill improvements (Polyfill Improvements #53): geometry-type dispatch incl. GeometryCollection, multi-seed disjoint MultiPolygon fills, containment predicate overload
  • canonical cell sets (Add cell canonicalization (upstream RFC) #61) and component-based, validated H3Index.Create (upstream constructCell)
  • allocation-free hot paths (CoordIJK->Direction ~10x, IsNeighbour fast path ~2.7x), incremental source generators, Polyfill package for netstandard backfills, updated dependencies and CI, standalone 4.0.0-vs-current benchmark suite (test/H3.CompareBenchmarks)

Closes GH-3, closes GH-44, closes GH-53, closes GH-61, closes GH-86, closes GH-93, closes GH-98 (no longer applicable -- .NET 10 now), closes GH-102 (out of date: now aligned with 4.5.0 release), closes GH-109, closes GH-111 AND closes GH-140.

H3.net 4.5.0: upstream alignment, modern targets, structs, perf

Aligns the port with upstream H3 4.5.0 and modernizes the codebase;
see the 4.5.0 entry in CHANGES.md for the full breakdown.

* retarget to net10.0/net8.0/netstandard2.1/netstandard2.0; drop EOL
  TFMs; netstandard targets carry no System.Text.Json dependency
  (Unity-consumable; JSON support on net8.0+) (GH-98, GH-140)
* fix IsValidCell 32-bit shift wraparound rejecting res 11+ cells
  (GH-111) and EdgeLength* silently returning 0 for non-edge input
  (GH-109), plus the polar pentagon 'is not 118 or 8' precedence bug,
  stale 3.x average edge/area tables and other latent issues
* port upstream 4.0.1-4.5.0: CellToChildPos/ChildPosToCell/
  CellToChildrenSize, pentagon-safe GridRing, bidirectional
  GridPathCells, Cagnoli/Kahan cell areas, IsValidIndex,
  ReverseDirectedEdge, CellsToMultiPolygon, grid statistics,
  overflow/OOB fixes and upstream test suites (GH-102)
* convert H3Index, CoordIJK, FaceIJK and LatLng to structs (GH-93):
  FromLatLng/ToLatLng measured allocation-free; remove GeoCoord and
  scratch-buffer parameters; annotate pure members readonly
* polyfill improvements (GH-53): geometry-type dispatch incl.
  GeometryCollection, multi-seed disjoint MultiPolygon fills,
  containment predicate overload
* canonical cell sets (GH-61) and component-based, validated
  H3Index.Create (upstream constructCell)
* allocation-free hot paths (CoordIJK->Direction ~10x, IsNeighbour
  fast path ~2.7x), incremental source generators, Polyfill package
  for netstandard backfills, updated dependencies and CI, standalone
  4.0.0-vs-current benchmark suite (test/H3.CompareBenchmarks)
@pocketken
pocketken merged commit 1c60237 into main Jul 10, 2026
1 check passed
@pocketken
pocketken deleted the dev/km/v4-5-0 branch July 10, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants