}
if (layerInfo instanceof SecuredLayerInfo && boundingBox != null) {
//test layer bbox limits
SecuredLayerInfo securedLayerInfo = (SecuredLayerInfo) layerInfo;
WrapperPolicy policy = securedLayerInfo.getWrapperPolicy();
AccessLimits limits = policy.getLimits();
if (limits instanceof DataAccessLimits) {
//ensure we are all using the same CRS
CoordinateReferenceSystem dataCrs = layerInfo.getResource().getCRS();
if (boundingBox.getCoordinateReferenceSystem()!=null && !CRS.equalsIgnoreMetadata(dataCrs, boundingBox.getCoordinateReferenceSystem())) {