PostGIS

ST_3DArea

Prev

8.20. SFCGAL Functions

Next

Name

ST_3DArea — Computes area of 3D surface geometries. Will return 0 for solids.

Synopsis

floatST_3DArea(`geometry `geom1`)`;

Description

Availability: 2.1.0

check This method needs SFCGAL backend.

check This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 8.1, 10.5

check This function supports 3d and will not drop the z-index.

check This function supports Polyhedral surfaces.

check This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).

Examples

Note: By default a PolyhedralSurface built from WKT is a surface geometry, not solid. It therefore has surface area. Once converted to a solid, no area.

SELECT ST_3DArea(geom) As cube_surface_area,
    ST_3DArea(ST_MakeSolid(geom)) As solid_surface_area
  FROM (SELECT 'POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),
    ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)),
    ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),
    ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),
    ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)),
    ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )'::geometry) As f(geom);

 cube_surface_area | solid_surface_area
-------------------+--------------------
                 6 |                  0

See Also

Prev

Up

Next

postgis_sfcgal_full_version

Home

ST_3DConvexHull