Class PolygonIndex

  • Direct Known Subclasses:
    CentroidIndex

    public class PolygonIndex
    extends Object
    Author:
    Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de)
    • Constructor Detail

      • PolygonIndex

        public PolygonIndex()
    • Method Detail

      • toString

        public String toString()
        String representation of the polygon index
        Overrides:
        toString in class Object
        Returns:
        polygon index, as a string
      • index

        public void index​(Set<Polygon> polygons)
        Indexes a list of polygons by mapping the uri of each polygon to the corresponding distanceIndex
        Parameters:
        polygons - to be indexed
      • index

        public void index​(Polygon p)
        Indexes the distances between the points in a given polygon and adds polygon to list of indexes
        Parameters:
        p - Input polygon
      • getDistance

        public double getDistance​(String uri,
                                  Point x,
                                  Point y)
        Returns the distances between two points x and y from the polygon with label uri Returns -1 if nothing is found
        Parameters:
        uri - Label of the polygon
        x - First point from the polygon
        y - Second point from the polygon
        Returns:
        Distance between x and y