com.esri.core.geometry
Class Line

java.lang.Object
  extended by com.esri.core.geometry.Geometry
      extended by com.esri.core.geometry.Segment
          extended by com.esri.core.geometry.Line
All Implemented Interfaces:
Serializable

public final class Line
extends Segment
implements Serializable

A straight line between a pair of points.

Since:
1.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.esri.core.geometry.Geometry
Geometry.Type
 
Field Summary
 
Fields inherited from class com.esri.core.geometry.Geometry
m_description, m_touchFlag
 
Constructor Summary
Line()
          Creates a line segment.
 
Method Summary
 void applyTransformation(Transformation2D transform)
          Applies 2D affine transformation in XY plane.
 double calculateLength2D()
          Calculates the length of the geometry.
 Geometry createInstance()
          Creates an instance of an empty geometry of the same type.
 Geometry.Type getType()
          Returns the geometry type.
 int intersectionWithAxis2D(boolean bAxisX, double ordinate, double[] resultOrdinates, double[] parameters)
          Calculates intersection points of this segment with an infinite line, parallel to one of the axes.
 boolean isCurve()
          Indicates if the line segment is a curve.
 void queryEnvelope(Envelope env)
          Gets the axis aligned bounding box of the geometry.
 
Methods inherited from class com.esri.core.geometry.Segment
calculateArea2D, copyTo, getDimension, getEndX, getEndY, getStartX, getStartY, isEmpty, isEmptyImpl, queryEnd, queryStart, setEmpty, setEnd, setStart
 
Methods inherited from class com.esri.core.geometry.Geometry
_getImpl, copy, getDimensionFromType, getStateFlag, isArea, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Line

public Line()
Creates a line segment.

Since:
1.0
Method Detail

getType

public Geometry.Type getType()
Description copied from class: Geometry
Returns the geometry type.

Specified by:
getType in class Geometry
Returns:
Returns the geometry type.
Since:
1.0

calculateLength2D

public double calculateLength2D()
Description copied from class: Geometry
Calculates the length of the geometry. If the spatial reference is a Geographic Coordinate System (a system where coordinates are defined using angular units such as longitude and latitude) then the 2D distance calculation is returned in angular units. In cases where length must be calculated on a Geographic Coordinate System consider the using the geodeticLength method in GeometryEngine.

Overrides:
calculateLength2D in class Geometry
Returns:
A double value representing the 2D length of the geometry.

isCurve

public boolean isCurve()
Indicates if the line segment is a curve.

Since:
1.0

queryEnvelope

public void queryEnvelope(Envelope env)
Description copied from class: Geometry
Gets the axis aligned bounding box of the geometry.

Specified by:
queryEnvelope in class Geometry
Parameters:
env - The envelope to return the result in.
Since:
1.0

applyTransformation

public void applyTransformation(Transformation2D transform)
Description copied from class: Geometry
Applies 2D affine transformation in XY plane.

Specified by:
applyTransformation in class Geometry
Parameters:
transform - The affine transformation to be applied to this geometry.
Since:
1.0

createInstance

public Geometry createInstance()
Description copied from class: Geometry
Creates an instance of an empty geometry of the same type.

Since:
1.0

intersectionWithAxis2D

public int intersectionWithAxis2D(boolean bAxisX,
                                  double ordinate,
                                  double[] resultOrdinates,
                                  double[] parameters)
Description copied from class: Segment
Calculates intersection points of this segment with an infinite line, parallel to one of the axes.

Specified by:
intersectionWithAxis2D in class Segment
Parameters:
bAxisX - TRUE if the function works with the line parallel to the axis X.
ordinate - The ordinate value of the line (x for axis Y, y for axis X).
resultOrdinates - The value of ordinate in the intersection points One ordinate is equal to the ordinate parameter. This parameter can be NULL.
parameters - The value of the parameter in the intersection points (between 0 and 1). This parameter can be NULL.
Returns:
The number of intersection points, 0 when no intersection points exist, -1 when the segment coincides with the line (infinite number of intersection points).
Since:
1.0


Copyright © 2012. All Rights Reserved.