This topic describes the ST_Degeneralize function. This function decomposes a grid with low level into a grid with high level.
Syntax
geomgrid[] ST_Degeneralize(geomgrid gridcode, integer precision);
geomgrid[] ST_Degeneralize(geomgrid[] gridarray, integer precision);
Return value
The array of geographic grids.
Parameters
Parameter | Description |
gridcode | The geographic grid object. |
gridarray | The array of geographic grids. |
precision | The decomposition level. |
Description
This function decomposes geographic grids or a geographic grid array into a high-level grid array.
Examples
select st_astext(st_degeneralize(st_gridfromtext('G01'),3));
-----------------------
{G010,G011,G012,G013}
select st_astext(st_degeneralize(array[st_gridfromtext('GZ01'), st_gridfromtext('GZ1')],2));
------------------------------------------------
{GZ01,GZ10,GZ12,GZ14,GZ16,GZ11,GZ13,GZ15,GZ17}