Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.58 KB

File metadata and controls

49 lines (36 loc) · 1.58 KB

ST_BuildArea

Introduction: Returns the areal geometry formed by the constituent linework of the input geometry.

ST_BuildArea

Format: ST_BuildArea (A: Geometry)

Return type: Geometry

Since: v1.2.1

SQL Example

SELECT ST_BuildArea(
    ST_GeomFromWKT('MULTILINESTRING((0 0, 20 0, 20 20, 0 20, 0 0),(2 2, 18 2, 18 18, 2 18, 2 2))')
) AS geom

Result:


+----------------------------------------------------------------------------+
|geom                                                                        |
+----------------------------------------------------------------------------+
|POLYGON((0 0,0 20,20 20,20 0,0 0),(2 2,18 2,18 18,2 18,2 2))                |
+----------------------------------------------------------------------------+