Class NeighborEdgeVertex


  • public class NeighborEdgeVertex
    extends Object
    Provides a minimal set of data elements for the result of a neighbor-edge location operation.
    • Constructor Detail

      • NeighborEdgeVertex

        public NeighborEdgeVertex​(IQuadEdge edge,
                                  double d,
                                  double x,
                                  double y,
                                  boolean interior)
        Standard constructor.
        Parameters:
        edge - the edge that starts with the vertex nearest (x,y)
        d - the distance of the vertex to (x,y)
        x - the X coordinate for the query point
        y - the Y coordinate for the query point
        interior - indicates that the query point is inside the TIN boundary,
    • Method Detail

      • getEdge

        public IQuadEdge getEdge()
        Gets the edge that begins with the vertex closest to the query coordinates. If the query point is in the interior of the TIN, it will lie either on the edge or inside the triangle to the left of the edge. If the query point lies to the exterior, it is possible that the associated edge may have an undefined termination (e.g. it may be a "ghost edge") so that its second vertex is null.
        Returns:
        a valid edge.
      • getNearestVertex

        public Vertex getNearestVertex()
        Gets the vertex nearest the query point. This method is the equivalent to a call to getEdge().getA().
        Returns:
        A valid vertex (never null).
      • getDistance

        public double getDistance()
        Gets the distance from the query point to the nearest vertex.
        Returns:
        a positive floating point value, potentially zero.
      • getX

        public double getX()
        Get the X coordinate of the query point
        Returns:
        a valid coordinate
      • getY

        public double getY()
        Get the Y coordinate of the query point
        Returns:
        a valid coordinate
      • isInterior

        public boolean isInterior()
        Indicates whether the query point was inside the convex polygon boundary of the TIN.
        Returns:
        true if the query point was inside the TIN; false otherwise