Format
SDO_SAM.SIMPLIFY_GEOMETRY( geom IN SDO_GEOMETRY, dim IN SDO_DIM_ARRAY, pct_area_change_limit IN NUMBER DEFAULT 2 ) RETURN SDO_GEOMETRY;
or
SDO_SAM.SIMPLIFY_GEOMETRY( geom IN SDO_GEOMETRY, tol IN NUMBER, pct_area_change_limit IN NUMBER DEFAULT 2 ) RETURN SDO_GEOMETRY;
Description
Simplifies a geometry.
Parameters
Geometry to be simplified.
Dimensional array for the geometry to be simplified.
Tolerance value (see Tolerance).
The percentage of area changed to be used for each simplification iteration, as explained in the Usage Notes.
Usage Notes
This function reduces the number of vertices in a geometry by internally applying the SDO_UTIL.SIMPLIFY function (documented in SDO_UTIL Package (Utility)) with an appropriate threshold value.
Reducing the number of vertices may result in a change in the area of the geometry. The pct_area_change_limit
parameter specifies how much area change can be tolerated while simplifying the geometry. It is usually a number from 1 to 100. The default value is 2; that is, the area of the geometry can either increase or decrease by at most two percent compared to the original geometry as a result of the geometry simplification.
Examples
The following example simplifies the geometries in the GEOMETRY column of the POLY_4PT_TEMP table.
SELECT sdo_sam.simplify_geometry(a.geometry, 0.00000005) FROM poly_4pt_temp a, user_sdo_geom_metadata b WHERE b.table_name='POLY_4PT_TEMP' ; SDO_SAM.SIMPLIFY_GEOMETRY(A.GEOMETRY,0.00000005)(ORIG_AREA, CUR_AREA, ORIG_LEN, -------------------------------------------------------------------------------- SDO_SMPL_GEOMETRY(28108.5905, 28108.5905, 758.440118, 758.440118, SDO_GEOMETRY(2 003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(-122.4215, 37.7862, -122.422, 37.7869, -122.421, 37.789, -122.42, 37.7866, -122.4215, 37.78 62))) SDO_SMPL_GEOMETRY(4105.33806, 4105.33806, 394.723053, 394.723053, SDO_GEOMETRY(2 003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(-122.4019, 37.8052, -122.4027, 37.8055, -122.4031, 37.806, -122.4012, 37.8052, -122.4019, 3 7.8052))) . . . 50 rows selected.