/** * 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; }
/** * 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; }