Class GeoStandardPath.BaseSegmentEndpoint

    • Field Detail

      • point

        protected final GeoPoint point
        The center point of the endpoint
      • NO_MEMBERSHIP

        protected static final Membership[] NO_MEMBERSHIP
        Null membership
    • Method Detail

      • distance

        public double distance​(DistanceStyle distanceStyle,
                               double x,
                               double y,
                               double z)
        Description copied from interface: GeoStandardPath.PathComponent
        Compute distance measure starting from beginning of the path and including perpendicular dog-leg to a point within the corridor.
        Specified by:
        distance in interface GeoStandardPath.PathComponent
        Parameters:
        distanceStyle - is the distance style
        x - is the x coordinate of the point we want to get the distance to
        y - is the y coordinate of the point we want to get the distance to
        z - is the z coordinate of the point we want to get the distance to
        Returns:
        the distance from start of path
      • nearestDistance

        public GeoStandardPath.DistancePair nearestDistance​(DistanceStyle distanceStyle,
                                                            double x,
                                                            double y,
                                                            double z)
        Description copied from interface: GeoStandardPath.PathComponent
        Get the nearest distance for a point. This is the old "legacy" computation: We find the segment endpoint or path segment with the closest pathCenterDistance(), and keep track of the one where that's at a minimum. We then compute nearestPathDistance() if it's a segment and add that to fullPathDistance() computed along the entire path up to that point.

        So what we are minimizing is not what we are returning here. That is why this is tricky to modularize; we need to return two values: the best pathCenterDistance, and the corresponding nearestPathDistance + startingDistance.

        Specified by:
        nearestDistance in interface GeoStandardPath.PathComponent
        Parameters:
        distanceStyle - is the distance style
        x - is the x coordinate of the point we want to get the distance to
        y - is the y coordinate of the point we want to get the distance to
        z - is the z coordinate of the point we want to get the distance to
        Returns:
        the DistancePair containing both distances described above
      • pathDeltaDistance

        public double pathDeltaDistance​(DistanceStyle distanceStyle,
                                        double x,
                                        double y,
                                        double z)
        Description copied from interface: GeoStandardPath.PathComponent
        Compute delta path distance.
        Specified by:
        pathDeltaDistance in interface GeoStandardPath.PathComponent
        Parameters:
        distanceStyle - is the distance style.
        x - is the point x.
        y - is the point y.
        z - is the point z.
        Returns:
        the distance metric, in aggregation form.
      • nearestPathDistance

        public double nearestPathDistance​(DistanceStyle distanceStyle,
                                          double x,
                                          double y,
                                          double z)
        Description copied from interface: GeoStandardPath.PathComponent
        Compute nearest path distance (distance from start of segment to point adjacent the one specitied, if reachable by this segment).
        Specified by:
        nearestPathDistance in interface GeoStandardPath.PathComponent
        Parameters:
        distanceStyle - is the distance style.
        x - is the point x.
        y - is the point y.
        z - is the point z.
        Returns:
        the distance metric, in aggregation form.
      • pathCenterDistance

        public double pathCenterDistance​(DistanceStyle distanceStyle,
                                         double x,
                                         double y,
                                         double z)
        Description copied from interface: GeoStandardPath.PathComponent
        Compute path center distance (distance from the point to center of the path, if reachable by this segment).
        Specified by:
        pathCenterDistance in interface GeoStandardPath.PathComponent
        Parameters:
        distanceStyle - is the distance style.
        x - is the point x.
        y - is the point y.
        z - is the point z.
        Returns:
        the distance metric, or POSITIVE_INFINITY if the point is not within the bounds of the path segment.
      • intersects

        public boolean intersects​(Plane p,
                                  XYZBounds planeBounds,
                                  GeoPoint[] notablePoints,
                                  Membership[] bounds)
        Description copied from interface: GeoStandardPath.PathComponent
        Determine if this endpoint intersects a specified plane.
        Specified by:
        intersects in interface GeoStandardPath.PathComponent
        Parameters:
        p - is the plane.
        planeBounds - are the XYZBounds of the plane we're looking for an intersection with.
        notablePoints - are the points associated with the plane.
        bounds - are any bounds which the intersection must lie within.
        Returns:
        true if there is a matching intersection.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object