Class GranularityModifier

    • Constructor Detail

      • GranularityModifier

        public GranularityModifier()
    • Method Detail

      • modify

        public Polygon modify​(Polygon p,
                              double threshold)
        Modifies a polygon by reducing the total amount of points that describe it to threshold * original number of points. Assumes that the threshold is less than 1. If it larger than 1, then it is replaced by 1/threshold. The reduction is carried out randomly by "flipping a coin".
        Parameters:
        p - Polygon
        threshold - of distance
        Returns:
        polygon, the modified polygon
      • getName

        public String getName()
        Description copied from interface: IPolygonModifier
        Return name of modifier class
        Returns:
        name of modifier, as string