Returns the Level of Detail (LOD) of an sfmesh object as an integer.
Syntax
int4 ST_LOD(sfmesh sfmeshObject)Parameters
| Parameter | Description |
|---|---|
sfmeshObject | The sfmesh object to query. |
Description
ST_LOD returns the LOD value stored in the sfmesh object. The return value is the same integer that was set using ST_SetLod. To set the LOD on an sfmesh object, use ST_SetLod.
Example
The following example sets the LOD of an sfmesh object to 5 using ST_SetLod, then reads it back with ST_LOD.
SELECT ST_LOD(
ST_SetLod(
'{"version" : 1, "srid" : 4490, "root" : 0, "lod" :1, "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}]}'::sfmesh,
5
)
);Output:
5See also
ST_SetLod — Sets the LOD of an sfmesh object.