Search in sources :

Example 6 with InMemoryGridCoverageResource

use of org.geotoolkit.storage.memory.InMemoryGridCoverageResource in project geotoolkit by Geomatys.

the class RasterSymbolizerTest method coverage_whose_grid_origin_is_lower_left_should_be_flipped.

/**
 * Source coverage will be a matrix <em>with origin lower-left</em>:
 * <table>
 *     <tr><td>4</td><td>3</td></tr>
 *     <tr><td>1</td><td>2</td></tr>
 * </table>
 * @throws PortrayalException
 */
@Test
public void coverage_whose_grid_origin_is_lower_left_should_be_flipped() throws PortrayalException {
    final BufferedImage image = new BufferedImage(2, 2, BufferedImage.TYPE_BYTE_GRAY);
    image.getRaster().setSample(0, 0, 0, 1);
    image.getRaster().setSample(1, 0, 0, 2);
    image.getRaster().setSample(1, 1, 0, 3);
    image.getRaster().setSample(0, 1, 0, 4);
    final GridGeometry geom = new GridGeometry(new GridExtent(2, 2), PixelInCell.CELL_CENTER, new AffineTransform2D(1, 0, 0, 1, 10, 10), CommonCRS.defaultGeographic());
    final GridCoverage baseData = new GridCoverage2D(geom, null, image);
    MapLayer layer = MapBuilder.createLayer(new InMemoryGridCoverageResource(baseData));
    final MapLayers ctx = MapBuilder.createContext();
    ctx.getComponents().add(layer);
    BufferedImage rendering = DefaultPortrayalService.portray(new CanvasDef(new Dimension(2, 2), geom.getEnvelope()), new SceneDef(ctx, new Hints(GO2Hints.KEY_INTERPOLATION, InterpolationCase.NEIGHBOR, RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR)));
    // As display is oriented upper-left, output should be flipped on y axis. Also, the renderer will stretch values
    // along 256 colors, so we have to adapt comparison.
    final int[] pixels = rendering.getRaster().getPixels(0, 0, 2, 2, (int[]) null);
    final int[] expected = { 255, 255, 255, 255, 165, 165, 165, 255, 0, 0, 0, 255, 88, 88, 88, 255 };
    assertArrayEquals(expected, pixels);
    final ColorMap colorMap = SF.colorMap(SF.interpolateFunction(null, Arrays.asList(SF.interpolationPoint(1, FF.literal(Color.RED)), SF.interpolationPoint(2, FF.literal(Color.GREEN)), SF.interpolationPoint(3, FF.literal(Color.BLUE)), SF.interpolationPoint(4, FF.literal(Color.WHITE))), null, null, FF.literal(Color.BLACK)));
    final RasterSymbolizer symbol = SF.rasterSymbolizer(null, null, null, null, colorMap, null, null, null);
    ctx.getComponents().set(0, MapBuilder.createCoverageLayer(baseData, SF.style(symbol), "test"));
    rendering = DefaultPortrayalService.portray(new CanvasDef(new Dimension(2, 2), geom.getEnvelope()), new SceneDef(ctx, new Hints(GO2Hints.KEY_INTERPOLATION, InterpolationCase.NEIGHBOR, RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR)));
    assertEquals(Color.WHITE.getRGB(), rendering.getRGB(0, 0));
    assertEquals(Color.BLUE.getRGB(), rendering.getRGB(1, 0));
    assertEquals(Color.RED.getRGB(), rendering.getRGB(0, 1));
    assertEquals(Color.GREEN.getRGB(), rendering.getRGB(1, 1));
}
Also used : GridGeometry(org.apache.sis.coverage.grid.GridGeometry) GridExtent(org.apache.sis.coverage.grid.GridExtent) GridCoverage2D(org.apache.sis.coverage.grid.GridCoverage2D) InMemoryGridCoverageResource(org.geotoolkit.storage.memory.InMemoryGridCoverageResource) Hints(org.geotoolkit.factory.Hints) RenderingHints(java.awt.RenderingHints) GO2Hints(org.geotoolkit.display2d.GO2Hints) ColorMap(org.opengis.style.ColorMap) MapLayer(org.apache.sis.portrayal.MapLayer) Dimension(java.awt.Dimension) SampleDimension(org.apache.sis.coverage.SampleDimension) BufferedImage(java.awt.image.BufferedImage) RasterSymbolizer(org.opengis.style.RasterSymbolizer) GridCoverage(org.apache.sis.coverage.grid.GridCoverage) SceneDef(org.geotoolkit.display2d.service.SceneDef) CanvasDef(org.geotoolkit.display2d.service.CanvasDef) AffineTransform2D(org.apache.sis.internal.referencing.j2d.AffineTransform2D) MapLayers(org.apache.sis.portrayal.MapLayers) Test(org.junit.Test)

Example 7 with InMemoryGridCoverageResource

use of org.geotoolkit.storage.memory.InMemoryGridCoverageResource in project geotoolkit by Geomatys.

the class RasterSymbolizerTest method renderInterpolationCoverage.

/**
 * Render a coverage with nearest and lanczos interpolation.
 */
@Test
public void renderInterpolationCoverage() throws FactoryException, PortrayalException, IOException {
    final CoordinateReferenceSystem crs = CommonCRS.WGS84.normalizedGeographic();
    final BufferedImage image = new BufferedImage(36, 18, BufferedImage.TYPE_INT_RGB);
    Graphics2D g = image.createGraphics();
    g.setColor(Color.RED);
    g.fillRect(0, 0, 18, 9);
    g.setColor(Color.GREEN);
    g.fillRect(18, 0, 18, 9);
    g.setColor(Color.BLUE);
    g.fillRect(0, 9, 18, 9);
    g.setColor(Color.YELLOW);
    g.fillRect(18, 9, 18, 9);
    g.dispose();
    final GridExtent extent = new GridExtent(36, 18);
    final AffineTransform2D gridToCrs = new AffineTransform2D(10, 0, 0, -10, -180, 90);
    final GridGeometry grid = new GridGeometry(extent, PixelInCell.CELL_CORNER, gridToCrs, crs);
    final SampleDimension red = new SampleDimension.Builder().setName("1").build();
    final SampleDimension green = new SampleDimension.Builder().setName("2").build();
    final SampleDimension blue = new SampleDimension.Builder().setName("3").build();
    final GridCoverage2D coverage = new GridCoverage2D(grid, Arrays.asList(red, green, blue), image);
    final GridExtent queryextent = new GridExtent(360, 180);
    final GeneralEnvelope queryenv = new GeneralEnvelope(crs);
    queryenv.setRange(0, -180, 180);
    queryenv.setRange(1, -90, 90);
    final GridGeometry querygrid = new GridGeometry(queryextent, queryenv, GridOrientation.HOMOTHETY);
    final MapLayers context = MapBuilder.createContext();
    context.getComponents().add(MapBuilder.createCoverageLayer(new InMemoryGridCoverageResource(coverage)));
    final BufferedImage nearest;
    final BufferedImage bicubic;
    final BufferedImage lanczos;
    {
        final Hints hints = new Hints();
        hints.put(GO2Hints.KEY_INTERPOLATION, InterpolationCase.NEIGHBOR);
        final CanvasDef cdef = new CanvasDef(querygrid);
        final SceneDef sdef = new SceneDef(context, hints);
        nearest = DefaultPortrayalService.portray(cdef, sdef);
    }
    {
        final Hints hints = new Hints();
        hints.put(GO2Hints.KEY_INTERPOLATION, InterpolationCase.BICUBIC2);
        final CanvasDef cdef = new CanvasDef(querygrid);
        final SceneDef sdef = new SceneDef(context, hints);
        bicubic = DefaultPortrayalService.portray(cdef, sdef);
    }
    {
        final Hints hints = new Hints();
        hints.put(GO2Hints.KEY_INTERPOLATION, InterpolationCase.LANCZOS);
        final CanvasDef cdef = new CanvasDef(querygrid);
        final SceneDef sdef = new SceneDef(context, hints);
        lanczos = DefaultPortrayalService.portray(cdef, sdef);
    }
    int nearestRgb = nearest.getRGB(179, 0);
    int bicubicRgb = bicubic.getRGB(179, 0);
    int naczosRgb = lanczos.getRGB(179, 0);
    assertTrue(nearestRgb != bicubicRgb);
    assertTrue(bicubicRgb != naczosRgb);
}
Also used : GridGeometry(org.apache.sis.coverage.grid.GridGeometry) GridExtent(org.apache.sis.coverage.grid.GridExtent) GridCoverage2D(org.apache.sis.coverage.grid.GridCoverage2D) InMemoryGridCoverageResource(org.geotoolkit.storage.memory.InMemoryGridCoverageResource) Hints(org.geotoolkit.factory.Hints) RenderingHints(java.awt.RenderingHints) GO2Hints(org.geotoolkit.display2d.GO2Hints) MapBuilder(org.geotoolkit.map.MapBuilder) SampleDimension(org.apache.sis.coverage.SampleDimension) BufferedImage(java.awt.image.BufferedImage) Graphics2D(java.awt.Graphics2D) SceneDef(org.geotoolkit.display2d.service.SceneDef) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem) GeneralEnvelope(org.apache.sis.geometry.GeneralEnvelope) CanvasDef(org.geotoolkit.display2d.service.CanvasDef) AffineTransform2D(org.apache.sis.internal.referencing.j2d.AffineTransform2D) MapLayers(org.apache.sis.portrayal.MapLayers) Test(org.junit.Test)

Example 8 with InMemoryGridCoverageResource

use of org.geotoolkit.storage.memory.InMemoryGridCoverageResource in project geotoolkit by Geomatys.

the class RasterSymbolizerTest method renderRGBIndexedCoverage.

/**
 * Render a coverage with :
 * - 3 sample dimensions R,G,B
 * - 1 byte indexed color model
 * - 1 raster, not tiled
 */
@Test
public void renderRGBIndexedCoverage() throws FactoryException, PortrayalException {
    final BufferedImage image = new BufferedImage(18, 9, BufferedImage.TYPE_BYTE_INDEXED);
    image.setRGB(0, 0, Color.RED.getRGB());
    image.setRGB(17, 0, Color.GREEN.getRGB());
    image.setRGB(0, 8, Color.BLUE.getRGB());
    final GridExtent extent = new GridExtent(18, 9);
    final AffineTransform2D gridToCrs = new AffineTransform2D(20, 0, 0, 20, -170, -80);
    final GridGeometry grid = new GridGeometry(extent, PixelInCell.CELL_CENTER, gridToCrs, CommonCRS.WGS84.normalizedGeographic());
    /*
         * We volontarely name samples 1 to avoid use of names as a hint.
         */
    final SampleDimension rgb = new SampleDimension.Builder().setName("1").build();
    final GridCoverage2D coverage = new GridCoverage2D(grid, Arrays.asList(rgb), image);
    final MapLayers context = MapBuilder.createContext();
    context.getComponents().add(MapBuilder.createCoverageLayer(new InMemoryGridCoverageResource(coverage)));
    final CanvasDef cdef = new CanvasDef(grid);
    final SceneDef sdef = new SceneDef(context);
    BufferedImage result = DefaultPortrayalService.portray(cdef, sdef);
    assertEquals(Color.RED.getRGB(), result.getRGB(0, 0));
    assertEquals(Color.GREEN.getRGB(), result.getRGB(17, 0));
    assertEquals(Color.BLUE.getRGB(), result.getRGB(0, 8));
    // Now, test with a resample (flip axes):
    final GridExtent latLonExtent = new GridExtent(9, 18);
    AffineTransform2D latLonG2C = new AffineTransform2D(20, 0, 0, 20, -80, -170);
    GridGeometry latLonGrid = new GridGeometry(latLonExtent, PixelInCell.CELL_CENTER, latLonG2C, CommonCRS.WGS84.geographic());
    result = DefaultPortrayalService.portray(new CanvasDef(latLonGrid), sdef);
    assertEquals(Color.RED.getRGB(), result.getRGB(0, 0));
    assertEquals(Color.GREEN.getRGB(), result.getRGB(0, 17));
    assertEquals(Color.BLUE.getRGB(), result.getRGB(8, 0));
    latLonG2C = new AffineTransform2D(-20, 0, 0, 20, 80, -170);
    latLonGrid = new GridGeometry(latLonExtent, PixelInCell.CELL_CENTER, latLonG2C, CommonCRS.WGS84.geographic());
    result = DefaultPortrayalService.portray(new CanvasDef(latLonGrid), sdef);
    assertEquals(Color.RED.getRGB(), result.getRGB(8, 0));
    assertEquals(Color.GREEN.getRGB(), result.getRGB(8, 17));
    assertEquals(Color.BLUE.getRGB(), result.getRGB(0, 0));
}
Also used : GridGeometry(org.apache.sis.coverage.grid.GridGeometry) GridExtent(org.apache.sis.coverage.grid.GridExtent) GridCoverage2D(org.apache.sis.coverage.grid.GridCoverage2D) InMemoryGridCoverageResource(org.geotoolkit.storage.memory.InMemoryGridCoverageResource) MapBuilder(org.geotoolkit.map.MapBuilder) SceneDef(org.geotoolkit.display2d.service.SceneDef) SampleDimension(org.apache.sis.coverage.SampleDimension) CanvasDef(org.geotoolkit.display2d.service.CanvasDef) BufferedImage(java.awt.image.BufferedImage) AffineTransform2D(org.apache.sis.internal.referencing.j2d.AffineTransform2D) MapLayers(org.apache.sis.portrayal.MapLayers) Test(org.junit.Test)

Example 9 with InMemoryGridCoverageResource

use of org.geotoolkit.storage.memory.InMemoryGridCoverageResource in project geotoolkit by Geomatys.

the class AggregatedCoverageResourceTest method testResourceMetaInError.

/**
 * Test fail safe when a resource fails on metadatas and read operation.
 *
 * @throws DataStoreException
 * @throws TransformException
 */
@Test
public void testResourceMetaInError() throws DataStoreException, TransformException {
    final CoordinateReferenceSystem crs = CommonCRS.WGS84.normalizedGeographic();
    final SampleDimension sd = new SampleDimension.Builder().setName("data").build();
    final List<SampleDimension> bands = Arrays.asList(sd);
    /*
        Coverage 1
        +---+---+---+
        | 1 |NaN|NaN|
        +---+---+---+

        Coverage 2
        +---+---+---+
        | 2 | 2 |NaN| <-- will fail at metadata and reading time
        +---+---+---+

        Coverage 3
        +---+---+---+
        | 3 | 3 | 3 |
        +---+---+---+
        */
    final GridGeometry grid1 = new GridGeometry(new GridExtent(3, 1), PixelInCell.CELL_CENTER, new AffineTransform2D(1, 0, 0, 1, 0, 0), crs);
    final GridCoverage coverage1 = new BufferedGridCoverage(grid1, bands, DataBuffer.TYPE_DOUBLE);
    final GridCoverage coverage2 = new BufferedGridCoverage(grid1, bands, DataBuffer.TYPE_DOUBLE);
    final GridCoverage coverage3 = new BufferedGridCoverage(grid1, bands, DataBuffer.TYPE_DOUBLE);
    final GridCoverageResource resource1 = new InMemoryGridCoverageResource(coverage1);
    final GridCoverageResource resource2 = new InMemoryGridCoverageResource(coverage2) {

        @Override
        public GridGeometry getGridGeometry() throws DataStoreException {
            throw new RuntimeException("Metadata failing");
        }

        @Override
        public GridCoverage read(GridGeometry domain, int... range) throws DataStoreException {
            throw new RuntimeException("Read failing");
        }
    };
    final GridCoverageResource resource3 = new InMemoryGridCoverageResource(coverage3);
    final WritablePixelIterator write1 = WritablePixelIterator.create((WritableRenderedImage) coverage1.render(null));
    final WritablePixelIterator write2 = WritablePixelIterator.create((WritableRenderedImage) coverage2.render(null));
    final WritablePixelIterator write3 = WritablePixelIterator.create((WritableRenderedImage) coverage3.render(null));
    write1.moveTo(0, 0);
    write1.setSample(0, 1);
    write1.moveTo(1, 0);
    write1.setSample(0, Double.NaN);
    write1.moveTo(2, 0);
    write1.setSample(0, Double.NaN);
    write2.moveTo(0, 0);
    write2.setSample(0, 2);
    write2.moveTo(1, 0);
    write2.setSample(0, 2);
    write2.moveTo(2, 0);
    write2.setSample(0, Double.NaN);
    write3.moveTo(0, 0);
    write3.setSample(0, 3);
    write3.moveTo(1, 0);
    write3.setSample(0, 3);
    write3.moveTo(2, 0);
    write3.setSample(0, 3);
    /*
        We expect a final coverage with values [1,3,3] on a single row
        since 2 has failed reading
        +---+---+---+
        | 1 | 3 | 3 |
        +---+---+---+
        */
    final AggregatedCoverageResource aggregate = new AggregatedCoverageResource();
    aggregate.setInterpolation(Interpolation.NEAREST);
    aggregate.setMode(AggregatedCoverageResource.Mode.ORDER);
    aggregate.add(resource1);
    aggregate.add(resource2);
    aggregate.add(resource3);
    final double[] resolution = aggregate.getGridGeometry().getResolution(true);
    Assert.assertArrayEquals(new double[] { 1.0, 1.0 }, resolution, 0.0);
    final GridGeometry gridGeometry = aggregate.getGridGeometry();
    Assert.assertEquals(grid1, gridGeometry);
    final GridCoverage coverage = aggregate.read(grid1);
    final RenderedImage image = coverage.render(null);
    final PixelIterator reader = PixelIterator.create(image);
    reader.moveTo(0, 0);
    Assert.assertEquals(1, reader.getSample(0));
    reader.moveTo(1, 0);
    Assert.assertEquals(3, reader.getSample(0));
    reader.moveTo(2, 0);
    Assert.assertEquals(3, reader.getSample(0));
}
Also used : GridGeometry(org.apache.sis.coverage.grid.GridGeometry) GridExtent(org.apache.sis.coverage.grid.GridExtent) InMemoryGridCoverageResource(org.geotoolkit.storage.memory.InMemoryGridCoverageResource) PixelIterator(org.apache.sis.image.PixelIterator) WritablePixelIterator(org.apache.sis.image.WritablePixelIterator) GridCoverageBuilder(org.apache.sis.coverage.grid.GridCoverageBuilder) SampleDimension(org.apache.sis.coverage.SampleDimension) BufferedGridCoverage(org.apache.sis.coverage.grid.BufferedGridCoverage) GridCoverage(org.apache.sis.coverage.grid.GridCoverage) WritablePixelIterator(org.apache.sis.image.WritablePixelIterator) InMemoryGridCoverageResource(org.geotoolkit.storage.memory.InMemoryGridCoverageResource) GridCoverageResource(org.apache.sis.storage.GridCoverageResource) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem) BufferedGridCoverage(org.apache.sis.coverage.grid.BufferedGridCoverage) WritableRenderedImage(java.awt.image.WritableRenderedImage) RenderedImage(java.awt.image.RenderedImage) AffineTransform2D(org.apache.sis.internal.referencing.j2d.AffineTransform2D) Test(org.junit.Test)

Example 10 with InMemoryGridCoverageResource

use of org.geotoolkit.storage.memory.InMemoryGridCoverageResource in project geotoolkit by Geomatys.

the class AggregatedCoverageResourceTest method testSampleTransform.

/**
 * Test sample transform is applied and NaN value is evaluated after transform.
 */
@Test
public void testSampleTransform() throws DataStoreException, TransformException {
    final CoordinateReferenceSystem crs = CommonCRS.WGS84.normalizedGeographic();
    final SampleDimension sd = new SampleDimension.Builder().setName("data").build();
    final List<SampleDimension> bands = Arrays.asList(sd);
    /*
        Coverage 1
        +---+---+---+
        | 1 |NaN|NaN|
        +---+---+---+

        Coverage 2
        +---+---+---+
        | 2 | -5 |NaN|
        +---+---+---+

        Coverage 3
        +---+---+---+
        | 3 | 3 | 0 |
        +---+---+---+
        */
    final GridGeometry grid1 = new GridGeometry(new GridExtent(3, 1), CELL_CENTER, new AffineTransform2D(1, 0, 0, 1, 0, 0), crs);
    final GridCoverage coverage1 = new BufferedGridCoverage(grid1, bands, DataBuffer.TYPE_DOUBLE);
    final GridCoverage coverage2 = new BufferedGridCoverage(grid1, bands, DataBuffer.TYPE_DOUBLE);
    final GridCoverage coverage3 = new BufferedGridCoverage(grid1, bands, DataBuffer.TYPE_DOUBLE);
    final GridCoverageResource resource1 = new InMemoryGridCoverageResource(coverage1);
    final GridCoverageResource resource2 = new InMemoryGridCoverageResource(coverage2);
    final GridCoverageResource resource3 = new InMemoryGridCoverageResource(coverage3);
    final WritablePixelIterator write1 = WritablePixelIterator.create((WritableRenderedImage) coverage1.render(null));
    final WritablePixelIterator write2 = WritablePixelIterator.create((WritableRenderedImage) coverage2.render(null));
    final WritablePixelIterator write3 = WritablePixelIterator.create((WritableRenderedImage) coverage3.render(null));
    write1.moveTo(0, 0);
    write1.setSample(0, 1);
    write1.moveTo(1, 0);
    write1.setSample(0, Double.NaN);
    write1.moveTo(2, 0);
    write1.setSample(0, Double.NaN);
    write2.moveTo(0, 0);
    write2.setSample(0, 2);
    write2.moveTo(1, 0);
    write2.setSample(0, -5);
    write2.moveTo(2, 0);
    write2.setSample(0, Double.NaN);
    write3.moveTo(0, 0);
    write3.setSample(0, 3);
    write3.moveTo(1, 0);
    write3.setSample(0, 3);
    write3.moveTo(2, 0);
    write3.setSample(0, 0);
    /*
        We expect a final coverage with values [1,2,3] on a single row
        +---+---+---+
        | 12 |-3|NaN|
        +---+---+---+
        */
    final MathTransform1D trs1 = new AbstractMathTransform1D() {

        @Override
        public double transform(double value) throws TransformException {
            return value * 12.0;
        }

        @Override
        public double derivative(double value) throws TransformException {
            throw new TransformException("Not supported.");
        }
    };
    final MathTransform1D trs2 = new AbstractMathTransform1D() {

        @Override
        public double transform(double value) throws TransformException {
            return value < 0 ? Double.NaN : value;
        }

        @Override
        public double derivative(double value) throws TransformException {
            throw new TransformException("Not supported.");
        }
    };
    final MathTransform1D trs3 = new AbstractMathTransform1D() {

        @Override
        public double transform(double value) throws TransformException {
            return value > 0 ? -value : Double.NaN;
        }

        @Override
        public double derivative(double value) throws TransformException {
            throw new TransformException("Not supported.");
        }
    };
    final AggregatedCoverageResource.VirtualBand band = new AggregatedCoverageResource.VirtualBand();
    final AggregatedCoverageResource.Source source1 = new AggregatedCoverageResource.Source(resource1, 0, trs1);
    final AggregatedCoverageResource.Source source2 = new AggregatedCoverageResource.Source(resource2, 0, trs2);
    final AggregatedCoverageResource.Source source3 = new AggregatedCoverageResource.Source(resource3, 0, trs3);
    band.setSources(source1, source2, source3);
    final AggregatedCoverageResource aggregate = new AggregatedCoverageResource(Collections.singletonList(band), AggregatedCoverageResource.Mode.ORDER, null);
    aggregate.setInterpolation(Interpolation.NEAREST);
    final double[] resolution = aggregate.getGridGeometry().getResolution(true);
    Assert.assertArrayEquals(new double[] { 1.0, 1.0 }, resolution, 0.0);
    final GridGeometry gridGeometry = aggregate.getGridGeometry();
    assertEquals(grid1, gridGeometry);
    final GridCoverage coverage = aggregate.read(grid1);
    final RenderedImage image = coverage.render(null);
    final PixelIterator reader = PixelIterator.create(image);
    reader.moveTo(0, 0);
    assertEquals(12.0, reader.getSampleDouble(0), 0.0);
    reader.moveTo(1, 0);
    assertEquals(-3.0, reader.getSampleDouble(0), 0.0);
    reader.moveTo(2, 0);
    assertEquals(Double.NaN, reader.getSampleDouble(0), 0.0);
}
Also used : GridGeometry(org.apache.sis.coverage.grid.GridGeometry) GridExtent(org.apache.sis.coverage.grid.GridExtent) InMemoryGridCoverageResource(org.geotoolkit.storage.memory.InMemoryGridCoverageResource) AbstractMathTransform1D(org.apache.sis.referencing.operation.transform.AbstractMathTransform1D) PixelIterator(org.apache.sis.image.PixelIterator) WritablePixelIterator(org.apache.sis.image.WritablePixelIterator) GridCoverageBuilder(org.apache.sis.coverage.grid.GridCoverageBuilder) TransformException(org.opengis.referencing.operation.TransformException) SampleDimension(org.apache.sis.coverage.SampleDimension) BufferedGridCoverage(org.apache.sis.coverage.grid.BufferedGridCoverage) GridCoverage(org.apache.sis.coverage.grid.GridCoverage) WritablePixelIterator(org.apache.sis.image.WritablePixelIterator) InMemoryGridCoverageResource(org.geotoolkit.storage.memory.InMemoryGridCoverageResource) GridCoverageResource(org.apache.sis.storage.GridCoverageResource) AbstractMathTransform1D(org.apache.sis.referencing.operation.transform.AbstractMathTransform1D) MathTransform1D(org.opengis.referencing.operation.MathTransform1D) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem) BufferedGridCoverage(org.apache.sis.coverage.grid.BufferedGridCoverage) WritableRenderedImage(java.awt.image.WritableRenderedImage) RenderedImage(java.awt.image.RenderedImage) AffineTransform2D(org.apache.sis.internal.referencing.j2d.AffineTransform2D) Test(org.junit.Test)

Aggregations

InMemoryGridCoverageResource (org.geotoolkit.storage.memory.InMemoryGridCoverageResource)38 GridCoverage (org.apache.sis.coverage.grid.GridCoverage)34 Test (org.junit.Test)33 GridExtent (org.apache.sis.coverage.grid.GridExtent)32 GridGeometry (org.apache.sis.coverage.grid.GridGeometry)32 SampleDimension (org.apache.sis.coverage.SampleDimension)28 AffineTransform2D (org.apache.sis.internal.referencing.j2d.AffineTransform2D)27 GridCoverageBuilder (org.apache.sis.coverage.grid.GridCoverageBuilder)26 GridCoverageResource (org.apache.sis.storage.GridCoverageResource)25 CoordinateReferenceSystem (org.opengis.referencing.crs.CoordinateReferenceSystem)22 RenderedImage (java.awt.image.RenderedImage)18 BufferedGridCoverage (org.apache.sis.coverage.grid.BufferedGridCoverage)17 WritableRenderedImage (java.awt.image.WritableRenderedImage)16 PixelIterator (org.apache.sis.image.PixelIterator)15 WritablePixelIterator (org.apache.sis.image.WritablePixelIterator)15 GeneralEnvelope (org.apache.sis.geometry.GeneralEnvelope)14 BufferedImage (java.awt.image.BufferedImage)13 Graphics2D (java.awt.Graphics2D)6 GridCoverage2D (org.apache.sis.coverage.grid.GridCoverage2D)6 FeatureSet (org.apache.sis.storage.FeatureSet)6