code: public static Polygon createPolygonFromEnvelope( Envelope env ) {
          double minX = env.getMinX();
          double minY = env.getMinY();
          double maxY = env.getMaxY();
          double maxX = env.getMaxX();
          Coordinate[] c = new Coordinate[]{new Coordinate(minX, minY), new Coordinate(minX, maxY), new Coordinate(maxX, maxY),
                  new Coordinate(maxX, minY), new Coordinate(minX, minY)};
          return gf().createPolygon(c);
      }
docs: Create a polygon using an envelope.
  
  @param env the envelope to use.
  @return the created geomerty.