package geospatial
A collection of geospatial functionalities and interfaces, abstract from the underlying object model.
com.here.platform.location.core.geospatial.BoundingBoxOperations provides access, generic operations like find the center, intersection for an underlying BoundingBox type (e.g. the mapquad bounding box).
com.here.platform.location.core.geospatial.CoordinateOperations and com.here.platform.location.core.geospatial.GeoCoordinateOperations provide access to Cartesian x and y and to geographical latitude and longitude respectively (using type classes) for third party types (adapted or adaptable to HERE Map Content protobuf types, SDII types, JTS types, or user-defined ones).
com.here.platform.location.core.geospatial.LineStringOperations abstract over a line string (using a type class for a sequence of coordinates) in a similar way the com.here.platform.location.core.geospatial.GeoCoordinateOperations does for coordinates.
com.here.platform.location.core.geospatial.GeoCoordinates contains utility functions for geocoordinates to compute for example distances, fractions and heading between them. Similarly, com.here.platform.location.core.geospatial.LineStrings provides utilities for line strings like the projection of points onto a line string.
com.here.platform.location.core.geospatial.SinusoidalProjection is an implementation of com.here.platform.location.core.geospatial.GeoProjection that can be injected into distance implementations to compute approximate distances between points on the earth surface for small distances (< 1% error up to 10km).
com.here.platform.location.core.geospatial.ProximitySearch is an interface to search for elements around a position.
WGS84 related functionality work with a reasonable accuracy when latitude is between -85 and +85 degrees.
- Alphabetic
- By Inheritance
- geospatial
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
BoundingBox(northLatitude: Double, southLatitude: Double, eastLongitude: Double, westLongitude: Double) extends BoundingBoxHolder with Product with Serializable
The common return type for bounding boxes.
The common return type for bounding boxes.
- northLatitude
in degrees
- southLatitude
in degrees
- eastLongitude
in degrees
- westLongitude
in degrees
-
trait
BoundingBoxOperations[BB] extends Serializable
Type class to access the boundaries of a bounding box.
Type class to access the boundaries of a bounding box.
- BB
The underlying bounding box type
-
class
ClosestResultPerKey[E, K] extends ProximitySearch[E]
Decorator for ProximitySearch that deduplicates results as follows.
Decorator for ProximitySearch that deduplicates results as follows.
- by grouping the results by a key
- by selecting the closest result for each key
- E
The type of elements returned by the ProximitySearch
- K
The key type
-
case class
Coordinate2D(x: Double, y: Double) extends Product with Serializable
2D Cartesian coordinates with related com.here.platform.location.core.geospatial.CoordinateOperations.
-
trait
CoordinateOperations[Coordinate] extends AnyRef
Type class for accessing the members of 2D Cartesian coordinates.
Type class for accessing the members of 2D Cartesian coordinates.
- Coordinate
The underlying type representing coordinates
-
case class
ElementProjection[Element](element: Element, nearest: GeoCoordinate, distanceInMeters: Double, fraction: Double) extends FractionOn[Element] with Product with Serializable
Encapsulates a geometry, the nearest point on the geometry to some input point, and the distance between the two.
Encapsulates a geometry, the nearest point on the geometry to some input point, and the distance between the two.
See also com.here.platform.location.core.geospatial.ProximitySearch#search.
- Element
The type of the element with a geometry
- element
The element with a geometry
- nearest
The nearest coordinates on
element
's geometry to the input point- distanceInMeters
The distance between the input point and the nearest point on
element
's geometry- fraction
The fraction along the length of
element
from its beginning tonearest
-
class
FilteredProximitySearch[V, LS] extends ProximitySearch[V]
Guarantees that all search results are on accessible parts of the road, as defined by
roadAccess
.Guarantees that all search results are on accessible parts of the road, as defined by
roadAccess
.FilteredProximitySearch uses an unfiltered ProximitySearch instance to perform an initial search. Search results on a fully accessible vertex are returned as they are. Results on a vertex with at least some inaccessible parts cause FilteredProximitySearch to to perform a follow-up search on only that vertex, taking into account the accessibility restrictions.
- V
The vertex type
- LS
The line string type of vertex geometries
-
trait
FractionOn[+T] extends AnyRef
Object representing a point as a fraction along a (linear) element.
Object representing a point as a fraction along a (linear) element.
- T
The underlying concrete class representing the (linear) element
-
case class
GeoCoordinate(latitude: Double, longitude: Double) extends GeoCoordinateHolder with Product with Serializable
Represents WGS84 geocoordinates.
Represents WGS84 geocoordinates.
- latitude
In degrees
- longitude
In degrees
-
trait
GeoCoordinateOperations[GC] extends Serializable
Type class for objects representing geocoordinates.
Type class for objects representing geocoordinates.
- GC
The underlying concrete class
-
trait
GeoProjection extends Serializable
Converts WGS84 Earth coordinates to planar 2D coordinates and vice-versa.
Converts WGS84 Earth coordinates to planar 2D coordinates and vice-versa.
- Note
Different implementations may have different limitations regarding the range of the accepted GeoCoordinates and the type of operations and approximations on the projected coordinates. See also GeoCoordinateOperations.
-
trait
LengthSeq extends AnyRef
A Sequence of length values in meters.
-
final
case class
LineString[P](points: Seq[P]) extends AnyVal with Product with Serializable
A LineString is a series of line segments connecting a sequence of points.
A LineString is a series of line segments connecting a sequence of points.
- P
The points' type
- points
The points the line string is made of
-
trait
LineStringOperations[-LS] extends Serializable
Type class for objects representing an ordered sequence of Points, called a line string.
Type class for objects representing an ordered sequence of Points, called a line string.
- LS
The underlying concrete class representing the line string
-
trait
LinearRingOperations[-LR] extends AnyRef
Type class for objects representing a linear ring.
Type class for objects representing a linear ring.
- LR
The underlying concrete class representing the linear ring.
-
trait
OptimizedLineStringOperations[LS] extends LineStringOperations[LS]
A kind of LineStringOperations that enables additional, optimized operations that make some operations on line strings faster.
-
class
ProjectionDistanceCalculator extends StraightLineDistanceCalculator
Projects two points using a
projection
and calculates their distance in Euclidean space. -
trait
ProximitySearch[E] extends AnyRef
An interface for finding elements within a specific radius around a center.
An interface for finding elements within a specific radius around a center.
The provided center point can be of any GC type, as long as an implementation of GeoCoordinateOperations exists for this type.
- E
The type of element to search for
-
trait
StraightLineDistanceCalculator extends Serializable
Computes the straight-line distance between two geocoordinates.
-
trait
StraightLineLengthSeq extends LengthSeq
A Sequence of length values in meters that were calculated using a StraightLineDistanceCalculator.
Value Members
- object BoundingBox extends Serializable
-
object
BoundingBoxOperations extends Serializable
Holds implicits for bounding box types that provide extension methods for them.
-
object
BoundingBoxes
Higher-level operations on bounding box types (for which a com.here.platform.location.core.geospatial.BoundingBoxOperations implementation is available).
- object ClosestResultPerKey
- object Coordinate2D extends Serializable
- object CoordinateOperations
-
object
GeoCoordinate extends Serializable
Type class implementations for GeoCoordinate.
- object GeoCoordinateOperations extends Serializable
-
object
GeoCoordinates
Higher-level operations on types representing geocoordinates (for which a com.here.platform.location.core.geospatial.GeoCoordinateOperations implementation is available).
-
object
GeoProjections
Provides default GeoProjection implementations.
- object GreatCircleDistanceCalculator extends StraightLineDistanceCalculator
-
object
Implicits
Aggregates all implicits from com.here.platform.location.core.geospatial.
- object LengthSeq
- object LineString extends Serializable
- object LineStringOperations extends Serializable
-
object
LineStrings
Higher-level operations on line strings (for which a com.here.platform.location.core.geospatial.LineStringOperations implementation is available)
- object LinearRingOperations
-
object
SinusoidalProjection extends GeoProjection
A simple and fast com.here.platform.location.core.geospatial.GeoProjection used for most use cases.
A simple and fast com.here.platform.location.core.geospatial.GeoProjection used for most use cases.
The error is less than 1% for distances up to 10km when the latitude is between +85 and -85 degrees.
- object StraightLineLengthSeq