All sections

Rasters

Gridded fields — population, elevation, weather, land use, imagery, audience-density surfaces — and the resolution-mismatch problems that surface the moment a fixed pixel grid meets a hexagonal cell grid.

stableh34 min read
Source geometry
raster

A raster is a gridded field: a value sampled on a regular array of pixels covering some extent, rather than a discrete shape with a boundary. This makes rasters structurally different from every other family in this catalogue — there is no polygon to polyfill, only a continuous surface that must be resampled onto the H3 grid, and the two grids (fixed-size square pixels, roughly-equal-area hexagonal cells) never align exactly. Every raster-to-H3 conversion is therefore a resampling problem before it is anything else, and the resampling method chosen changes the answer as much as the source data does.

Cardinality
A continuous surface sampled on a fixed pixel grid, not a discrete shape
Governed by
Whichever agency or model produced the surface (WorldPop, NOAA, a vendor model)
Not a geometry
A band index or land-cover class code — the surface is the pixel grid itself
Converts via
Resampling (nearest, bilinear, or area-weighted) per cell, not polyfilling

Members

MemberWhat the surface representsTypical format
PopulationGridded population count or densityGeoTIFF (e.g. WorldPop)
ElevationDigital elevation modelGeoTIFF (DEM)
WeatherTemperature, precipitation, wind fieldsNetCDF, GRIB
PollutionAir-quality index or pollutant concentrationGeoTIFF, NetCDF
Land use / land coverClassified land-cover category per pixelGeoTIFF (categorical)
Flood depthModeled inundation depthGeoTIFF
Satellite imageryMultispectral or RGB reflectanceGeoTIFF, COG
Signal strengthCellular or wireless coverage estimateGeoTIFF, proprietary grid
Audience-density surfacesModeled population or audience concentrationGeoTIFF, proprietary grid

Required metadata

FieldWhy it's required
CRSRasters are frequently delivered in a projected CRS (UTM, Albers) and must be reprojected before cell alignment
Native pixel resolutionDetermines whether the raster is finer or coarser than the target H3 resolution, which dictates the correct aggregation method
Declared no-data sentinelA raster's "no data" value (commonly -9999 or similar) must be masked, not averaged in as if it were a real reading
Band semanticsWhat each band represents and its units — a raster with unlabeled bands cannot be aggregated correctly regardless of resolution

Common risks

Resolution mismatch cuts both ways: a coarse raster (say, 1 km population pixels) sampled onto fine H3 cells (res 9, ~0.1 km²) produces false precision — many adjacent cells reporting different values that are really the same interpolated or repeated pixel value, implying an accuracy the source data never had. A fine raster (10 m imagery) aggregated onto coarse cells (res 6) needs area-weighted aggregation across every pixel the cell covers; averaging without area weighting biases the result toward whichever pixels happen to be enumerated first. Unmasked no-data pixels: if the sentinel value isn't filtered before aggregation, it gets averaged in as if it were a real reading, dragging every statistic (mean, sum, density) in the sentinel's direction — a -9999 no-data pixel included in a mean computation produces a wildly wrong, silently plausible number. Coastal and mixed pixels: pixels straddling land and water, or straddling two land-cover classes, cannot be cleanly labeled at the pixel level; forcing a single per-cell category onto a boundary cell instead of reporting a land-fraction or class-mixture confidence discards real uncertainty as false certainty. False precision generally: any raster aggregate reported without a coverage-fraction or valid-pixel-count alongside it invites readers to trust a number more than the underlying grid supports.

How it converts to H3

Rasters convert by sampling or aggregating pixel values per cell — nearest, bilinear, or area-weighted-mean depending on the resolution relationship between pixel and cell — documented on raster to H3, including the specific area-weighting algorithm and how to carry a coverage-fraction and valid-pixel-count forward per cell so downstream consumers can see how much of a raster aggregate is real signal versus interpolation. A raster is never converted by extracting contours and polyfilling them as an arbitrary polygon unless the goal is specifically a categorical boundary (e.g. a flood-extent polygon) derived from a threshold on the surface — that is a distinct, lossier operation from full-surface resampling and should be labeled as such.

Edge cases affecting this page
  • - A coarse raster over fine cells yields false precision; fine raster over coarse cells needs area weighting.
  • - Sentinel no-data pixels (e.g. -9999) corrupt aggregates if not masked.
  • - Pixels straddling land/water mislabel coastal cells.