Class 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 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
      • 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 required
        longIndex - Longitude index
        index - GeoIndex
        Returns:
        List of "neighbors"
      • run

        public AMapping run​(Set<Polygon> sourceData,
                            Set<Polygon> targetData)
        Runs GeoHR3 for source and target dataset. Uses the set SetMeasure implementation. FastHausdorff is used as default
        Parameters:
        sourceData - , Source polygons
        targetData - , Target polygons
        Returns:
        Mapping of polygons