code: public static Point2D.Double snapToNextHigherInActiveRegionResolution( double x, double y, Window activeWindow ) {
  
          double minx = activeWindow.getRectangle().getBounds2D().getMinX();
          double ewres = activeWindow.getWEResolution();
          double xsnap = minx + (Math.ceil((x - minx) / ewres) * ewres);
  
          double miny = activeWindow.getRectangle().getBounds2D().getMinY();
          double nsres = activeWindow.getNSResolution();
          double ysnap = miny + (Math.ceil((y - miny) / nsres) * nsres);
  
          return new Point2D.Double(xsnap, ysnap);
  
      }
docs: Moves the point given by X and Y to be on the grid of the active region.
  
  @param x the easting of the arbitrary point
  @param y the northing of the arbitrary point
  @param activeWindow the active window from which to take the grid
  @return the snapped point