class Bbox implements Serializable {

	public static Polygon envelopeToPolygon(Envelope e) {
		GeometryFactory factory = new GeometryFactory(new PrecisionModel(PrecisionModel.FLOATING_SINGLE), SRID);
		Coordinate coordA = new Coordinate(e.getMinX(), e.getMinY());
		Coordinate coordB = new Coordinate(e.getMinX(), e.getMaxY());
		Coordinate coordC = new Coordinate(e.getMaxX(), e.getMaxY());
		Coordinate coordD = new Coordinate(e.getMaxX(), e.getMinY());
		Coordinate coordE = coordA;
		Polygon bboxPoly = factory.createPolygon(new Coordinate[]{coordA, coordB, coordC, coordD, coordE});
		return bboxPoly;
	}

}