ArcObjects Library Reference (Geometry) |
|
IGeometryServer.Simplify Method
Applies the ArcObjects 'Simplify' operation to each element of the geometry array.
[Visual Basic .NET]
Public Function Simplify ( _
ByVal pSR As ISpatialReference, _
ByVal pInGeometries As IGeometryArray _
) As IGeometryArray
[C#]
public IGeometryArray Simplify (
ISpatialReference pSR,
IGeometryArray pInGeometries
);
[C++]
HRESULT Simplify(
ISpatialReference* pSR,
IGeometryArray* pInGeometries
);
Product Availability
Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
Remarks
Applies the ArcObjects geometric simplification operation to a copy of each geometry in the input array, placing the result in ppSimplifiedGeometries. The input geometries are assumed to be specified in the input spatial reference pSR, which cannot be nil. The elements can be a mixture of points, multipoints, polylines or polygons. Elements that can’t be simplifed are replaced with empty geometries of the same type at the corresponding index entry in the output array.
Refer to IGeometryServer for additional details on how the input spatial reference is interpreted.
This operation uses the coordinate grid and the xy and z cluster tolerances of the spatial reference. For more information on these properties and how they can affect your coordinates, please refer to the ESRI whitepaper “Understanding Coordinate Management in the Geodatabase”: http://support.esri.com/index.cfm?fa=knowledgebase.whitepapers.viewPaper&PID=43&MetaID=1301
Simplify alters the input geometry making its definition "topologically legal" with respect to its geometry type:
- For Points, Simplify does nothing. A point has no constraints on the values of its coordinates.
-
For Multipoints, Simplify snaps all X, Y, Z, and M coordinates to the grid of the associated spatial reference (defined by the spatial reference’s false origin and xyUnits), then removes identical points. A point is identical to another point when the two have identical X and Y coordinates (after snapping), and when attributes for which it is aware are identical to the attributes for which the other point is aware. For example, if both points are Z aware, the Z coordinate values must be identical.
- Polylines are simplified using the SimplifyNetwork method. Coordinates are snapped, zero-length segments and empty parts are removed. Length is determined in 3D if the polyline has z coordinates, otherwise it is determined in 2D.
-
For Polygons, Simplify identifies an interior and exterior for the polygon, then modifies the polygon structure to be consistent with that determination. The methodology for identifying interior and exterior is:
1. Remove all dangles
2. Identify the largest legal rings, add them to the output version of the polygon, then delete them from the working version
3. Repeat
This operation uses the xy cluster tolerance of the associated spatial reference to determine when two vertices are the same, or when a vertex needs to be snapped to a line. This specific approach is subject to change in future releases of esri software. At the end of Simplify, no rings will overlap, no self intersection will occur (except in certain circumstances) and, in general, an arbitrary point can always be classified unambiguously as either outside, on the boundary of, or inside the polygon. All exterior rings are oriented clockwise. All interior rings (i.e. holes) are counter-clockwise.
See Also
IGeometryServer Interface