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 to convert. |
Return value
Returns an sfmesh object with SRID 4326 (WGS84).
Description
Hypergraph-based sfmesh objects use the east-north-up (ENU) system and a local coordinate system. This makes computing and query inconvenient. Use ST_FromSuperMap after importing sfmesh data from SuperMap GIS to convert it to WGS84.
Example
SELECT ST_AsText(ST_FromSupermap(the_mesh))
FROM t_sm_mesh
ORDER BY num;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 output "srid": 4326 confirms the sfmesh object has been converted to WGS84.