Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a function in ORACLE PL/SQL to calculate the area of a polygon?

A polygon in terms of oracle spatial data (SDO_GEOMETRY). The polygon is formed by geographic coordinates and can be irregular.

like image 252
Sofia Bravo Avatar asked Nov 17 '25 16:11

Sofia Bravo


1 Answers

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.

like image 70
Dba Avatar answered Nov 20 '25 13:11

Dba



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!