// It is lat long so lets use the layer definition
env = layerDefinedEnv;
crs = DefaultGeographicCRS.WGS84;
} else {
crs = CRS.decode(bbox.getEPSGCode());
env = new ReferencedEnvelope(bbox.getMinX(), bbox.getMaxX(),
bbox.getMinY(), bbox.getMaxY(), crs);
}
} catch (NoSuchAuthorityCodeException e) {
crs = DefaultGeographicCRS.WGS84;
env = layer.getEnvelope(crs);
} catch (FactoryException e) {
crs = DefaultGeographicCRS.WGS84;
env = layer.getEnvelope(crs);
}
}
bounds = new ReferencedEnvelope(new Envelope(env.getMinimum(0), env.getMaximum(0), env
.getMinimum(1), env.getMaximum(1)), crs);
}