This guest post is by Smridh Malhotra.
Hexagons are a popular, useful way to view your data in thematic maps. They’re especially helpful when you want to look for patterns or clusters in large amounts of point data. Oracle Spatial Studio 21.2 includes a new aggregation feature based on H3 (Hexagonal Hierarchical Spatial Index) that makes it easy for users to summarize their data on a map.
H3 is a geospatial indexing system that divides the earth’s surface into hexagonal cells. It’s hierarchical, so can be subdivided into smaller grids at various resolutions. These cells bucket a user’s geospatial points, and can provide a summarization of their dataset, at resolutions ranging from 0.9 square meters to 4 million square meters.
Grid systems are a better way to aggregate datapoints than postal code areas, as these areas may have unusual shapes and sizes and may change over time. Grids do not align with streets and neighborhoods, but a group of grid cells can collectively represent such geometries.
Hexagonal cells, in particular, provide the advantage that a hexagon center-point is equidistant from all its neighbors, as compared to triangles or squares being used for a Grid System. This property greatly simplifies performing analysis and smoothing over gradients.
Hexagonal cells are color coded based on the number of datapoints they hold, which enable the users to easily understand patterns in their data.
Follow these steps to display H3 Aggregations in Spatial Studio. In this example, we will create a thematic map showing injuries from car crashes occurring in New York City.
Step 1: Prepare an H3 Aggregation Dataset
Go to the Datasets page. After you right click on the dataset you want, select ‘Create H3 Index’ from the ‘Prepare’ options. A dialog box will pop up. Select the geometry column for the H3 Aggregations. In this example, Longitude-Latitude is chosen.
You then have two options for summarizing the dataset:
- Count, which buckets the number of datapoints in each hexagon
- Sum, which adds up the values for a specific column in the data set, for all the points that fall in a specific hexagon
We want to view the number of total injuries here, so we select sum in this case. The name of the column in this example is “Number_Injured”.
The H3 Aggregation Dataset “NYC_CRASH_H3” will then be created.

Step 2: Use an H3 Aggregation Dataset in a Project
After the H3 Aggregation Dataset is created, it can directly be used in a Project.
On the Project Page, add the “NYC_CRASH_H3” (DATASET_NAME_H3) dataset to the project, and drag the dataset onto the canvas.

Step 3: Dataset Visualization
We can now immediately see a map showing the number of injuries from car crashes, binned into hexagons. In Spatial Studio, we can easily view map data at different resolutions, which is very useful when we want to view the overall big picture, or to zoom in to investigate data and patterns at more detail.
In H3, the hexagonal cells and the distribution of points in these hexagons automatically change at each resolution level, as we zoom in and out of the map. This means that the color bins for one level might not be the same as for another level. Spatial Studio provides an option to automatically calculate color bins as the user zooms in or out. Users can also turn this option off if they want to test against a set of specific thresholds.
Select your style settings:
- In the project, click on the menu next to the dataset, in the ‘Data’ tab of the ‘Layer List’. Select ‘Settings’.
- In the Style tab, select ‘Based on data’ for Color in ‘Fill’ Menu.
- You can toggle, ‘Automatically Adjust bin values’ in the options that follow.

If turned on, the bin values will automatically update as you zoom in or out on the map.
If turned off, you will be presented the option to ‘Create value bins’.
Note:
- H3 Aggregations is purely for visualization, and no further spatial analysis can be performed on the hexagons.
- H3 Aggregation datasets cannot be visualized using the table visualization.
- Visualization of H3 Aggregation may take some time in the initial run, depending upon the number of points in the dataset.
You can try out this powerful thematic mapping feature in the latest release of Spatial Studio. For more information, please visit Spatial Studio 21.2.
If you’d like to share your product feedback or requirements, click here to join the Analytics and Data Oracle User Community Slack workspace. Then post your feedback on Spatial Studio at the # spatial channel (https://andouc.slack.com/archives/C01C5XDE3T).
