Geospatial Data & GIS

What Is H3 Spatial Indexing?

H3 spatial indexing divides Earth into hierarchical geographic cells. Learn how H3 resolutions, cell identifiers and spatial aggregation work, and how H3 supports POI analysis, geographic filtering and location intelligence.

Conceptual city map overlaid with blue hexagonal cells and teal points of interest, alongside a diagram illustrating coarse and finer spatial indexing levels.
H3 spatial indexing provides a hierarchical geographic framework for organising locations into cells at multiple spatial resolutions. This illustration is conceptual and does not represent exact H3 cell geometry.

H3 spatial indexing is an open-source geospatial indexing system developed at Uber that divides Earth's surface into a hierarchical grid of predominantly hexagonal cells. Each cell has a unique identifier, allowing geographic coordinates to be associated with spatial units at different levels of resolution.

Instead of working exclusively with individual latitude and longitude coordinates, analysts can use H3 cell identifiers to organise geographic records, aggregate spatial information, identify neighbouring areas, and integrate complementary datasets.

H3 is particularly useful for point of interest (POI) data, location intelligence, mobility analysis, geographic filtering, market research, and large-scale spatial data processing.

Its main advantage is not that it replaces conventional geographic coordinates or administrative boundaries, but that it provides an additional spatial framework that can be applied consistently across geographic regions.

How does H3 spatial indexing work?

H3 belongs to a class of geographic frameworks known as discrete global grid systems (DGGS).

These systems partition Earth's surface into identifiable geographic cells, allowing locations to be represented and analysed through a structured spatial index.

According to the H3 technical overview, the system constructs grids on the faces of an icosahedron and projects them onto a spherical representation of Earth.

Most H3 cells are hexagonal. However, a global spherical grid cannot be constructed entirely from hexagons using this approach.

Consequently, H3 contains 12 pentagonal cells at every resolution.

At resolution 0, the entire globe is represented by 122 base cells, consisting of 110 hexagons and 12 pentagons.

Progressively higher resolutions divide the geographic framework into increasingly smaller cells.

This structure allows the same geographic location to be represented at multiple levels of spatial detail.

What is an H3 cell identifier?

An H3 cell identifier is a unique index associated with a geographic cell at a specified resolution.

The H3 cell index documentation describes a hierarchical indexing structure encoded within a 64-bit integer. H3 identifiers are commonly represented as hexadecimal strings when stored or exchanged between software systems.

For example, the official H3 indexing documentation demonstrates that geographic coordinates of latitude 45 degrees and longitude 40 degrees correspond to the following resolution 2 cell:

822d57fffffffff

This is an actual example from the H3 technical documentation rather than an identifier associated with a fictional establishment.

An H3 identifier can be used to retrieve information about its corresponding cell, including its resolution, geographic boundary, centre, neighbouring cells, and hierarchical relationships.

Geographic coordinates versus H3 identifiers

Geographic coordinates and H3 identifiers represent different types of spatial information.

CharacteristicGeographic coordinatesH3 cell identifier

Geographic representation

Individual geographic position

Geographic cell

Common format

Latitude and longitude

Integer or hexadecimal string

Spatial detail

Depends on coordinate accuracy and precision

Depends on selected H3 resolution

Geographic grouping

Requires additional spatial operations

Records can be grouped by matching identifiers

Neighbourhood analysis

Requires distance or geometric calculations

Supports grid-based traversal

Original point location

Preserved in the coordinates

Cannot be recovered exactly from the cell identifier alone

Multiple geographic locations can share the same H3 identifier when they fall within the same cell.

Consequently, an H3 cell identifier should not be treated as a unique identifier for an individual business, building, person, or POI.

It identifies a geographic area rather than a distinct real-world entity.

Understanding H3 resolution levels

H3 supports 16 resolution levels, ranging from resolution 0 to resolution 15.

Lower resolution numbers represent larger geographic cells, while higher resolution numbers represent smaller and more detailed cells.

The appropriate resolution depends on the geographic extent, source data accuracy, analytical objective, and number of observations available.

For example, an international market analysis may use relatively coarse cells, while neighbourhood-level POI analysis may require a finer spatial representation.

H3 resolution and average cell area

The following table presents the global average hexagonal cell area and total number of cells at each H3 resolution.

H3 resolutionAverage hexagon areaTotal global cells

0

4,357,449 km²

122

1

609,788 km²

842

2

86,801.78 km²

5,882

3

12,393.43 km²

41,162

4

1,770.35 km²

288,122

5

252.90 km²

2,016,842

6

36.13 km²

14,117,882

7

5.16 km²

98,825,162

8

0.7373 km²

691,776,122

9

0.1053 km²

4,842,432,842

10

15,047.50 m²

33,897,029,882

11

2,149.64 m²

237,279,209,162

12

307.09 m²

1,660,954,464,122

13

43.87 m²

11,626,681,248,842

14

6.27 m²

81,386,768,741,882

15

0.895 m²

569,707,381,193,162

Source: H3 version 4.x — Tables of Cell Statistics Across Resolutions.

Average areas exclude pentagons, while the total global cell counts include both hexagons and pentagons. Area values have been rounded for readability.

The table describes the theoretical global grid. It does not indicate the number of cells that contain businesses, population, or other geographic observations.

Are all H3 cells the same size?

No. Cells at the same resolution can have different geographic areas depending on their positions within the global grid.

Pentagonal cells also differ in area from hexagonal cells.

For example, the average hexagonal cell at resolution 9 covers approximately 105,333 square metres. However, an individual resolution 9 cell does not necessarily have that exact area.

The H3 area functions allow users to calculate the area of a specific cell using the system's spherical Earth model.

When calculating population density, POI density, road density, or other area-normalised measurements, analysts should use the relevant individual cell area rather than assuming that all cells have identical dimensions.

H3 resolution is not equivalent to raster resolution

H3 resolution 9 has an average hexagonal area of approximately 0.1053 square kilometres.

A square raster cell measuring 100 metres by 100 metres covers 0.01 square kilometres.

These two geographic representations differ considerably in both area and geometry.

Geographic unitApproximate area

100 m × 100 m square raster cell

10,000 m²

H3 resolution 9 average hexagon

105,333 m²

H3 resolution 10 average hexagon

15,048 m²

H3 resolution 11 average hexagon

2,150 m²

H3 resolution 10 is closer in average area to a 100-metre square raster cell than resolution 9, but the two are still not equivalent.

H3 cells and raster pixels have different shapes, boundaries, orientations, and spatial indexing conventions.

Integrating the two systems requires appropriate spatial matching or aggregation rather than assuming a direct one-to-one correspondence.

Understanding the H3 hierarchy

One of H3's defining characteristics is its ability to represent geographic information at multiple levels of resolution.

Each cell below the maximum resolution has a defined collection of logical child cells.

An ordinary hexagonal parent has seven immediate children. A pentagonal parent has six immediate children, consisting of five hexagons and one pentagon.

Hierarchical diagram showing one hexagonal H3 parent cell at resolution r connected to seven logical child cells numbered zero through six at resolution r plus one.
H3 uses hierarchical cell relationships in which an ordinary hexagonal parent has seven logical children, while a pentagonal parent has six. Logical containment does not imply exact geometric containment.

This hierarchical design is commonly described as an aperture 7 grid system.

The H3 hierarchical indexing documentation explains how these relationships support movement between coarser and finer spatial resolutions.

Logical containment versus geometric containment

An important technical distinction is that H3's hierarchical relationships provide exact logical containment but only approximate geometric containment across resolutions.

Every finer-resolution cell has a defined logical ancestor at each applicable coarser resolution.

However, the geographic boundary of a child cell is not necessarily contained entirely within the geographic polygon of its logical parent.

This occurs because hexagonal grids do not subdivide into smaller hexagons with perfectly matching boundaries.

Consequently, two operations can produce different results:

  • Indexing an original geographic coordinate directly at a coarse resolution.
  • Indexing the coordinate at a fine resolution and retrieving its logical parent at the coarse resolution.

Near cell boundaries, the resulting coarse cell identifiers may differ.

This distinction is important when aggregating POI records, integrating spatial datasets, and comparing statistics calculated at multiple resolutions.

If the objective is hierarchical roll-up, logical parent relationships provide a consistent indexing structure. If the objective is membership within the actual geographic polygon at a particular resolution, the original coordinates should be indexed at that resolution.

How many cells exist at each resolution?

The total number of H3 cells at resolution r can be calculated using the following relationship:

Total cells = 2 + 120 × 7ʳ

This formula accounts for the persistent 12 pentagonal cells in the global grid.

For example, resolution 2 contains:

2 + 120 × 7² = 5,882 cells.

The number of possible cells grows rapidly as resolution increases. However, most practical datasets contain only a relatively small subset of occupied or relevant cells.

A POI database does not need to generate every possible H3 cell globally before indexing its records.

Why does H3 use hexagonal cells?

Hexagons provide useful geometric properties for neighbourhood analysis.

In an ideal regular planar hexagonal grid, each cell has six directly adjacent neighbours with equivalent centre-to-centre distances.

A square grid, by contrast, has four edge-sharing neighbours and four corner-sharing neighbours. The distances to those two groups differ.

Grid characteristicRegular square gridRegular hexagonal grid

Edge-sharing neighbours

4

6

Corner-only neighbours

4

None

Distance to immediate edge-sharing neighbours

Uniform in an ideal regular grid

Uniform in an ideal regular grid

Common applications

Raster imagery and geographic grids

Spatial binning and neighbourhood analysis

These properties make hexagonal grids useful for investigating geographic patterns and local neighbourhood relationships.

Actual H3 cells exist on a spherical representation of Earth, so geographic distances and cell shapes are not perfectly uniform. Pentagonal cells also introduce exceptions to ordinary hexagonal connectivity.

The geometric advantages of hexagons therefore do not eliminate the need for appropriate distance and area calculations.

Common H3 spatial operations

The H3 library provides functions for indexing coordinates, retrieving cell geometries, navigating the hierarchy, and identifying spatial neighbourhoods.

The following examples use function names from the H3 version 4.x Python interface.

FunctionMain purpose

latlng_to_cell()

Converts geographic coordinates into an H3 cell

cell_to_latlng()

Retrieves the geographic centre of a cell

cell_to_boundary()

Retrieves cell boundary coordinates

cell_to_parent()

Retrieves a logical ancestor cell

cell_to_children()

Retrieves logical descendant cells

grid_disk()

Retrieves cells within a specified number of grid steps

grid_distance()

Calculates grid-step separation between comparable cells

cell_area()

Calculates the area of an individual cell

polygon_to_cells()

Converts polygonal regions into H3 cell collections using the standard containment rule

Sources: H3 indexing functions, hierarchical grid functions, grid traversal functions, region functions, and miscellaneous functions.

Function names may differ between programming languages and earlier H3 library versions.

How H3 neighbourhood analysis works

H3 can identify cells surrounding a specified origin cell.

The grid disk operation returns cells within a maximum grid distance from that origin.

In an ordinary hexagonal neighbourhood unaffected by pentagonal distortion, the number of cells follows a simple geometric relationship.

Maximum grid distance (k)Cells in outer ringTotal cells in grid disk

0

1

1

1

6

7

2

12

19

3

18

37

4

24

61

5

30

91

For an ideal hexagonal neighbourhood, the total number of cells within k steps is:

Total cells = 1 + 3k(k + 1)

Actual H3 neighbourhoods may contain fewer cells when affected by pentagonal distortion.

This type of operation can help identify geographic records associated with surrounding cells without calculating the distance between every possible pair of observations.

Conceptual hexagonal grid showing one dark blue origin cell, six light blue cells at grid distance one, and twelve grey cells at grid distance two, forming a neighbourhood of nineteen cells.
An ordinary hexagonal grid disk expands from one origin cell to seven cells at grid distance one and nineteen cells at grid distance two. Grid steps are not equivalent to geographic distance in metres.

Grid distance versus geographic distance

Grid distance measures the number of adjacent-cell movements required to travel between H3 cells.

It is not a direct measurement in metres or kilometres.

Two locations separated by the same number of grid steps may have different geographic distances. Their practical travel distances can also differ because of roads, physical barriers, and access restrictions.

A grid disk should not automatically be interpreted as a circular buffer with an exact metric radius.

For applications requiring all establishments within precisely 500 metres of a location, H3 may be used to identify candidate records, followed by appropriate geographic distance calculations.

Some H3 grid-distance operations may also fail when cells are too far apart, have incompatible resolutions, or are affected by pentagonal distortion. These limitations are documented in the H3 grid traversal reference.

How H3 is used to organise POI data

POI datasets typically represent businesses, facilities, landmarks, and other identifiable places using geographic coordinates.

By assigning an H3 identifier to each POI, these records can be organised within a common spatial framework.

Consider a hypothetical dataset containing five establishments.

POI IDPrimary categoryH3 resolutionConceptual cell label

P001

Restaurant

9

Cell A

P002

Pharmacy

9

Cell A

P003

Café

9

Cell A

P004

Supermarket

9

Cell B

P005

Hospital

9

Cell C

Cell A, Cell B, and Cell C are illustrative labels, not actual hexadecimal H3 identifiers.

The resulting structure allows users to identify POIs sharing a spatial cell, summarise business categories by geographic area, or retrieve records from neighbouring cells.

The original POI identifier and coordinates should remain available because several distinct establishments may share the same H3 cell.

Combining H3 and administrative boundaries

Administrative boundaries and H3 provide complementary methods for organising location data.

Administrative boundaries describe geographic jurisdictions, while H3 cells are defined algorithmically.

A POI dataset can contain both administrative identifiers and H3 cell identifiers.

Geographic structureExample representation

POI identity

P001

National jurisdiction

Country identifier

First-level administrative region

ADM1 identifier

Second-level administrative region

ADM2 identifier

Spatial index

H3 cell identifier

Original geographic position

Latitude and longitude

This structure allows users to select records by country, district, or spatial cell without losing the original geographic information.

An international POI dataset can therefore support both conventional administrative filtering and grid-based analysis.

H3 spatial indexing versus administrative boundaries

Administrative boundaries and H3 are designed for different geographic purposes.

The World Bank's Global Administrative Boundaries programme, for example, defines national and subnational geographic levels that support administrative data integration.

H3 provides a geographic framework independent of those jurisdictional definitions.

CharacteristicAdministrative boundariesH3 spatial indexing

Geographic definition

Administrative or territorial units

Algorithmically generated cells

Hierarchy

Country-specific subdivisions

Resolution levels 0–15

Geographic shape

Variable polygons

Predominantly hexagonal cells

Area consistency

Can vary substantially

Depends on resolution and position

Political boundary alignment

Follows the selected territorial representation

Independent of administrative boundaries

Typical application

Regional reporting and jurisdictional filtering

Spatial indexing and neighbourhood analysis

An H3 cell may overlap more than one administrative region.

The standard polygon_to_cells() operation uses cell-centre containment to determine inclusion within a polygon. Therefore, the resulting collection of cells is not necessarily an exact geographic representation of the original polygon.

Some included cells may extend beyond its boundary, while other cells intersecting the polygon may have their centres outside it.

When exact administrative membership matters, analysts should verify individual geographic coordinates against the original administrative boundary polygons.

How H3 supports geographic data enrichment

H3 can provide a shared spatial framework for integrating multiple geographic datasets.

For example, geographic variables derived from population rasters, building footprints, nighttime lights, and road networks can be summarised within H3 cells and associated with POI records.

DatasetPossible H3-based variable

POI data

Establishment count by category

Population raster

Estimated population within a cell

Building footprints

Combined building coverage

Nighttime lights

Area-weighted mean radiance

Road network

Road length within a cell

Foot traffic

Aggregated visits within a defined period

These integrations require different spatial and statistical operations.

Population counts may require area-based allocation or another appropriate redistribution method. Building areas should account for polygon intersections. Road lengths should include only relevant portions of line geometries within each cell.

Nighttime radiance should be summarised using an appropriate statistic rather than treated as an additive population-like quantity.

Assigning a common H3 identifier does not automatically make the underlying datasets geographically or temporally compatible.

Source resolution, measurement definitions, observation dates, missing values, and allocation methods must still be considered.

A practical example of H3-based POI density analysis

Suppose a location intelligence analyst is comparing three hypothetical cells at the same H3 resolution.

Each cell contains a different number of establishments and has a different geographic area.

IndicatorCell ACell BCell C

H3 resolution

9

9

9

Geographic cell area

0.10 km²

0.12 km²

0.09 km²

Number of POIs

40

45

18

POI density

400/km²

375/km²

200/km²

POI density is calculated by dividing the number of establishments by the individual cell area.

Although Cell B contains more POIs than Cell A, Cell A has a higher concentration of establishments per square kilometre.

This example demonstrates why cell counts and area-normalised indicators can produce different geographic interpretations.

All values are hypothetical and do not correspond to measured H3 cells or actual Gridatum observations.

A higher POI density also does not independently establish greater commercial demand, higher visitor activity, or superior business performance.

How to choose the appropriate H3 resolution

There is no universally correct H3 resolution for every geographic application.

The appropriate level depends on the spatial scale of the question, the quality of the source coordinates, the geographic coverage, and the required statistical reliability.

The following resolution ranges provide illustrative starting points rather than mandatory standards.

Analytical objectivePossible starting resolutions

Large regional geographic summaries

3–5

Metropolitan and regional market analysis

6–7

Urban neighbourhood comparison

8–9

Local business concentration analysis

9–10

Highly local geographic analysis

11–12

Finer resolutions may produce greater geographic detail but also increase the number of sparsely populated or empty cells.

For example, a dataset containing relatively few establishments across a large rural area may produce more useful summaries at a coarser resolution.

By contrast, a densely developed urban environment may contain sufficient records for more detailed geographic aggregation.

Resolution selection should also consider the accuracy of the original observations. Assigning an imprecisely located POI to a very small cell does not improve the accuracy of its geographic coordinates.

What is H3 spatial indexing used for?

Location intelligence and market research

H3 can help organise competitor locations, identify business concentrations, compare neighbourhoods, and integrate geographic demand indicators.

A common grid structure can support comparisons across areas with different administrative systems.

Mobility and foot traffic analysis

Movement observations can be associated with H3 cells to investigate spatial activity patterns and geographic flows.

However, assigning device locations to H3 cells does not eliminate sampling bias or establish that a detected device represents a unique person.

Fine-resolution mobility information can also present privacy risks, even when exact coordinates are removed.

Geographic data retrieval

Spatial indexes can support geographic filtering and candidate selection in large datasets.

For example, an application may retrieve POIs associated with a selected collection of H3 cells before applying additional category, administrative, or distance filters.

The actual performance improvement depends on database architecture, index design, query structure, and data distribution.

Spatial modelling and machine learning

H3 provides a geographic framework for grouping explanatory variables and target observations.

Population, building coverage, road density, and other geographic characteristics can be integrated into cell-level analytical datasets.

Nevertheless, neighbouring cells may share related conditions. Spatial dependence should be considered when validating models intended to predict outcomes in previously unobserved geographic areas.

What are the limitations of H3 spatial indexing?

H3 provides useful geographic structure but does not eliminate several fundamental challenges in spatial analysis.

LimitationAnalytical implication

Variable cell area

Density calculations require appropriate area measurements

Approximate geometric hierarchy

Parent-based aggregation can differ from direct geographic indexing

Boundary effects

Nearby observations may fall into different cells

Resolution sensitivity

Geographic patterns can change at different resolutions

Pentagon distortion

Certain neighbourhood and traversal operations require special handling

Loss of point detail

Cell identifiers cannot reconstruct original coordinates

Source data limitations

Indexing does not correct inaccurate or incomplete observations

Privacy risks

Fine-resolution indexing does not guarantee anonymisation

The choice of cell resolution can also influence observed spatial patterns. This is related to the broader problem of geographic aggregation sensitivity, including the modifiable areal unit problem.

Analysts should investigate whether conclusions remain reasonably stable across suitable alternative resolutions.

Frequently asked questions

Is H3 an open-source spatial indexing system?

Yes. H3 is an open-source geospatial indexing system distributed under the Apache 2.0 licence, as documented on the official H3 project website.

Does every H3 cell have six neighbours?

An ordinary H3 hexagonal cell generally has six adjacent cells, while a pentagonal cell has five. Traversal operations around pentagons can require additional considerations.

Are H3 cells equal-area cells?

No. Geographic cell areas vary according to their resolution and position within the global grid.

Can H3 replace latitude and longitude?

H3 can provide a useful additional spatial representation, but it does not preserve an exact original geographic coordinate. Retaining both coordinates and H3 identifiers is often appropriate.

Can H3 replace administrative boundaries?

Not when administrative membership or official territorial reporting is required. H3 and administrative boundaries support different but complementary geographic functions.

Does a higher H3 resolution improve geographic accuracy?

No. It provides a finer spatial representation but does not improve the accuracy of the underlying geographic observations.

Can H3 calculate road travel distance?

H3 provides grid-based neighbourhood and distance operations. Actual road travel distance requires an appropriate transportation network and routing methodology.

Conclusion

H3 spatial indexing provides a hierarchical geographic framework for organising locations into identifiable cells at multiple spatial resolutions.

Its indexing structure supports geographic aggregation, neighbourhood analysis, POI organisation, spatial data integration, and location intelligence.

The system is particularly useful when geographic datasets need a consistent spatial framework that is independent of administrative boundaries.

Reliable H3 analysis requires an understanding of resolution, individual cell area, hierarchical relationships, geographic containment, and the limitations of the original data.

When combined with administrative identifiers, original geographic coordinates, and complementary geographic attributes, H3 can provide a flexible foundation for structured geospatial datasets and reproducible spatial analysis.

References