All Products
Search
Document Center

PolarDB:ST_GridFromText

Last Updated:Oct 19, 2023

This topic describes the ST_GridFromText function. This function converts a grid from a string into a GeomGrid structure.

Syntax

geomgrid ST_GridFromText(text  XYCode);
geomgrid ST_GridFromText(text  XYCode, text  ZCode);

Parameters

Parameter

Description

XYCode

The 2D grid code that is in the string type.

ZCode

The height code in 3D grid split encoding.

Examples

SELECT ST_GridFromText('G0013103220310313');

   st_gridfromtext    
----------------------
 0102001074271B122020

SELECT ST_AsText(ST_GridFromText('G00131032223023031031','+10010'));
       st_astext        
------------------------
 GZ00262064446046072072