com.esri.arcgis.geometry
Interface ILine

All Superinterfaces:
ICurve, IGeometry, Serializable
All Known Subinterfaces:
ILine2
All Known Implementing Classes:
Line

public interface ILine
extends ICurve, Serializable

Provides access to members that identify a straight line segment and defines its properties.

Superseded By

ILine2

Remarks


The PutCoords method requires 2 Point objects to construct the line segment.

Line Example

Product Availability

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

See Also:
IPoint, IConstructLine, IGeometry, ISegment

Method Summary
 double getAngle()
          The angle between this line and the positive x-axis.
 void putCoords(IPoint from, IPoint to)
          Sets this line's endpoints to be 'from' and 'to'.
 void queryCoords(IPoint from, IPoint to)
          Copies the endpoints of this line to 'from' and 'to'.
 
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

putCoords

void putCoords(IPoint from,
               IPoint to)
               throws IOException,
                      AutomationException
Sets this line's endpoints to be 'from' and 'to'.

Description

The PutCoords method sets the From Point and To Point for a line object. If the From Point and To Point are identical, it creates a zero Length line with the same start and endpoint.

Remarks

Line PutCoords Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
from - A reference to a com.esri.arcgis.geometry.IPoint (in)
to - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryCoords

void queryCoords(IPoint from,
                 IPoint to)
                 throws IOException,
                        AutomationException
Copies the endpoints of this line to 'from' and 'to'.

Description

Queries the From and To Points of the Line. These are the only parameters necessary to create a well-defined line.

Remarks

Line QueryCoords Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
from - A reference to a com.esri.arcgis.geometry.IPoint (in)
to - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAngle

double getAngle()
                throws IOException,
                       AutomationException
The angle between this line and the positive x-axis.

Remarks


The following Visual Basic example gets the angle of a line and converts it to degrees :

dAngleDegree = (180 * pLine.Angle) / Pi

Where Pi = 4 * Atn(1)

Line Angle Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The outAngle
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.