@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 DimensionSelectingLatLngDistanceFunction 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 |
DimensionSelectingLatLngDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
(package private) int |
dimlat
Latitude dimension.
|
(package private) int |
dimlng
Longitude dimension.
|
(package private) EarthModel |
model
Earth model used.
|
Constructor and Description |
---|
DimensionSelectingLatLngDistanceFunction(int dimlat,
int dimlng,
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.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
instantiate
isSquared, isSymmetric
final int dimlat
final int dimlng
final EarthModel model
public DimensionSelectingLatLngDistanceFunction(int dimlat, int dimlng, EarthModel model)
dimlat
- Dimension storing the latitudedimlng
- Dimension storing the longitudemodel
- Earth modelpublic double distance(NumberVector o1, NumberVector o2)
PrimitiveDistanceFunction
distance
in interface NumberVectorDistanceFunction<NumberVector>
distance
in interface PrimitiveDistanceFunction<NumberVector>
o1
- first DatabaseObjecto2
- second DatabaseObjectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic SimpleTypeInformation<? super NumberVector> getInputTypeRestriction()
DistanceFunction
getInputTypeRestriction
in interface DistanceFunction<NumberVector>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<NumberVector>
public boolean isMetric()
DistanceFunction
isMetric
in interface DistanceFunction<NumberVector>
true
when metric.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.