|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPolyline
Provides access to members that identify and add behavior to a polyline object.
A polyline is a collection of one or many paths. The paths do not have to be connected to each other. A polyline can be defined either as a PointCollection, SegmentCollection, or GeometryCollection. Each collection type allows the user to access and manipulate different aspects of the polyline geometry.
To define a polyline containing many disjoint paths, the polyline must be defined as a GeometryCollection to which preconstructed path geometries are added. Adding segments to a polyline defined as a SegmentCollection, or points to a polyline defined as a PointCollection, assumes that the polyline is a single path of connected segments.
IPolycurve
,
IPointCollection
,
IGeometry
,
IConstructCurve
,
ISegmentCollection
,
IGeometryCollection
,
IPath
Method Summary | |
---|---|
boolean |
reshape(IPath reshapeSource)
Modifies this polyline by replacing some of its segments with some segments from reshapeSource. |
void |
simplifyNetwork()
Removes zero length segments (zero in 2 dimensions), merges parts at endpoints that only connect to each other, reorients segments that are pointing against the prevailing orientation for a part. |
Methods inherited from interface com.esri.arcgis.geometry.IPolycurve |
---|
densify, generalize, smooth, splitAtDistance, splitAtPoint, weed |
Methods inherited from interface com.esri.arcgis.geometry.ICurve |
---|
getFromPoint, getLength, getSubcurve, getToPoint, isClosed, queryFromPoint, queryNormal, queryPoint, queryPointAndDistance, queryTangent, queryToPoint, reverseOrientation, setFromPoint, setToPoint |
Methods inherited from interface com.esri.arcgis.geometry.IGeometry |
---|
geoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference |
Method Detail |
---|
boolean reshape(IPath reshapeSource) throws IOException, AutomationException
Reshape replaces the Segments in the Polyline between consecutive Intersections with the input Path segments that connect those intersections. Reshape returns a boolean indicating whether or not a modification to the Polyline occurred.
Algorithm of Reshape method is described below:
1. Find the intersections of the Reshape path with the polyline parts. Select two intersection points: The first one to be closest to the one end of the Reshape path, and the second one to be closest to the other end of the Reshape path.
2. If both intersecion points belong to the same part of the polyline, replace all the segments of the Polyline part between the selected intersection points with the subcurve of the Reshape path that is between the selected intersecion points.
3. If the selected intersection points belong to the different parts of the polyline, then connect the part of the polyline with the subcurve of the reshape path and get rid of the superflous segments of the parts:
a. for the first selected intersecting part (in the stored part order), get rid of all segments after the selected intersection,
b. for the other selected intersecting part, get rid of all segments before the selected intersection point.
Leave the parts that are between the selected intersecting parts intact, even if they intersect the Reshape path.
Direction of the Reshape path does not matter and can change. The order of the parts is preserved.
Result is not simple. No intersection points are introduced except the selected two.
Note: For multipart (more than one path) polyline output part ordering may not be preserved. The orientation of vertices within parts is preserved.
reshapeSource
- A reference to a com.esri.arcgis.geometry.IPath (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPolyline.reshape(com.esri.arcgis.geometry.IPath)
,
IRing.reshape(com.esri.arcgis.geometry.IPath)
void simplifyNetwork() throws IOException, AutomationException
Performs a partial simplification of the Polyline to ensure necessary consistency for a valid Network but not true topological simplicity. SimplifyNetwork performs the following alterations to the base Polyline:
1) Deletes empty and zero length segments.
2) Removes empty parts.
3) Makes segment orientation mutually consistent. Ensures that the following FromPoints and preceding ToPoints of connected segments are equal.
4) Creates new parts for discontiguous segments or segments with different attributes.
5) Merge parts where exactly two parts share an endpoint.
6) For a pair of segments in a part that share an endpoint such that one segment has NaN attributes and the other has non-NaN attributes, assign the non-NaN attributes of one to the corresponding NaN slots of the other.
It is possbile for network features to have an inconsistent geometry requiring simplification, for example, a network edge can be a multipart feature whose parts share an endpoint. To correct the feature's geometry, set IsKnownSimple to False and call SimplifyNetwork on the feature to correct the inconsistency.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |