Skip to main content

SYCL-accelerated H3 geospatial joins

Project description

H3 SYCL Bridge

⚖️ Licensing

FluidGeo H3-Turbo is offered under a dual-license model:

  • Academic & Non-Commercial: Free for research and educational purposes.
  • Commercial & Enterprise: A yearly subscription is required for production environments.
    • Features: 1,186x speedup on Blackwell, zero-copy pinned memory, and priority SYCL kernel support.

For enterprise trial keys and pricing, contact: info@fluidgeollc.com

Installation

H3-Turbo is available on PyPI and comes with pre-compiled "fat" wheels for Linux (CUDA 12.x) supporting NVIDIA Ampere, Ada Lovelace, Hopper, and Blackwell architectures.

pip install h3-turbo

Python API

H3 Turbo provides drop-in replacements for common H3 functions, optimized for NumPy arrays and GPU acceleration.

import h3_turbo
import numpy as np

# 1. Lat/Lon to Cell
lats = np.random.uniform(37.7, 37.8, 1_000_000)
lngs = np.random.uniform(-122.5, -122.4, 1_000_000)
resolution = 9

# Returns uint64 array of H3 indices
cells = h3_turbo.latlng_to_cell(lats, lngs, resolution)

# 2. Cell to Parent
parent_res = 5
parents = h3_turbo.cell_to_parent(cells, parent_res)

# 3. Grid Disk (k-ring)
k = 2
# Returns (N, max_k_size) array, padded with 0s
disks = h3_turbo.grid_disk(cells, k)

# 4. Cell to Boundary
# Returns (N, 7, 2) array of [lat, lng] coordinates
boundaries = h3_turbo.cell_to_boundary(cells)

# 5. Spatial Join (Point-in-Polygon)
# Efficiently check if points are within a set of zones
zones = np.array([0x8928308280fffff], dtype=np.uint64)
mask = h3_turbo.spatial_join(cells, zones, resolution)

Spark / Databricks Integration

H3 Turbo includes optimized Pandas UDFs for PySpark.

from pyspark.sql.functions import col
from spark_h3_turbo import (
    latlons_to_h3s_udf,
    cell_to_parent_udf,
    grid_disk_udf,
    spatial_join_udf
)

# 1. Lat/Lon to Cell
df = df.withColumn("h3", latlons_to_h3s_udf(9)(col("lat"), col("lon")))

# 2. Cell to Parent
df = df.withColumn("parent", cell_to_parent_udf(5)(col("h3")))

# 3. Grid Disk
df = df.withColumn("kring", grid_disk_udf(2)(col("h3")))

# 4. Spatial Join (Broadcast)
zones_list = [0x8928308280fffff] # List of H3 integers
df = df.withColumn("in_zone", spatial_join_udf(zones_list, 9)(col("h3")))

When choosing a wheel file or Docker image for AWS, refer to the following table:

AWS Instance GPU Architecture GPU_ARCH
g5 NVIDIA A10G Ampere sm_86
p4d NVIDIA A100 Ampere sm_80
g6 NVIDIA L4 Ada Lovelace sm_89
g6e NVIDIA L40S Ada Lovelace sm_89
p5 NVIDIA H100 Hopper sm_90
p5e NVIDIA H200 Hopper sm_90
g7e NVIDIA B200 Blackwell sm_100

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

h3_turbo-0.1.2-cp314-cp314-manylinux_2_39_x86_64.whl (60.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.39+ x86-64

h3_turbo-0.1.2-cp313-cp313-manylinux_2_39_x86_64.whl (60.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

h3_turbo-0.1.2-cp312-cp312-manylinux_2_39_x86_64.whl (60.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

h3_turbo-0.1.2-cp311-cp311-manylinux_2_39_x86_64.whl (60.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

h3_turbo-0.1.2-cp310-cp310-manylinux_2_39_x86_64.whl (60.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

File details

Details for the file h3_turbo-0.1.2-cp314-cp314-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for h3_turbo-0.1.2-cp314-cp314-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 3dbfdd60a4a6d844e3949f56758a8ff1ee9f8c855cd2996f5129642c1938c34e
MD5 e74d0835613278990f8bb73b778e27b1
BLAKE2b-256 a1597e0310ba0ec6618006325104b32d20894e77453cefa09f1aac3c191b908c

See more details on using hashes here.

File details

Details for the file h3_turbo-0.1.2-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for h3_turbo-0.1.2-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c7b1f6a78552eb4229e5179d2781bf443b65b31535339406bfe681a3194b5064
MD5 0492d50a1e168f56108d13f85b99c5e1
BLAKE2b-256 2eaba71fefc8e5113f5b25e62ea5c56e986d272ba69a39f72fb58b265806cc24

See more details on using hashes here.

File details

Details for the file h3_turbo-0.1.2-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for h3_turbo-0.1.2-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 9030aba085c24069de08fe26fd55d39f869ba55a4cf67821ab3888e84fce68cb
MD5 20f631cacefae12333abe7ab6318276d
BLAKE2b-256 bb5c072243d6e93eb64c78e2012ed828fb18e41741c49c3fd66f2892d27ad451

See more details on using hashes here.

File details

Details for the file h3_turbo-0.1.2-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for h3_turbo-0.1.2-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 025f49e8bd63ddb259d71d37f92944b5ebb1a2066aaf7397878402d8388393a1
MD5 eef835d4ed2f898083b4bc32962e9697
BLAKE2b-256 633e8a88857950b98d3de9c7d53875e722bd20a430f7f4136aad63472fc43e73

See more details on using hashes here.

File details

Details for the file h3_turbo-0.1.2-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for h3_turbo-0.1.2-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 adec34486b52ca23cf59ecb3e500912a28023d7dbc8820b7c4eab586a9ef704e
MD5 93bc386b078598613224baff21359426
BLAKE2b-256 ed73b3ca63d10b428c9c0678c4f3a6c5a72a7c5c1bb07c61a2f32291c2d71d04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page