Class LatLngAsECEFIndex<O extends elki.data.NumberVector>

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

    public class LatLngAsECEFIndex<O extends elki.data.NumberVector>
    extends elki.index.projected.ProjectedIndex<O,​O>
    Index a 2d data set (consisting of Lat/Lng 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 LatLngDistance, 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
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  LatLngAsECEFIndex.Factory<O extends elki.data.NumberVector>
      Index factory.
      • Nested classes/interfaces inherited from class elki.index.projected.ProjectedIndex

        elki.index.projected.ProjectedIndex.ProjectedKNNByDBID, elki.index.projected.ProjectedIndex.ProjectedKNNByObject, elki.index.projected.ProjectedIndex.ProjectedRangeByDBID, elki.index.projected.ProjectedIndex.ProjectedRangeByObject, elki.index.projected.ProjectedIndex.ProjectedRKNNByDBID, elki.index.projected.ProjectedIndex.ProjectedRKNNByObject
    • Field Summary

      • Fields inherited from class elki.index.projected.ProjectedIndex

        inner, kmulti, norefine, proj, refinements, relation, view
    • Constructor Summary

      Constructors 
      Constructor Description
      LatLngAsECEFIndex​(elki.database.relation.Relation<? extends O> relation, elki.data.projection.Projection<O,​O> proj, elki.database.relation.Relation<O> view, elki.index.Index inner, boolean norefine)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      elki.database.query.knn.KNNSearcher<O> kNNByObject​(elki.database.query.distance.DistanceQuery<O> distanceQuery, int maxk, int flags)  
      elki.database.query.range.RangeSearcher<O> rangeByObject​(elki.database.query.distance.DistanceQuery<O> distanceQuery, double maxradius, int flags)  
      elki.database.query.rknn.RKNNSearcher<O> rkNNByObject​(elki.database.query.distance.DistanceQuery<O> distanceQuery, int maxk, int flags)  
      • Methods inherited from class elki.index.projected.ProjectedIndex

        initialize, kNNByDBID, logStatistics, rangeByDBID, rkNNByDBID
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LatLngAsECEFIndex

        public LatLngAsECEFIndex​(elki.database.relation.Relation<? extends O> relation,
                                 elki.data.projection.Projection<O,​O> proj,
                                 elki.database.relation.Relation<O> view,
                                 elki.index.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.
    • Method Detail

      • kNNByObject

        public elki.database.query.knn.KNNSearcher<O> kNNByObject​(elki.database.query.distance.DistanceQuery<O> distanceQuery,
                                                                  int maxk,
                                                                  int flags)
        Specified by:
        kNNByObject in interface elki.index.KNNIndex<O extends elki.data.NumberVector>
        Overrides:
        kNNByObject in class elki.index.projected.ProjectedIndex<O extends elki.data.NumberVector,​O extends elki.data.NumberVector>
      • rangeByObject

        public elki.database.query.range.RangeSearcher<O> rangeByObject​(elki.database.query.distance.DistanceQuery<O> distanceQuery,
                                                                        double maxradius,
                                                                        int flags)
        Specified by:
        rangeByObject in interface elki.index.RangeIndex<O extends elki.data.NumberVector>
        Overrides:
        rangeByObject in class elki.index.projected.ProjectedIndex<O extends elki.data.NumberVector,​O extends elki.data.NumberVector>
      • rkNNByObject

        public elki.database.query.rknn.RKNNSearcher<O> rkNNByObject​(elki.database.query.distance.DistanceQuery<O> distanceQuery,
                                                                     int maxk,
                                                                     int flags)
        Specified by:
        rkNNByObject in interface elki.index.RKNNIndex<O extends elki.data.NumberVector>
        Overrides:
        rkNNByObject in class elki.index.projected.ProjectedIndex<O extends elki.data.NumberVector,​O extends elki.data.NumberVector>