ST_YupToZup

更新时间: 2026-03-28 08:04:58

Converts an sfmesh model from a Y-up coordinate system to a Z-up coordinate system by flipping the Y and Z axes.

Syntax

sfmesh ST_YupToZup(sfmesh mesh);

Return value

The sfmesh object after the Y and Z axes are flipped.

Parameters

ParameterDescription
sfmeshThe sfmesh object to convert.

Description

ST_YupToZup flips the Y and Z axes of an sfmesh object. This is equivalent to calling ST_Affine with the following transformation matrix:

1.0,  0,    0,   0,
0,    0,    1.0, 0,
0,   -1.0,  0,   0

Examples

SELECT ST_AsText(ST_YupToZup(ST_MeshFromText('{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}')));

Result:

{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0,"matrix" : [1,0,0,-1,0,0,0,0,1,0,0,0,0,0,0,1]}]}
上一篇: ST_FlipCoordinates 下一篇: ST_ZupToYup
阿里云首页 云原生数据库 PolarDB 相关技术圈