ArcObjects Library Reference (Geometry)  

IPolyline Interface

Provides access to members that identify and add behavior to a polyline object. Note: the IPolyline interface has been superseded byIPolyline5. Please consider using the more recent version.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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

Description
Method Densify Converts this polycurve into a piecewise linear approximation of itself.
Read-only property Dimension The topological dimension of this geometry.
Read-only property Envelope Creates a copy of this geometry's envelope and returns it.
Read/write property FromPoint The 'from' point of the curve.
Method Generalize Generalizes this polycurve using the Douglas-Poiker algorithm.
Read-only property GeometryType The type of this geometry.
Method GeoNormalize Shifts longitudes, if need be, into a continuous range of 360 degrees.
Method GeoNormalizeFromLongitude Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.
Method GetSubcurve Extracts a portion of this curve into a new curve.
Read-only property IsClosed Indicates if 'from' and 'to' points (of each part) are identical.
Read-only property IsEmpty Indicates whether this geometry contains any points.
Read-only property Length The length of the curve.
Method Project Projects this geometry into a new spatial reference.
Method QueryEnvelope Copies this geometry's envelope properties into the specified envelope.
Method QueryFromPoint Copies this curve's 'from' point to the input point.
Method QueryNormal Constructs a line normal to a curve from a point at a specified distance along the curve.
Method QueryPoint Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.
Method QueryPointAndDistance Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.
Method QueryTangent Constructs a line tangent to a curve from a point at a specified distance along the curve.
Method QueryToPoint Copies the curve's 'to' point into the input point.
Method Reshape Modifies this polyline by replacing some of its segments with some segments from reshapeSource.
Method ReverseOrientation Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).
Method SetEmpty Removes all points from this geometry.
Method 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.
Method Smooth Converts this curve into a smooth curve containing only Bezier curve segments.
Method SnapToSpatialReference Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
Read/write property SpatialReference The spatial reference associated with this geometry.
Method SplitAtDistance Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline.
Method SplitAtPoint Introduces a new vertex into this polyline at the location on it closest to the input point.
Read/write property ToPoint The 'to' point of the curve.
Method Weed Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.

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.

CoClasses that implement IPolyline

CoClasses and Classes Description
GeoPolyline (esriDefenseSolutions) This is a spheroidal polyline.
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.

 

Polylines

See Also

IGeometry Interface | IPolycurve Interface | IPath Interface | ISegmentCollection Interface | IGeometryCollection Interface | IPointCollection Interface | IConstructCurve Interface

.NET Snippets

Cut Polygon | Add Graphics Layer to Globe | Draw Polyline Using Input Geometry | Transform Point | Create Test Polyline from Geometry Environment | Get Polyline From Mouse Clicks

.NET Samples

Curve conversion add-in (Code Files: CurveConversionDockWin) | 3D multipatch examples (Code Files: ExtrusionExamples) | Custom reshape polyline edit task (Code Files: ReshapePolylineEditTask) | Visualizing the camera path while animating (Code Files: VisualizeCameraPath) | Points along line construction tool (Code Files: PointsAlongLineForm) | ViperPin tool (Code Files: ViperPinForm) | Custom UI elements using add-ins (Code Files: AddGraphicsTool) | Implementing an XML builder external component (Code Files: XMLDocImpl) | Move a graphic along a path in ArcMap (Code Files: AnimationUtils) | Creating a toolbar of globe tools (Code Files: PolylineGeometry) | StreetMap routing (Code Files: RoutingForm) | Create a custom tool (Code Files: DrawGraphicLine) | Custom selection extension (Code Files: SelectByLineTool) | Create a custom selection extension by extending ArcObjects (Code Files: SelectByLineTool) | Reducing schematic nodes and computing a cumulative attribute via a schematic rule (Code Files: NodeReductionRule) | Draw text on a MapControl (Code Files: DrawText)

.NET Related Topics

Adjusting feature locations with spatial adjustment | Building custom UI elements using add-ins | Create a custom tool | Creating features | How to create a multipart polyline | How to create a multipoint | How to create a multipoint object from the vertices of a polyline | How to create a polyline | How to modify a specific segment of a polyline | How to modify a specific vertex of a polyline | How to use the IEnumSegment methods | How to use the IEnumVertex methods | Working with GeometryEnvironment | Working with the edit sketch