Select to view content in your preferred language

GeometryService.simplify() what exactly does it do?

1707
2
Jump to solution
01-31-2014 10:29 AM
JamieSimko
Regular Contributor
I want to add handling to my application to split up polygons into appropriate rings when they are self intersecting.

To do this I believe I want to perform a simplify but I want to make sure that this doesn't do anything else. The description in the API is kind of vague.

I guess the main thing I want to avoid are things like turning a shape with 10,000 points into 1,000 points (which I believe is what generalize or "maxAllowableOffset" in a query would be for).

Thanks,
- Jamie
0 Kudos
1 Solution

Accepted Solutions
derekswingley1
Deactivated User
The REST API docs has a little more info:  http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#

Unfortunately, the link to ITopologicalOperator.Simplify Method gives a 403. I think it's supposed to link here:  http://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#//000w000003w0000000

The relevant stuff is in the description section:


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. If this approach ends up removing too many segments for your application, consider using IPolygon4::SimplifyEx with the XOR parameter set to TRUE. 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.

View solution in original post

0 Kudos
2 Replies
derekswingley1
Deactivated User
The REST API docs has a little more info:  http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#

Unfortunately, the link to ITopologicalOperator.Simplify Method gives a 403. I think it's supposed to link here:  http://resources.arcgis.com/en/help/arcobjects-cpp/componenthelp/index.html#//000w000003w0000000

The relevant stuff is in the description section:


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. If this approach ends up removing too many segments for your application, consider using IPolygon4::SimplifyEx with the XOR parameter set to TRUE. 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.
0 Kudos
JamieSimko
Regular Contributor
Thanks Swingley, it didn't occur to me to check the rest API.
0 Kudos