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 Summary
ConstructorsConstructorDescriptionElementProjection
(Element element, GeoCoordinate nearest, double distanceInMeters, double fraction) -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface scala.Equals
canEqual, equals
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
-
Constructor Details
-
ElementProjection
public ElementProjection(Element element, GeoCoordinate nearest, double distanceInMeters, double fraction)
-
-
Method Details
-
element
- Specified by:
element
in interfaceFractionOn<Element>
-
nearest
-
distanceInMeters
public double distanceInMeters() -
fraction
public double fraction()Description copied from interface:FractionOn
The fraction specifies how far along the length ofelement
the point is located. It has a value between 0.0 (the point is at the start ofelement
) and 1.0 (the point is at the end ofelement
).- Specified by:
fraction
in interfaceFractionOn<Element>
-
getDistanceInMeters
public double getDistanceInMeters() -
getElement
-
getFraction
public double getFraction() -
getNearest
-