All Products
Search
Document Center

PolarDB:ST_AsMeshGeom

Last Updated:Oct 10, 2023

This topic describes the ST_AsMeshGeom function. This function returns the meshgeom-type spatial range of a geographic grid.

Syntax

meshgeom ST_AsMeshGeom(geomgrid grid);
meshgeom[] ST_AsMeshGeom(geomgrid[] grid);

Parameters

Parameter

Description

grid

The geographic grid object to be converted.

Description

This function returns the meshgeom-type spatial range of a geographic grid.

Examples

SELECT ST_AsText(ST_AsMeshGeom(unnest(ST_As3DGrid(
  'srid=4490;POINT(116.31522216796875 39.910277777777778 1001.8)'::geometry, 20))));
   
                                   st_astext                  
--------------------------------------------------------------------------------------------------------------
 MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(116.315 39.91 970.027683307417,116.315 39.9105555555556 970.027683307417,
116.315555555556 39.9105555555556 970.027683307417,116.315555555556 39.91 970.027683307417,
116.315 39.91 1023.92243561707,116.315 39.9105555555556 1023.92243561707,
116.315555555556 39.9105555555556 1023.92243561707,116.315555555556 39.91 1023.92243561707),
INDEX((0,1,2,3),(4,7,6,5),(0,4,5,1),(3,2,6,7),(0,3,7,4),(1,5,6,2)))))