Class GeoHR3
- java.lang.Object
-
- org.aksw.limes.core.measures.mapper.pointsets.GeoHR3
-
public class GeoHR3 extends Object
Still need to add tabu list. Basically checks whether two polygons have already been compared and rejected Should also check whether the polygon combination is already part of the result- Author:
- Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de)
-
-
Field Summary
Fields Modifier and Type Field Description protected floatangularThresholdstatic intDEFAULT_GRANULARITYstatic doubleDEFAULT_THRESHOLDstatic floatdeltaprotected floatdistanceThresholdprotected intgranularitybooleanHR3longindexingTimeIPointsetsMeasuresetMeasurestatic booleanthresholdbooleanverbose
-
Constructor Summary
Constructors Constructor Description GeoHR3(float distanceThreshold, int granularity, MeasureType hd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoIndexassignSquares(Set<Polygon> input)Computes the geo squares for each polygonSet<List<Integer>>getSquaresToCompare(int latIndex, int longIndex, GeoIndex index)Returns the squares to compare for a given index.AMappingrun(Set<Polygon> sourceData, Set<Polygon> targetData)Runs GeoHR3 for source and target dataset.
-
-
-
Field Detail
-
threshold
public static boolean threshold
-
DEFAULT_THRESHOLD
public static double DEFAULT_THRESHOLD
-
DEFAULT_GRANULARITY
public static int DEFAULT_GRANULARITY
-
delta
public static float delta
-
HR3
public boolean HR3
-
setMeasure
public IPointsetsMeasure setMeasure
-
verbose
public boolean verbose
-
indexingTime
public long indexingTime
-
granularity
protected int granularity
-
angularThreshold
protected float angularThreshold
-
distanceThreshold
protected float distanceThreshold
-
-
Constructor Detail
-
GeoHR3
public GeoHR3(float distanceThreshold, int granularity, MeasureType hd)
-
-
Method Detail
-
assignSquares
public GeoIndex assignSquares(Set<Polygon> input)
Computes the geo squares for each polygon- Parameters:
input- Set of polygon to be indexed- Returns:
- Index for all polygons
-
getSquaresToCompare
public Set<List<Integer>> getSquaresToCompare(int latIndex, int longIndex, GeoIndex index)
Returns the squares to compare for a given index. This is the trickiest part of the code 1 - The index runs from longMin to (-longMin-1) (e.g., from -6 to 5 for theta = 30°). Similar for the latitude 2 - The granularity (i.e., the number of squares to add to the index) changes with respect to the longitude at which one is. The new value is granularity/cos(longitude). 3 - When picking the squares w.r.t. the latitude, one sometimes crosses the pole. 4 - When picking the squares w.r.t. the longitude, one sometimes crosses +180° or -180° 5 - When selecting squares at the poles, one has to take all squares as the cos of 90° is 0.- Parameters:
latIndex- Latitude index of square for which "neighbors" are requiredlongIndex- Longitude indexindex- GeoIndex- Returns:
- List of "neighbors"
-
-