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

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.1-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.1-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.1-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.1-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.1-cp314-cp314-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for h3_turbo-0.1.1-cp314-cp314-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 304cf914d2e475ca91d02d12588fe741491baa88c6ead0d133efa431657b6077
MD5 1d2f677e9a8bed01b581514a1aa5eab4
BLAKE2b-256 a7f604f71d8e822945cc2debd9ff10cd463bc3f436e1945670323363166b6882

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for h3_turbo-0.1.1-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 9503326aacb9ff96fe9a65e4200974d3bbcc0acd32fbe355b974dffdbe223e0f
MD5 710d58989075c5c2f1fefe6f6cd2c1eb
BLAKE2b-256 2408c5f319813a4fa77ee295cc7fc380062bd51dc4b8e391b83b6736616733d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for h3_turbo-0.1.1-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 2c4fd443c5936b28620fd2822c86b9b1f3a6e9cf7466ac33eaf2320048dc3515
MD5 61a5b9d07999ad646f05e427228157b0
BLAKE2b-256 70554d0caf6144a1a7f253a2fe1cb1b5ba4adaceb1e477d52e1a8a1c2a50570f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for h3_turbo-0.1.1-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 d547aa8a5da7cd4704ae6163c7b860775f86b0a8437fdeeb39a02b115f7a10e5
MD5 dfa65764046575bc2e2b15e93d8d8382
BLAKE2b-256 6d37fc879d4d30d793310e7b5a9a5cb97d40d7e1dcef50040c37a1945f31660b

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