public Format getFormat() { return delegate.getFormat(); }
public Format getFormat() { return delegate.getFormat(); }
public Format getFormat() { return delegate.getFormat(); }
public Format getFormat() { Format format = delegate.getFormat(); if (format == null) { return null; } else { return (Format) SecuredObjects.secure(format, policy); } }
return new Format() { private final Format delegateFormat = delegate.getFormat();
/** Helper method that checks if the delegate reader support bands selection. */ private boolean checkIfDelegateReaderSupportsBands() { List<GeneralParameterDescriptor> parameters = delegate.getFormat().getReadParameters().getDescriptor().descriptors(); for (GeneralParameterDescriptor parameterDescriptor : parameters) { if (parameterDescriptor.getName().equals(AbstractGridFormat.BANDS.getName())) { return true; } } return false; }
int[] getSelectedBandIndexes(GeneralParameterValue[] parameters) { // if the delegate cannot do band selection, don't bother if (delegate.getFormat() == null || !delegate.getFormat() .getReadParameters() .getDescriptor() .descriptors() .contains(AbstractGridFormat.BANDS)) { return null; } // lookup the bands if possible if (parameters != null) { for (int i = 0; i < parameters.length; i++) { final ParameterValue param = (ParameterValue) parameters[i]; if (AbstractGridFormat.BANDS.getName().equals(param.getDescriptor().getName())) { int[] bandIndicesParam = (int[]) param.getValue(); return bandIndicesParam; } } } return null; }
Format format = delegate.getFormat(); ParameterValueGroup readParameters = format.getReadParameters(); List<GeneralParameterDescriptor> descriptors =
throws TransformException, IOException, Exception { GridEnvelope originalRange = reader.getOriginalGridRange(); Format format = reader.getFormat(); final ParameterValueGroup readParams = format.getReadParameters(); final Map parameters = CoverageUtils.getParametersKVP(readParams);
final ParameterValueGroup readParams = reader.getFormat().getReadParameters(); final Map parameters = CoverageUtils.getParametersKVP(readParams); double[] minCP = envelope.getLowerCorner().getCoordinate();
private RasterSymbolizer updateSymbolizerForBandSelection( ReadingContext context, RasterSymbolizer symbolizer, int[] bandIndices) { GridCoverage2DReader reader = context != null ? context.reader : null; Object params = context != null ? context.params : null; if (params != null && reader != null && bandIndices != null) { Format format = reader.getFormat(); ParameterValueGroup readParameters = null; ParameterDescriptorGroup descriptorGroup = null; List<GeneralParameterDescriptor> descriptors = null; if (format != null && ((readParameters = format.getReadParameters()) != null) && ((descriptorGroup = readParameters.getDescriptor()) != null) && ((descriptors = descriptorGroup.descriptors()) != null) && (descriptors.contains(AbstractGridFormat.BANDS)) && bandIndices != null) { // if bands are selected, alter the symbolizer to use bands in order 0,1,2,... // since the channel order defined by it previously is taken care of the reader symbolizer = GridCoverageRenderer.setupSymbolizerForBandsSelection(symbolizer); } } return symbolizer; }
throws IOException { final ParameterValueGroup readParametersDescriptor = reader.getFormat().getReadParameters(); CoverageInfo coverage = mapLayerInfo.getCoverage(); MetadataMap metadata = coverage.getMetadata();
(GridCoverage2DReader) coverageInfo.getGridCoverageReader(null, null); final ParameterValueGroup readParametersDescriptor = reader.getFormat().getReadParameters(); final List<GeneralParameterDescriptor> parameterDescriptors = readParametersDescriptor.getDescriptor().descriptors();
reader.getFormat().getReadParameters(); GeneralParameterValue[] readParameters = CoverageUtils.getParameters(readParametersDescriptor, meta.getParameters());
final ParameterValueGroup readParametersDescriptor = reader.getFormat().getReadParameters(); final List<GeneralParameterDescriptor> parameterDescriptors = readParametersDescriptor.getDescriptor().descriptors();
reader.getFormat().getReadParameters(); GeneralParameterValue[] readParameters = CoverageUtils.getParameters(readParametersDescriptor, meta.getParameters());
final Format coverageFormat = reader.getFormat();
@Test public void testFilter() throws Exception { final Filter securityFilter = ECQL.toFilter("A > 10"); final Filter requestFilter = ECQL.toFilter("B < 10"); // create the mocks we need Format format = setupFormat(); GridCoverage2DReader reader = createNiceMock(GridCoverage2DReader.class); expect(reader.getFormat()).andReturn(format).anyTimes(); setupReadAssertion(reader, requestFilter, securityFilter); CoverageAccessLimits accessLimits = new CoverageAccessLimits(CatalogMode.HIDE, securityFilter, null, null); SecuredGridCoverage2DReader secured = new SecuredGridCoverage2DReader(reader, WrapperPolicy.readOnlyHide(accessLimits)); final ParameterValue pv = ImageMosaicFormat.FILTER.createValue(); pv.setValue(requestFilter); secured.read(new GeneralParameterValue[] {pv}); }
final ParameterValueGroup readParametersDescriptor = reader.getFormat().getReadParameters(); GeneralParameterValue[] readParameters = CoverageUtils.getParameters(readParametersDescriptor, cinfo.getParameters());