Class LngLatAsECEFIndex<O extends NumberVector>

  • Type Parameters:
    O - Object type
    All Implemented Interfaces:
    Index, KNNIndex<O>, RangeIndex<O>, RKNNIndex<O>

    public class LngLatAsECEFIndex<O extends NumberVector>
    extends ProjectedIndex<O,​O>
    Index a 2d data set (consisting of Lng/Lat pairs) by using a projection to 3D coordinates (WGS-86 to ECEF).

    Earth-Centered, Earth-Fixed (ECEF) is a 3D coordinate system, sometimes also referred to as XYZ, that uses 3 cartesian axes. The center is at the earths center of mass, the z axis points to the north pole. X axis is to the prime meridan at the equator (so latitude 0, longitude 0), and the Y axis is orthogonal going to the east (latitude 0, longitude 90°E).

    The Euclidean distance in this coordinate system is a lower bound for the great-circle distance, and Euclidean coordinates are supposedly easier to index.

    Note: this index will only support the distance function LngLatDistance, as it uses a projection that will map data according to this great circle distance. If the query hint "exact" is set, it will not be used.

    Since:
    0.6.0
    Author:
    Erich Schubert
    • Constructor Detail

      • LngLatAsECEFIndex

        public LngLatAsECEFIndex​(Relation<? extends O> relation,
                                 Projection<O,​O> proj,
                                 Relation<O> view,
                                 Index inner,
                                 boolean norefine)
        Constructor.
        Parameters:
        relation - Relation to index.
        proj - Projection to use.
        view - View to use.
        inner - Index to wrap.
        norefine - Refinement disable flag.