Class LngLatAsECEFIndex<O extends NumberVector>
- java.lang.Object
-
- elki.index.projected.ProjectedIndex<O,O>
-
- elki.index.projected.LngLatAsECEFIndex<O>
-
- 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LngLatAsECEFIndex.Factory<O extends NumberVector>
Index factory.-
Nested classes/interfaces inherited from class elki.index.projected.ProjectedIndex
ProjectedIndex.ProjectedKNNByDBID, ProjectedIndex.ProjectedKNNByObject, ProjectedIndex.ProjectedRangeByDBID, ProjectedIndex.ProjectedRangeByObject, ProjectedIndex.ProjectedRKNNByDBID, ProjectedIndex.ProjectedRKNNByObject
-
-
Field Summary
-
Fields inherited from class elki.index.projected.ProjectedIndex
inner, kmulti, norefine, proj, refinements, relation, view
-
-
Constructor Summary
Constructors Constructor Description LngLatAsECEFIndex(Relation<? extends O> relation, Projection<O,O> proj, Relation<O> view, Index inner, boolean norefine)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KNNSearcher<O>
kNNByObject(DistanceQuery<O> distanceQuery, int maxk, int flags)
Get a KNN query object for the given distance query and k.RangeSearcher<O>
rangeByObject(DistanceQuery<O> distanceQuery, double maxradius, int flags)
Get a range query object for the given distance query and k.RKNNSearcher<O>
rkNNByObject(DistanceQuery<O> distanceQuery, int maxk, int flags)
Get a RKNN query object for the given distance query and k.-
Methods inherited from class elki.index.projected.ProjectedIndex
initialize, kNNByDBID, logStatistics, rangeByDBID, rkNNByDBID
-
-
-
-
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.
-
-
Method Detail
-
kNNByObject
public KNNSearcher<O> kNNByObject(DistanceQuery<O> distanceQuery, int maxk, int flags)
Description copied from interface:KNNIndex
Get a KNN query object for the given distance query and k.This function MAY return null, when the given distance is not supported!
- Specified by:
kNNByObject
in interfaceKNNIndex<O extends NumberVector>
- Overrides:
kNNByObject
in classProjectedIndex<O extends NumberVector,O extends NumberVector>
- Parameters:
distanceQuery
- Distance querymaxk
- Maximum value of kflags
- Hints for the optimizer- Returns:
- KNN Query object or
null
-
rangeByObject
public RangeSearcher<O> rangeByObject(DistanceQuery<O> distanceQuery, double maxradius, int flags)
Description copied from interface:RangeIndex
Get a range query object for the given distance query and k.This function MAY return null, when the given distance is not supported!
- Specified by:
rangeByObject
in interfaceRangeIndex<O extends NumberVector>
- Overrides:
rangeByObject
in classProjectedIndex<O extends NumberVector,O extends NumberVector>
- Parameters:
distanceQuery
- Distance querymaxradius
- Maximum rangeflags
- Hints for the optimizer- Returns:
- KNN Query object or
null
-
rkNNByObject
public RKNNSearcher<O> rkNNByObject(DistanceQuery<O> distanceQuery, int maxk, int flags)
Description copied from interface:RKNNIndex
Get a RKNN query object for the given distance query and k.This function MAY return null, when the given distance is not supported!
- Specified by:
rkNNByObject
in interfaceRKNNIndex<O extends NumberVector>
- Overrides:
rkNNByObject
in classProjectedIndex<O extends NumberVector,O extends NumberVector>
- Parameters:
distanceQuery
- Distance querymaxk
- Maximum k for RkNN queryflags
- Hints for the optimizer- Returns:
- RKNN Query object or
null
-
-