All Products
Search
Document Center

PolarDB:ST_GridFromBinary

Last Updated:Mar 28, 2026

Converts a grid from its binary structure into a GeomGrid object.

Syntax

geomgrid ST_GridFromBinary(bytea binary)

Parameters

ParameterDescription
binaryThe binary structure of the grid that you want to convert.

Example

The following example converts a binary-encoded grid back to a GeomGrid value and returns it as text.

SELECT ST_AsText(
  ST_GridFromBinary('\x01010c0f74271236'));

Output:

    st_astext
------------------
 G001310322230230