Class MapViewState.MapViewPoint

    • Method Detail

      • getMapViewState

        public MapViewState getMapViewState()
        Gets the map view state this path is used for.
        Returns:
        The state.
        Since:
        12505
      • getInView

        public java.awt.geom.Point2D getInView()
        Get this point in view coordinates.
        Returns:
        The point in view coordinates.
      • getInViewX

        public abstract double getInViewX()
        Get the x coordinate in view space without creating an intermediate object.
        Returns:
        The x coordinate
        Since:
        10827
      • getInViewY

        public abstract double getInViewY()
        Get the y coordinate in view space without creating an intermediate object.
        Returns:
        The y coordinate
        Since:
        10827
      • getInWindow

        public java.awt.geom.Point2D getInWindow()
        Convert this point to window coordinates.
        Returns:
        The point in window coordinates.
      • getOnScreen

        public java.awt.geom.Point2D getOnScreen()
        Convert this point to screen coordinates.
        Returns:
        The point in screen coordinates.
      • getUsingCorner

        private java.awt.geom.Point2D.Double getUsingCorner​(java.awt.Point corner)
      • getLatLon

        public LatLon getLatLon()
        Gets the current position in LatLon coordinates according to the current projection.
        Returns:
        The position as LatLon.
        See Also:
        getLatLonClamped()
      • getLatLonClamped

        public LatLon getLatLonClamped()
        Gets the latlon coordinate clamped to the current world area.
        Returns:
        The lat/lon coordinate
        Since:
        10805
      • isInView

        public boolean isInView()
        Check if this point is inside the view bounds. This is the case iff getOutsideRectangleFlags(getViewArea()) returns no flags
        Returns:
        true if it is.
        Since:
        10827
      • inRange

        private boolean inRange​(double val,
                                int min,
                                double max)
      • getOutsideRectangleFlags

        public int getOutsideRectangleFlags​(MapViewState.MapViewRectangle rect)
        Gets the direction in which this point is outside of the given view rectangle.
        Parameters:
        rect - The rectangle to check against.
        Returns:
        The direction in which it is outside of the view, as OUTSIDE_... flags.
        Since:
        10827
      • oneNormInView

        public double oneNormInView​(MapViewState.MapViewPoint p2)
        Gets the sum of the x/y view distances between the points. |x1 - x2| + |y1 - y2|
        Parameters:
        p2 - The other point
        Returns:
        The norm
        Since:
        10827
      • distanceToInViewSq

        public double distanceToInViewSq​(MapViewState.MapViewPoint p2)
        Gets the squared distance between this point and an other point.
        Parameters:
        p2 - The other point
        Returns:
        The squared distance.
        Since:
        10827
      • distanceToInView

        public double distanceToInView​(MapViewState.MapViewPoint p2)
        Gets the distance between this point and an other point.
        Parameters:
        p2 - The other point
        Returns:
        The distance.
        Since:
        10827