Is there a function in ORACLE PL/SQL to calculate the area of a polygon?
oracle, oracle-spatial, plsql, polygon, polygons
Solution
The below function return the area of the `GEOMETRY` also it works with any polygon including polygons with holes.
SELECT SDO_GEOM.SDO_AREA(<geometry_column_name>, <tolerance_value>)
FROM <table_name>;
Where `TOLERANCE_VALUE` is used to associate a level of precision with spatial data. Refer here for more in detail.
Problem
A polygon in terms of oracle spatial data (SDO_GEOMETRY). The polygon is formed by geographic coordinates and can be irregular.