Package com.esri.core.geometry
Class Proximity2DResult
- java.lang.Object
-
- com.esri.core.geometry.Proximity2DResult
-
public class Proximity2DResult extends java.lang.Object
Proximity operators are used to find the distance between two geometries or the distance from a given point to the nearest point on another geometry.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Point2D
m_coordinate
(package private) double
m_distance
(package private) int
m_info
(package private) int
m_vertexIndex
-
Constructor Summary
Constructors Constructor Description Proximity2DResult()
Proximity2DResult(Point2D coordinate, int vertexIndex, double distance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
_setParams(double x, double y, int vertexIndex, double distance)
Point
getCoordinate()
Returns the closest coordinate for OperatorProximity2D.getNearestCoordinate or the vertex coordinates for the OperatorProximity2D.getNearestVertex and OperatorProximity2D.getNearestVertices.double
getDistance()
Returns the distance to the closest vertex or coordinate.int
getVertexIndex()
Returns the vertex index.boolean
isEmpty()
Returns TRUE if the Proximity2DResult is empty.boolean
isRightSide()
Returns true if the closest coordinate is to the right of the MultiPath.void
setRightSide(boolean bRight)
Sets the right_side info to true or false.
-
-
-
Field Detail
-
m_coordinate
Point2D m_coordinate
-
m_vertexIndex
int m_vertexIndex
-
m_distance
double m_distance
-
m_info
int m_info
-
-
Constructor Detail
-
Proximity2DResult
Proximity2DResult()
-
Proximity2DResult
Proximity2DResult(Point2D coordinate, int vertexIndex, double distance)
-
-
Method Detail
-
setRightSide
public void setRightSide(boolean bRight)
Sets the right_side info to true or false.- Parameters:
bRight
- Whether the nearest coordinate is to the right or left of the geometry.
-
isEmpty
public boolean isEmpty()
Returns TRUE if the Proximity2DResult is empty. This only happens if the Geometry passed to the Proximity operator is empty.
-
getCoordinate
public Point getCoordinate()
Returns the closest coordinate for OperatorProximity2D.getNearestCoordinate or the vertex coordinates for the OperatorProximity2D.getNearestVertex and OperatorProximity2D.getNearestVertices.
-
getVertexIndex
public int getVertexIndex()
Returns the vertex index. For OperatorProximity2D.getNearestCoordinate the behavior is: When the input is a polygon or an envelope and the bTestPolygonInterior is true, the value is zero. When the input is a polygon or an Envelope and the bTestPolygonInterior is false, the value is the start vertex index of a segment with the closest coordinate. When the input is a polyline, the value is the start vertex index of a segment with the closest coordinate. When the input is a point, the value is 0. When the input is a multipoint, the value is the closest vertex.
-
getDistance
public double getDistance()
Returns the distance to the closest vertex or coordinate.
-
isRightSide
public boolean isRightSide()
Returns true if the closest coordinate is to the right of the MultiPath.
-
_setParams
void _setParams(double x, double y, int vertexIndex, double distance)
-
-