Provides access to members that identify and add behavior to a polyline object.
Description
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.
Members
Name | Description | |
---|---|---|
Densify | Converts this polycurve into a piecewise linear approximation of itself. | |
Dimension | The topological dimension of this geometry. | |
Envelope | Creates a copy of this geometry's envelope and returns it. | |
FromPoint | The 'from' point of the curve. | |
Generalize | Generalizes this polycurve using the Douglas-Peucker algorithm. | |
GeometryType | The type of this geometry. | |
GeoNormalize | Shifts longitudes, if need be, into a continuous range of 360 degrees. | |
GeoNormalizeFromLongitude | Normalizes longitudes into a continuous range containing the longitude. This method is obsolete. | |
GetSubcurve | Extracts a portion of this curve into a new curve. | |
IsClosed | Indicates if 'from' and 'to' points (of each part) are identical. | |
IsEmpty | Indicates whether this geometry contains any points. | |
Length | The length of the curve. | |
Project | Projects this geometry into a new spatial reference. | |
QueryEnvelope | Copies this geometry's envelope properties into the specified envelope. | |
QueryFromPoint | Copies this curve's 'from' point to the input point. | |
QueryNormal | Constructs a line normal to a curve from a point at a specified distance along the curve. | |
QueryPoint | Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve. | |
QueryPointAndDistance | Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items. | |
QueryTangent | Constructs a line tangent to a curve from a point at a specified distance along the curve. | |
QueryToPoint | Copies the curve's 'to' point into the input point. | |
Reshape | Modifies this polyline by replacing some of its segments with some segments from reshapeSource. | |
ReverseOrientation | Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc). | |
SetEmpty | Removes all points from this geometry. | |
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. | |
Smooth | Converts this curve into a smooth curve containing only Bezier curve segments. | |
SnapToSpatialReference | Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system. | |
SpatialReference | The spatial reference associated with this geometry. | |
SplitAtDistance | Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline. | |
SplitAtPoint | Introduces a new vertex into this polyline at the location on it closest to the input point. | |
ToPoint | The 'to' point of the curve. | |
Weed | Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box. |
IPolyline.Reshape Method
Modifies this polyline by replacing some of its segments with some segments from reshapeSource.
Public Function Reshape ( _
ByVal reshapeSource As IPath _
) As Boolean
public bool Reshape (
IPath reshapeSource
);
Description
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.
Remarks
Note: For multipart (more than one path) polyline output part ordering may not be preserved. The orientation of vertices within parts is preserved.
IPolyline.SimplifyNetwork Method
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.
Public Sub SimplifyNetwork ( _
)
public void SimplifyNetwork (
);
Description
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.
Remarks
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.
Inherited Interfaces
Interfaces | Description |
---|---|
IPolycurve | Provides access to members that define operations common to polylines and the boundaries of polygons. |
ICurve | Provides access to properties and methods of all 1 dimensional curves (polylines, segments, boundaries of polygons, etc.). |
IGeometry | Provides access to members that describe properties and behavior of all geometric objects. |
Classes that implement IPolyline
Classes | Description |
---|---|
Polyline | An ordered collection of paths; optionally has measure, height and ID attributes. |
Remarks
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.