Class Overview
A straight line between a pair of points.
Summary
Public Constructors |
|
Line()
Creates a line segment.
|
[Expand]
Inherited Methods |
From class
com.esri.core.geometry.Segment
double
|
calculateArea2D()
Calculates the area of the geometry.
|
void
|
copyTo(Geometry dst)
Copies this geometry to another geometry of the same type.
|
final
int
|
getDimension()
Returns the topological dimension of the geometry object based on the geometry's type.
|
double
|
getEndX()
Returns the X coordinate of ending point.
|
double
|
getEndY()
Returns the Y coordinate of ending point.
|
double
|
getStartX()
Returns the X coordinate of starting point.
|
double
|
getStartY()
Returns the Y coordinate of starting point.
|
abstract
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.
|
final
boolean
|
isEmpty()
Indicates if the geometry object contains geometric information.
|
boolean
|
isEmptyImpl()
Non public abstract version of the function.
|
void
|
queryEnd(Point dstPoint)
Returns coordinates of the end point in this segment.
|
void
|
queryStart(Point dstPoint)
Returns coordinates of the start point in a Point class.
|
final
void
|
setEmpty()
Sets the geometry to its original initialization state by releasing all data referenced by the geometry.
|
void
|
setEnd(Point srcPoint)
Sets the coordinates of the end point in a Point class.
|
void
|
setStart(Point srcPoint)
Sets the coordinates of the start point in this segment.
|
|
From class
com.esri.core.geometry.Geometry
Object
|
_getImpl()
Returns implementation class of the geometry.
|
abstract
void
|
applyTransformation(Transformation2D transform)
Applies 2D affine transformation in XY plane.
|
double
|
calculateArea2D()
Calculates the area of the geometry.
|
double
|
calculateLength2D()
Calculates the length of the geometry.
|
Geometry
|
copy()
Creates a copy of the geometry.
|
abstract
void
|
copyTo(Geometry dst)
Copies this geometry to another geometry of the same type.
|
abstract
int
|
getDimension()
Returns the topological dimension of the geometry object based on the geometry's type.
|
static
int
|
getDimensionFromType(int type)
Returns an integer for this geometry's dimension.
|
int
|
getStateFlag()
Returns the state of the geometry.
|
abstract
Geometry.Type
|
getType()
Returns the geometry type.
|
static
boolean
|
isArea(int type)
Indicates if the integer value of the enumeration is an area (dimension 2).
|
abstract
boolean
|
isEmpty()
Indicates if the geometry object contains geometric information.
|
static
boolean
|
isLinear(int type)
Indicates if the integer value of the enumeration is linear (dimension 1).
|
static
boolean
|
isMultiPath(int type)
Indicates if the integer value of the enumeration is a multipath (ie, line or area).
|
static
boolean
|
isMultiVertex(int type)
Indicates if the integer value of the enumeration is a multivertex (ie, multipoint, line, or area).
|
static
boolean
|
isPoint(int type)
Indicates if the integer value of the enumeration is a point type (dimension 0).
|
static
boolean
|
isSegment(int type)
Indicates if the integer value of the enumeration is a segment.
|
abstract
void
|
queryEnvelope(Envelope env)
Gets the axis aligned bounding box of the geometry.
|
abstract
void
|
setEmpty()
Sets the geometry to its original initialization state by releasing all data referenced by the geometry.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
Public Methods
public
void
applyTransformation
(Transformation2D transform)
Applies 2D affine transformation in XY plane.
Parameters
transform |
The affine transformation to be applied to this geometry. |
public
double
calculateLength2D
()
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
.
Returns
- A double value representing the 2D length of the geometry.
public
Geometry
createInstance
()
Creates an instance of an empty geometry of the same type.
Returns the geometry type.
Returns
- Returns the geometry type.
public
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.
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).
public
boolean
isCurve
()
Indicates if the line segment is a curve.
public
void
queryEnvelope
(Envelope env)
Gets the axis aligned bounding box of the geometry.
Parameters
env |
The envelope to return the result in. |