com.esri.arcgis.geometry
Interface ILine

All Superinterfaces:
ICurve, IGeometry, java.io.Serializable
All Known Subinterfaces:
ILine2
All Known Implementing Classes:
ILine2Proxy, ILineProxy, Line

public interface ILine
extends ICurve, java.io.Serializable

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Remarks


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

Line Example

See Also:
IPoint, 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

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

Supported Platforms

Windows, Solaris, Linux

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

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

queryCoords

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

Supported Platforms

Windows, Solaris, Linux

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

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

getAngle

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

Supported Platforms

Windows, Solaris, Linux

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

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