Class ElementProjection<Element>

java.lang.Object
com.here.platform.location.core.geospatial.ElementProjection<Element>
Type Parameters:
Element - The type of the element with a geometry
All Implemented Interfaces:
FractionOn<Element>, Serializable, scala.Equals, scala.Product, scala.Serializable

public class ElementProjection<Element> extends Object implements FractionOn<Element>, scala.Product, scala.Serializable
Encapsulates a geometry, the nearest point on the geometry to some input point, and the distance between the two.

See also ProximitySearch.search(GC, double, com.here.platform.location.core.geospatial.GeoCoordinateOperations<GC>).

param: element The element with a geometry param: nearest The nearest coordinates on element's geometry to the input point param: distanceInMeters The distance between the input point and the nearest point on element's geometry param: fraction The fraction along the length of element from its beginning to nearest

See Also:
  • Constructor Details

    • ElementProjection

      public ElementProjection(Element element, GeoCoordinate nearest, double distanceInMeters, double fraction)
  • Method Details

    • element

      public Element element()
      Specified by:
      element in interface FractionOn<Element>
    • nearest

      public GeoCoordinate nearest()
    • distanceInMeters

      public double distanceInMeters()
    • fraction

      public double fraction()
      Description copied from interface: FractionOn
      The fraction specifies how far along the length of element the point is located. It has a value between 0.0 (the point is at the start of element) and 1.0 (the point is at the end of element).
      Specified by:
      fraction in interface FractionOn<Element>
    • getDistanceInMeters

      public double getDistanceInMeters()
    • getElement

      public Element getElement()
    • getFraction

      public double getFraction()
    • getNearest

      public GeoCoordinate getNearest()