public GridCoverage2DReader getReader(Object source, Hints hints) { return delegate.getReader(source, hints); }
public String getName() { return delegate.getName(); }
public boolean accepts(Object source, Hints hints) { return delegate.accepts(source, hints); }
/** Keys for overriding default layer properties */ public static class StyleProperty<T> { T get(Map<StyleProperty, Object> map, T def) { return map != null && map.containsKey(this) ? (T) map.get(this) : def; } public static StyleProperty<String> FORMAT = new StyleProperty<String>(); public static StyleProperty<Version> FORMAT_VERSION = new StyleProperty<Version>(); public static StyleProperty<LegendInfo> LEGEND_INFO = new StyleProperty<LegendInfo>(); }
expect(reader.getGridCoverageNames()).andReturn(new String[] {"TheCoverage"}); replay(reader); expect(format.getReader(EasyMock.eq(rasterSource), EasyMock.anyObject(Hints.class))) .andReturn(reader) .anyTimes(); expect(format.getName()).andReturn("TheFormat").anyTimes(); expect(format.getReadParameters()) .andReturn(new CustomFormat().getReadParameters()) .anyTimes();
crs = AbstractGridFormat.getDefaultCRS(); LOGGER.fine("Unable to find crs, continuing with default CRS");
paramsForm.add(new Label("storeType", format.getName())); paramsForm.add(new Label("storeTypeDescription", format.getDescription()));
AbstractGridCoverage2DReader reader = null; try { reader = ImportUtilities.GEOTIFF_FORMAT.getReader(inputFile, hints); if (reader == null) { throw new IOException("This file is not a valid GeoTiff file: " + inputFile); .getWriteParameters(); writeParameters .parameter(AbstractGridFormat.GEOTOOLS_WRITE_PARAMS.getName().toString())
public ParameterValueGroup getReadParameters() { return delegate.getReadParameters(); }
public String getDescription() { return delegate.getDescription(); }
GridCoverage2DReader reader; try { reader = (GridCoverage2DReader) format.getReader(coverageFile); } catch (Exception e) { String message = + coverageFile.toString() + " with format" + format.getName(); throw new RuntimeException(message, e); + coverageFile.toString() + " with format " + format.getName()); writer.write("<supportedFormats nativeFormat = \"" + format.getName() + "\">\n"); writer.write("<formats>ARCGRID,ARCGRID-GZIP,GEOTIFF,PNG,GIF,TIFF</formats>\n"); writer.write("</supportedFormats>\n");
format= (AbstractGridFormat) GridFormatFinder.findFormat(fileBeingProcessed); } else { if(cachedFormat.accepts(fileBeingProcessed)) { format=cachedFormat; } else { coverageReader = (AbstractGridCoverage2DReader) format.getReader(fileBeingProcessed,runConfiguration.getHints()); GeneralEnvelope envelope = (GeneralEnvelope) coverageReader.getOriginalEnvelope(); CoordinateReferenceSystem actualCRS = coverageReader.getCrs();
crs = AbstractGridFormat.getDefaultCRS(); LOGGER.fine("Unable to find crs, continuing with default CRS");
paramsForm.add(new Label("storeType", format.getName())); paramsForm.add(new Label("storeTypeDescription", format.getDescription()));
/** * Convert map to real values based on factory Params. * * @param factory * @param params * @return Map with real values that may be acceptable to GDSFactory * @throws IOException DOCUMENT ME! */ public static Map toParams(GridFormatFactorySpi factory, Map params) throws IOException { final Map map = new HashMap(params.size()); final ParameterValueGroup info = factory.createFormat().getReadParameters(); // Convert Params into the kind of Map we actually need for (Iterator i = params.keySet().iterator(); i.hasNext(); ) { String key = (String) i.next(); Object value = find(info, key).getValue(); if (value != null) { map.put(key, value); } } return Collections.synchronizedMap(map); }
/** Select format. */ protected void selectFormat() { String selectedFormat = formatListComponent.getSelectedValue(); descriptionTextArea.setText(formatMap.get(selectedFormat).getDescription()); } }
public GridCoverage2DReader getReader(Object source) { return delegate.getReader(source); }
@Override public String answer() throws Throwable { return lookupGridFormat(covFile).getName(); } })
final GridCoverage2DReader reader = format.getReader(input, hints); if (reader == null) { LOGGER.error("Unable to get reader instance, getReader returned null"); + input.getPath() + "' for discovered geotools format '" + format.getName() + "'"); + input.getPath() + "' for discovered geotools format '" + format.getName() + "'", e);