Generates topologically correct geometry.
Simplify(SpatialReference SpatialReference, Geometry[] InGeometryArray)
Parameter |
Description |
SpatialReference |
SpatialReference of the geometries in the InGeometryArray.
Cannot be null. |
InGeometryArray |
The array of Geometry to be simplified. All
geometries are assumed to be in the coordinate system defined by the SpatialReference
parameter. |
Return Value
An array of Geometry (Geometry[]).
Remarks
Input geometry can be points, multipoints, polylines or polygons. Geometry that cannot be simplifed are replaced with empty geometries of the same type.
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,
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.
For Polylines, Simplify has
two variations: planar and non-planar. By default, polylines that are
not M-aware are simplified in a planar manner: all overlapping segments
are reduced to a single segment, and segments are split at intersection
points. Output paths are created for connected sequences of segments.
Input segment orientation is preserved where possible, but segments in
the interior of a path will be reoriented if necessary. Polylines that
are M-aware use non-planar simplification:
1. Overlaps and self-intersections are preserved, but zero length segments
are removed
2. Segment orientations are adjusted so that the 'to' point of segment
I is identical to (considering vertex attributes) the 'from' point of
Segment I+1
3. New paths are created where segments are not connected
4. Existing paths are merged where only two of them meet at a segment
endpoint
For Polygons, Simplify identifies
an interior and exterior for the polygon, then modifies the polygon structure
to be consistent with that determination. The default methodology for
identifying interior and exterior is:
1. Remove all dangling sequences of segments
2. Identify the largest legal rings, add them to the output version
of the polygon, then delete them from the working version
3. Repeat
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.
Examples