Class ProfilePoint

  • All Implemented Interfaces:
    Comparable<ProfilePoint>

    public class ProfilePoint
    extends Object
    implements Comparable<ProfilePoint>
    A point representing a position in a raster profile.

    The point is sortable by its progressive value.

    Note that two ProfilePoints are meant to be equal if the position and elevation are. This can be used to find touch points of two different profiles.

    The sort order of the ProfilePoint is handled only through its progressive value.

    Author:
    Andrea Antonello (www.hydrologis.com)
    • Constructor Detail

      • ProfilePoint

        public ProfilePoint​(double progressive,
                            double elevation,
                            org.locationtech.jts.geom.Coordinate position)
      • ProfilePoint

        public ProfilePoint​(double progressive,
                            double elevation,
                            double easting,
                            double northing)
    • Method Detail

      • getProgressive

        public double getProgressive()
      • getElevation

        public double getElevation()
      • getPosition

        public org.locationtech.jts.geom.Coordinate getPosition()
      • getMeanSlope

        public static double getMeanSlope​(List<ProfilePoint> points)
        Calculates the mean slope of a given set of profilepoints.
        Parameters:
        points - the points of the profile.
        Returns:
        the mean slope.
      • getLastVisiblePointData

        public static double[] getLastVisiblePointData​(List<ProfilePoint> profile)
        Return last visible point data for a profile points list.

        For the profile the min and max angles of "sight" are calculated. The min azimuth angle represents the "upper" line of sight, as thoght from the zenith.

        The max azimuth angle represents the "below the earth" line of sight (think of a viewer looking in direction nadir).

        The return values are in an array of doubles containing:

        • [0] min point elev,
        • [1] min point x,
        • [2] min point y,
        • [3] min point progressive,
        • [4] min point azimuth,
        • [5] max point elev,
        • [6] max point x,
        • [7] max point y,
        • [8] max point progressive,
        • [9] max point azimuth
        Parameters:
        profile - the profile to analize.
        Returns:
        the last visible point parameters.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object