All Products
Search
Document Center

PolarDB:ST_Tile

Last Updated:Mar 28, 2026

Returns a Mapbox Vector Tile (MVT)-formatted binary for a tile retrieved from a pyramid.

Syntax

bytea ST_Tile(cstring name, cstring key);
bytea ST_Tile(cstring name, int x, int y, int z);

Parameters

ParameterDescription
nameThe name of the pyramid.
keyThe tile ID in 'z_x_y' format.
xThe x value of the tile ID.
yThe y value of the tile ID.
zThe z value of the tile ID.

Description

ST_Tile queries a pyramid by tile ID and returns the tile as an MVT binary (bytea). Tile IDs follow the 'z_x_y' format and use the EPSG:3857 coordinate system (Web Mercator).

Pass the tile ID as a single string (key) or as three separate integers (x, y, z). Both forms return identical results.

Examples

Pass the tile ID as a string:

SELECT ST_Tile('roads', '3_1_6');
st_tile
----------
0xFFAABB8D8A6678...

Pass the tile ID as separate x, y, z integers:

SELECT ST_Tile('roads', 1, 6, 3);
st_tile
----------
0xFFAABB8D8A6678...