All Products
Search
Document Center

PolarDB:ST_FromSuperMap

Last Updated:Jun 08, 2023

This topic describes the ST_FromSuperMap function. This function converts a hypergraph-based sfmesh object to a World Geodetic System 1984 (WGS84)-based sfmesh object.

Syntax

sfmesh ST_FromSuperMap(sfmesh  mesh);

Parameters

Parameter

Description

mesh

The sfmesh object that you want to convert.

Description

This function coverts a hypergraph-based sfmesh object to a WGS84-based sfmesh object to facilitate computations. A hypergraph-based sfmesh object is described by using the east-north-up (ENU) system and local coordinate system. This makes computing and query inconvenient.

Examples

SELECT ST_AsText(ST_FromSupermap(the_mesh))
FROM t_sm_mesh
ORDER BY num;
-----------------
 {"version" : 1, "srid" : 4326, "root" : 0, "meshes" : [{"root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(POINT Z (116.375228273102 40.000091623698 13.8479756591842)))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}], "primitives" : [{"mesh" : 0}], "nodes" : [{"children" : [1]}, {"primitive" : 0}]}