final DirectPosition lowerCorner = geometryFactory.createDirectPosition();
lowerCorner.setOrdinate(0, minx);
lowerCorner.setOrdinate(1, miny);
final DirectPosition upperCorner = geometryFactory.createDirectPosition();
upperCorner.setOrdinate(0, maxx);
upperCorner.setOrdinate(1, maxy);
return geometryFactory.createEnvelope(lowerCorner, upperCorner);
}