Converts a SuperMap hypergraph-based sfmesh object to a World Geodetic System 1984 (WGS84)-based sfmesh object. The input sfmesh uses the east-north-up (ENU) local coordinate system; after conversion, the object is expressed in WGS84 (SRID 4326).
Syntax
sfmesh ST_FromSuperMap(sfmesh mesh)Parameters
| Parameter | Description |
|---|---|
mesh | The SuperMap hypergraph-based sfmesh object to convert. |
Example
The following query converts all sfmesh objects in the t_sm_mesh table from the SuperMap hypergraph coordinate system to WGS84 and returns each result as text.
SELECT ST_AsText(ST_FromSuperMap(the_mesh))
FROM t_sm_mesh
ORDER BY num;Expected output:
{
"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}]
}The "srid": 4326 field confirms the object is now in WGS84.
See also
ST_AsText: Converts an sfmesh object to its text representation, as used in the example above.