newCsLatLong[1] = Math.min(Math.max(csLatLong[1], -90), 90);
newCsLatLong[2] = Math.min(Math.max(csLatLong[2], -180), 180);
newCsLatLong[3] = Math.min(Math.max(csLatLong[3], -90), 90);
double[] origProject = new double[4];
transform.transform(newCsLatLong, 0, origProject, 0, 2);
// have the truncated bbox in the original projection, so we can
// find the image (x,y) for the two points.
double image_min_x = (origProject[0] - envelope.getMinX())
/ envelope.getWidth() * imageWidth;