Class Rasterer


  • public class Rasterer
    extends java.lang.Object
    This class provides all code necessary to take a query box and produce a query result. The getMapRaster method must return a Map containing all seven of the required fields, otherwise the front end code will probably not draw the output correctly.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_DEPTH
      The max image depth level.
    • Constructor Summary

      Constructors 
      Constructor Description
      Rasterer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      RasterResultParams getMapRaster​(RasterRequestParams params)
      Takes a user query and finds the grid of images that best matches the query.
      private double lonDPP​(double lrlon, double ullon, double width)
      Calculates the lonDPP of an image or query box
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAX_DEPTH

        public static final int MAX_DEPTH
        The max image depth level.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Rasterer

        public Rasterer()
    • Method Detail

      • getMapRaster

        public RasterResultParams getMapRaster​(RasterRequestParams params)
        Takes a user query and finds the grid of images that best matches the query. These images will be combined into one big image (rastered) by the front end. The grid of images must obey the following properties, where image in the grid is referred to as a "tile".
        • The tiles collected must cover the most longitudinal distance per pixel (LonDPP) possible, while still covering less than or equal to the amount of longitudinal distance per pixel in the query box for the user viewport size.
        • Contains all tiles that intersect the query bounding box that fulfill the above condition.
        • The tiles must be arranged in-order to reconstruct the full image.
        Parameters:
        params - The RasterRequestParams containing coordinates of the query box and the browser viewport width and height.
        Returns:
        A valid RasterResultParams containing the computed results.
      • lonDPP

        private double lonDPP​(double lrlon,
                              double ullon,
                              double width)
        Calculates the lonDPP of an image or query box
        Parameters:
        lrlon - Lower right longitudinal value of the image or query box
        ullon - Upper left longitudinal value of the image or query box
        width - Width of the query box or image
        Returns:
        lonDPP