Hexagon Discretization

In this page, we will see how we can use AISDb to discretize AIS tracks to hexagons.

Introduction

Hexagonal Geospatial Indexing (H3): Uber’s hierarchical hexagonal geospatial indexing system, partitions the Earth into a multi-resolution hexagonal grid. Its key advantage over square grids is the β€œone-distance rule,” where all neighbors of a hexagon lie at comparable step distances.

As illustrated in the figure above, this uniformity removes the diagonal-versus-edge ambiguity present in square lattices. For maritime work, hexagons are great because they reduce directional bias and make neighborhood queries and aggregation intuitive.

Note: H3 indexes are 64-bit IDs typically shown as hex strings like β€œ860e4d31fffffff.”

Discretize AIS Lat/Lon points to hexagons using AISDb

The code below provides a complete example of how to connect to a database of AIS data using AISDb and generate the corresponding H3 index for each data point.

Refer to the example notebook here: https://github.com/AISViz/AISdb/blob/master/examples/discretize.ipynb

References

Last updated