All Products
Search
Document Center

ApsaraDB RDS:ST_Tile

Last Updated:Mar 28, 2026

Generates an MVT-formatted standard binary structure from a tile ID in 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, encoded in 'z_x_y' format.
xThe x value in the tile ID.
yThe y value in the tile ID.
zThe z value in the tile ID.

Usage notes

ST_Tile returns an MVT-formatted standard binary structure based on the tile ID in a pyramid. The tile ID is encoded in 'z_x_y' format and must correspond to either the EPSG:4326 or EPSG:3857 coordinate system.

When using EPSG:4326:

  • The number of chunks on the x-axis is twice the number on the y-axis.

  • The z value starts from 1. At z=1, the only valid tile IDs are 1_0_0 and 1_1_0.

Examples

The following examples show both ways to call ST_Tile. Both calls return the same result — the first uses the key string format, and the second passes the x, y, and z values individually.

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