Analytics Toolbox for PostgreSQL

Analytics Toolbox for PostgreSQL


Tilesets enable to process and visualize very large spatial datasets (millions or even billions of rows) stored in your PostgreSQL database.

How it works

The tiler procedures will process your data and create a complete tileset out of it. All the map tiles for the specified zoom range will be stored in a PostgreSQL table in MVT format. Each individual tile is a row in this table, with the tile coordinates and the corresponding geometry data stored in different columns:

Row z x y data
1 16 45340 24576 H4sIAAAAAAAA/5Py52JPdt3eyCLEwM (…)
2 16 45292 24576 H4sIAAAAAAAA/5Py52JjLM0pEZLgWL (…)

Visualizing and publishing your tilesets is straight-forward using Builder, the map making tool integrated into the CARTO Workspace.

The integration of tilesets with custom web map applications is also possible with CARTO Maps API, which will connect to PostgreSQL using your connection’s credentials to fetch and serve the tiles.

Tileset types and procedures

We currently support the creation of aggregation tilesets, which encode aggregations over the input features, and simple tilesets, which instead encode all the input features as is. In a nutshell, you should use simple tilesets for visualizing a dataset of world rivers, but use an aggregation tileset to visualize a heatmap of the trees distribution in New York City.

We provide the following set of procedures to create tilesets:


    • This procedure creates a simple tileset. You should use it if you have a dataset with any geography type (point, line, or polygon) and you want to visualize it at an appropriate zoom level.
    • The geographies will be represented exactly as stored in PostgreSQL, which means that if they are too small to be visible at a certain zoom level they won’t be included in the tiles at that zoom level.
    • The values associated with each feature are the same as the ones available in the source dataset.

    • Use this procedure if you have a point dataset (or anything that can be converted to points, such as polygon centroids) and you want to see it aggregated.
    • The points will be aggregated into cells. Each feature or cell represents all the points that fall under it, so the associated properties available for visualization are generated by aggregating the values in the source dataset.dataset.

The tiler can be run directly as SQL commands in PostgreSQL. The data never leaves PostgreSQL so you won’t have to worry about security and additional ETLs.