Spatial Index support in CARTO

Leverage the power of Spatial Indexes in CARTO

How Spatial Indexes are supported in CARTO

As mentioned in the Introduction to Spatial Indexes, Spatial Indexes like H3 and Quadbin have their location encoded with a short reference string or number. CARTO is able to "read" that string as a geographic identifier, allowing Spatial Index features to be plotted on a map and used for spatial analysis.

Spatial Indexes & our Analytics Toolbox

CARTO's Analytics Toolbox is where you can find all of the tools and functions you need to turn data into insights - and Spatial indexes are an important part of this. Whether you are using CARTO Workflows for low-code analytics, or working directly with SQL, some of the most relevant modules include:

  • H3 or Quadbin modules for creating Spatial Indexes and working with unique spatial properties (e.g. conversion to/from geometries, K-rings).

  • Data module for enriching Spatial Indexes with geometry-based data .

  • Statistics module for leveraging Spatial Indexes to employ Spatial Data Science techniques such as Local Moran's I, Getis Ord and Geographically Weighted Regression.

  • Tiler module for generating tilesets from Spatial Indexes, enabling massive-scale visualizations.

Support for Spatial Indexes may differ depending on which cloud data warehouse you use - please refer to our documentation (links below) for details.

Visualizing Spatial Indexes in CARTO Builder

CARTO Builder provides a lot of functionality to allow you to craft powerful visualizations with Spatial Indexes.

The most important thing to know is that Spatial Index layers are always loaded by aggregation. This means that if you want to use a Spatial Index variable to control the color or 3D extrusion of your layer, you must select an aggregation method such as sum or average. Similarly, the properties for widgets and pop-ups are also aggregated. Because of this, all property selectors will let you select an aggregation operation for each property.

Let's explore the other aspects of visualizing Spatial Indexes!

Visualizing point data as Quadbins

If you add a small point geometry table (<30K rows or 30MB depending on your cloud data warehouse - more information here) to CARTO Builder, you can visualize it as a Quadbin Spatial Index without requiring any processing! By doing this, you can visualize aggregated properties, such as the point count or the sum of numeric variables.

Zoom-based rendering

One of the most powerful features of visualizing Spatial Indexes with CARTO is zoom-based rendering. As the user zooms in further to a map, more detail is revealed. This is incredibly useful for visualizing data at a scale which is appropriate and easy to understand.

Try exploring this functionality on the map below!

Note the maximum, most detailed resolution that can be rendered is the "native" resolution of the Spatial Index table.

Controlling the resolution

With Spatial Index data layers, you can control the granularity of the aggregation by specifying what resolution the Spatial Index should be rendered at. The higher the resolution, the higher the granularity of your grid for each zoom level. This is helpful for controlling the amount of information the user sees.

Note the maximum, most detailed resolution you can visualize is the "native" resolution of the table.

Learn more about styling your maps in our documentation.

Last updated