@Reference(authors="Erich Schubert, Arthur Zimek, Hans-Peter Kriegel", title="Geodetic Distance Queries on R-Trees for Indexing Geographic Data", booktitle="Int. Symp. Advances in Spatial and Temporal Databases (SSTD\'2013)", url="https://doi.org/10.1007/978-3-642-40235-7_9", bibkey="DBLP:conf/ssd/SchubertZK13") public class LngLatDistanceFunction extends java.lang.Object implements SpatialPrimitiveDistanceFunction<NumberVector>, NumberVectorDistanceFunction<NumberVector>
The input data must be in degrees (not radians), and the output distance will
be in meters (see EarthModel.distanceDeg(double, double, double, double)).
This implementation allows index accelerated queries using R*-trees (by providing a point-to-rectangle minimum distance).
Reference:
Erich Schubert, Arthur Zimek, Hans-Peter Kriegel
Geodetic Distance Queries on R-Trees for Indexing Geographic Data
Int. Symp. Advances in Spatial and Temporal Databases (SSTD'2013)
| Modifier and Type | Class and Description |
|---|---|
static class |
LngLatDistanceFunction.Parameterizer
Parameterization class.
|
| Modifier and Type | Field and Description |
|---|---|
private EarthModel |
model
Earth model to use.
|
| Constructor and Description |
|---|
LngLatDistanceFunction(EarthModel model)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
distance(NumberVector o1,
NumberVector o2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
boolean |
equals(java.lang.Object obj) |
SimpleTypeInformation<? super NumberVector> |
getInputTypeRestriction()
Get the input data type of the function.
|
int |
hashCode() |
boolean |
isMetric()
Is this distance function metric (satisfy the triangle inequality)
|
double |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
function.
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitinstantiateisSquared, isSymmetricprivate EarthModel model
public LngLatDistanceFunction(EarthModel model)
public double distance(NumberVector o1, NumberVector o2)
PrimitiveDistanceFunctiondistance in interface NumberVectorDistanceFunction<NumberVector>distance in interface PrimitiveDistanceFunction<NumberVector>o1 - first DatabaseObjecto2 - second DatabaseObjectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunctionminDist in interface SpatialPrimitiveDistanceFunction<NumberVector>mbr1 - the first MBR objectmbr2 - the second MBR objectpublic SimpleTypeInformation<? super NumberVector> getInputTypeRestriction()
DistanceFunctiongetInputTypeRestriction in interface DistanceFunction<NumberVector>getInputTypeRestriction in interface PrimitiveDistanceFunction<NumberVector>public boolean isMetric()
DistanceFunctionisMetric in interface DistanceFunction<NumberVector>true when metric.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2019 ELKI Development Team. License information.