code: public static Polygon getRegionPolygon( GridCoverage2D gridCoverage ) {
          Envelope2D env = gridCoverage.getEnvelope2D();
          Coordinate[] c = new Coordinate[]{new Coordinate(env.getMinX(), env.getMinY()),
                  new Coordinate(env.getMinX(), env.getMaxY()), new Coordinate(env.getMaxX(), env.getMaxY()),
                  new Coordinate(env.getMaxX(), env.getMinY()), new Coordinate(env.getMinX(), env.getMinY())};
          GeometryFactory gf = GeometryUtilities.gf();
          LinearRing linearRing = gf.createLinearRing(c);
          Polygon polygon = gf.createPolygon(linearRing, null);
          return polygon;
      }
docs: Create a bounds polygon of a {@link GridCoverage2D}.
  
  @param gridCoverage the coverage to use.
  @return the bounding polygon.