code: public static Geometry getScreenPointsPolygon( WorldWindow wwd, int x1, int y1, int x2, int y2 ) {
          View view = wwd.getView();
          Position p1 = view.computePositionFromScreenPoint(x1, y1);
          Position p2 = view.computePositionFromScreenPoint(x1, y2);
          Position p3 = view.computePositionFromScreenPoint(x2, y2);
          Position p4 = view.computePositionFromScreenPoint(x2, y1);
  
          Coordinate[] coords = { //
                  new Coordinate(p1.longitude.degrees, p1.latitude.degrees), //
                  new Coordinate(p2.longitude.degrees, p2.latitude.degrees), //
                  new Coordinate(p3.longitude.degrees, p3.latitude.degrees), //
                  new Coordinate(p4.longitude.degrees, p4.latitude.degrees)//
          };
          Geometry convexHull = GeometryUtilities.gf().createMultiPoint(coords).convexHull();
          return convexHull;
      }
docs: Get the lat/long world geometry from two screen corner coordinates.
  
  @param wwd
  the {@link WorldWindow} instance.
  @param x1
  the first point screen x.
  @param y1
  the first point screen y.
  @param x2
  the second point screen x.
  @param y2
  the second point screen y.
  @return the world geomnetry.