I. Length of geometric objects
Format:
Sdo_geom.sdo_length (Geom In MDSYS. sdo_geometry, dim In MDSYS. sdo_dim_array [ , Unit in varchar2 ] ) Return Number ;
Or
Sdo_geom.sdo_length (Geom In MDSYS. sdo_geometry, Tol In Number [ , Unit in varchar2 ] ) Return Number ;
Note:
Returns the length or perimeter of a geometric object.
Parameter description:
Geom.: ry object.
Dim: array of dimension information corresponding to Geom, which is usually obtained from the xxx_sdo_geom_metadata view.
Unit: the unit of measurement. Use a string with quotation marks in the form of unit = value. The value is derived from a sdo_unit value in the MDSYS. sdo_dist_units table. If this parameter is not specified, the measurement unit is the unit associated with the data.
Tol: tol.
Usage notes
If the input polygon contains one or more holes, the function calculates the perimeter of the outer boundary and all holes, and then accumulates these perimeter to obtain the final total perimeter.
If the tol value is used in the function Format, all ry must be defined using a four-digit sdo_gtype value.
Example
The following example shows the ry perimeter in the "Exploration and Development Project. The SQL statement returns the perimeter of all ry.
Select C. xmmc, sdo_geom.sdo_length (C. geometry2, M. diminfo)
FromExploration and Development Project C, MDSYS. user_sdo_geom_metadata m
WhereM. table_name= 'Exploration and Development Projects'
AndM. column_name= 'Geometry2';
2. Area of the geometric object
Format:
Sdo_geom.sdo_area (Geom In MDSYS. sdo_geometry, dim In MDSYS. sdo_dim_array [ , Unit in varchar2 ] ) Return Number ;
Or
Sdo_geom. sdo_area (Geom In MDSYS. sdo_geometry, Tol In Number [ , Unit in varchar2 ] ) Return Number ;
Note:
Returns the area of a two-dimensional ry polygon.
Parameter description:
Geom.: ry object.
Dim: array of dimension information corresponding to Geom, which is usually obtained from the xxx_sdo_geom_metadata view.
Unit: the unit of measurement. Use a string with quotation marks in the form of unit = value. Its value comes from the MDSYS. sdo_area_units table (for example, unit = sq_km ).
If unit is specified, the value must come from the MDSYS. sdo_dist_units table. If no unit is specified, the unit value associated with the ry is used. The default measurement unit for location data is square meters.
Tol: tol.
Usage notes
This function can work on any polygon, including a polygon with holes. If the tol parameter is included, all ry must be defined using a four-digit sdo_gtype value.
Example
The following example shows the area of the ry in the "Exploration and Development Project. The SQL statement returns the area of all ry.
Select C. xmmc, sdo_geom.sdo_area (C. geometry2, M. diminfo)
from Exploration and Development Project C, MDSYS. user_sdo_geom_metadata m
where M. table_name = ' exploration and development project '
and M. column_name = ' geometry2 ' ;