/** @see org.geotools.data.coverage.grid.AbstractGridFormat#accepts(Object input) */ @Override public boolean accepts(Object input, Hints hints) { try { return spi.canDecodeInput(input); } catch (IOException e) { if (LOGGER.isLoggable(Level.FINE)) LOGGER.log(Level.FINE, e.getLocalizedMessage(), e); return false; } }
/** * Building an image based on Spearfish data. * * @return {@linkplain BufferedImage} * @throws IOException * @throws FileNotFoundException */ private RenderedImage getSpearfhisDemo() throws IOException, FileNotFoundException { final AsciiGridsImageReader reader = (AsciiGridsImageReader) new AsciiGridsImageReaderSpi().createReaderInstance(); reader.setInput(new FileImageInputStream(TestData.file(this, "arcgrid/spearfish_dem.arx"))); final RenderedImage image = reader.readAsRenderedImage(0, null); return image; }
/** * Building an image based on SWAN data. * * @return {@linkplain BufferedImage} * @throws IOException * @throws FileNotFoundException */ private RenderedImage getSWAN() throws IOException, FileNotFoundException { final AsciiGridsImageReader reader = (AsciiGridsImageReader) new AsciiGridsImageReaderSpi().createReaderInstance(); reader.setInput( new FileImageInputStream( TestData.file(this, "arcgrid/SWAN_NURC_LigurianSeaL07_HSIGN.asc"))); final RenderedImage image = reader.readAsRenderedImage(0, null); return image; }
/** * @see org.geotools.data.coverage.grid.AbstractGridFormat#accepts(Object * input) */ public boolean accepts(Object input) { try { return spi.canDecodeInput(input); } catch (IOException e) { if (LOGGER.isLoggable(Level.FINE)) LOGGER.log(Level.FINE, e.getLocalizedMessage(), e); return false; } }
/** * Building an image based on SWAN data. * * @return {@linkplain BufferedImage} * @throws IOException * @throws FileNotFoundException */ private RenderedImage getSWAN() throws IOException, FileNotFoundException { final AsciiGridsImageReader reader = (AsciiGridsImageReader) new AsciiGridsImageReaderSpi().createReaderInstance(); reader.setInput( new FileImageInputStream( TestData.file(this, "arcgrid/SWAN_NURC_LigurianSeaL07_HSIGN.asc"))); final RenderedImage image = reader.readAsRenderedImage(0, null); return image; }
/** * @see org.geotools.data.coverage.grid.AbstractGridFormat#accepts(Object * input) */ @Override public boolean accepts(Object input,Hints hints) { try { return spi.canDecodeInput(input); } catch (IOException e) { if (LOGGER.isLoggable(Level.FINE)) LOGGER.log(Level.FINE, e.getLocalizedMessage(), e); return false; } }