Search in sources :

Example 26 with InMemoryGridCoverageResource

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

the class AggregatedCoverageResourceTest method testAggregateOnSeparateBands.

/**
 * Test aggregating coverages with a single band to separate output bands.
 */
@Test
public void testAggregateOnSeparateBands() 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
        +---+---+---+
        |NaN| 2 | 3 |
        +---+---+---+

        Coverage 2
        +---+---+---+
        | 4 |NaN| 6 |
        +---+---+---+

        Coverage 3
        +---+---+---+
        | 7 | 8 |NaN|
        +---+---+---+
        */
    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.setPixel(new double[] { Double.NaN });
    write1.moveTo(1, 0);
    write1.setPixel(new double[] { 2.0 });
    write1.moveTo(2, 0);
    write1.setPixel(new double[] { 3.0 });
    write2.moveTo(0, 0);
    write2.setPixel(new double[] { 4.0 });
    write2.moveTo(1, 0);
    write2.setPixel(new double[] { Double.NaN });
    write2.moveTo(2, 0);
    write2.setPixel(new double[] { 6.0 });
    write3.moveTo(0, 0);
    write3.setPixel(new double[] { 7.0 });
    write3.moveTo(1, 0);
    write3.setPixel(new double[] { 8.0 });
    write3.moveTo(2, 0);
    write3.setPixel(new double[] { Double.NaN });
    /*
        We expect a final coverage with values on a single row
        +-------+-------+-------+
        |NaN:4:7|2:NaN:8|3:6:NaN|
        +-------+-------+-------+
        */
    final AggregatedCoverageResource.VirtualBand band0 = new AggregatedCoverageResource.VirtualBand();
    band0.setSources(new AggregatedCoverageResource.Source(resource1, 0));
    final AggregatedCoverageResource.VirtualBand band1 = new AggregatedCoverageResource.VirtualBand();
    band1.setSources(new AggregatedCoverageResource.Source(resource2, 0));
    final AggregatedCoverageResource.VirtualBand band2 = new AggregatedCoverageResource.VirtualBand();
    band2.setSources(new AggregatedCoverageResource.Source(resource3, 0));
    final AggregatedCoverageResource aggregate = new AggregatedCoverageResource(Arrays.asList(band0, band1, band2), AggregatedCoverageResource.Mode.ORDER, crs);
    aggregate.setInterpolation(Interpolation.NEAREST);
    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(Double.NaN, reader.getSampleDouble(0), 0.0);
    assertEquals(4, reader.getSampleDouble(1), 0.0);
    assertEquals(7, reader.getSampleDouble(2), 0.0);
    reader.moveTo(1, 0);
    assertEquals(2, reader.getSampleDouble(0), 0.0);
    assertEquals(Double.NaN, reader.getSampleDouble(1), 0.0);
    assertEquals(8, reader.getSampleDouble(2), 0.0);
    reader.moveTo(2, 0);
    assertEquals(3, reader.getSampleDouble(0), 0.0);
    assertEquals(6, reader.getSampleDouble(1), 0.0);
    assertEquals(Double.NaN, reader.getSampleDouble(2), 0.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 27 with InMemoryGridCoverageResource

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

the class AggregatedCoverageResourceTest method testNaNAdded.

/**
 * Test aggregation generates a NaN between coverages
 *
 * @throws DataStoreException
 * @throws TransformException
 */
@Test
public void testNaNAdded() 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 |
        +---+

        Coverage 3
                +---+
                | 3 |
                +---+
        */
    final GridGeometry grid = new GridGeometry(new GridExtent(3, 1), CELL_CENTER, new AffineTransform2D(1, 0, 0, 1, 0, 0), crs);
    final GridGeometry grid1 = new GridGeometry(new GridExtent(1, 1), CELL_CENTER, new AffineTransform2D(1, 0, 0, 1, 0, 0), crs);
    final GridGeometry grid3 = new GridGeometry(new GridExtent(1, 1), CELL_CENTER, new AffineTransform2D(1, 0, 0, 1, 2, 0), crs);
    final GridCoverage coverage1 = new BufferedGridCoverage(grid1, bands, DataBuffer.TYPE_INT);
    final GridCoverage coverage3 = new BufferedGridCoverage(grid3, bands, DataBuffer.TYPE_INT);
    final GridCoverageResource resource1 = new InMemoryGridCoverageResource(coverage1);
    final GridCoverageResource resource3 = new InMemoryGridCoverageResource(coverage3);
    final WritablePixelIterator write1 = WritablePixelIterator.create((WritableRenderedImage) coverage1.render(null));
    final WritablePixelIterator write3 = WritablePixelIterator.create((WritableRenderedImage) coverage3.render(null));
    write1.moveTo(0, 0);
    write1.setSample(0, 1);
    write3.moveTo(0, 0);
    write3.setSample(0, 3);
    /*
        We expect a final coverage with values [1,NaN,3] on a single row
        +---+---+---+
        | 1 |NaN| 3 |
        +---+---+---+
        */
    final AggregatedCoverageResource aggregate = new AggregatedCoverageResource();
    aggregate.setInterpolation(Interpolation.NEAREST);
    aggregate.setMode(AggregatedCoverageResource.Mode.ORDER);
    aggregate.setDataType(DataBuffer.TYPE_DOUBLE);
    aggregate.add(resource1);
    aggregate.add(resource3);
    final double[] resolution = aggregate.getGridGeometry().getResolution(true);
    Assert.assertArrayEquals(new double[] { 1.0, 1.0 }, resolution, 0.0);
    final GridCoverage coverage = aggregate.read(grid);
    final RenderedImage image = coverage.render(null);
    final PixelIterator reader = PixelIterator.create(image);
    reader.moveTo(0, 0);
    assertEquals(1, reader.getSample(0));
    reader.moveTo(1, 0);
    assertEquals(Double.NaN, reader.getSampleDouble(0), 0.0);
    reader.moveTo(2, 0);
    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 28 with InMemoryGridCoverageResource

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

the class AggregatedCoverageResourceTest method testDefinedNaNAdded.

/**
 * Test aggregation generates a NaN between coverages.
 * One coverage has a special no data value.
 *
 * @throws DataStoreException
 * @throws TransformException
 */
@Test
public void testDefinedNaNAdded() throws DataStoreException, TransformException {
    final CoordinateReferenceSystem crs = CommonCRS.WGS84.normalizedGeographic();
    final SampleDimension sd = new SampleDimension.Builder().setName("data").build();
    final SampleDimension sd1 = new SampleDimension.Builder().setName("data").build();
    final List<SampleDimension> bands1 = Arrays.asList(sd1);
    final SampleDimension sd3 = new SampleDimension.Builder().setName("data").addQualitative(null, -1).addQuantitative("data", 0, 10, 1, 0, Units.UNITY).build();
    final List<SampleDimension> bands3 = Arrays.asList(sd3);
    /*
        Coverage 1
        +---+
        | 1 |
        +---+

        Coverage 3
            +---+---+
            |-1 | 3 |
            +---+---+
        */
    final GridGeometry grid = new GridGeometry(new GridExtent(3, 1), CELL_CENTER, new AffineTransform2D(1, 0, 0, 1, 0, 0), crs);
    final GridGeometry grid1 = new GridGeometry(new GridExtent(1, 1), CELL_CENTER, new AffineTransform2D(1, 0, 0, 1, 0, 0), crs);
    final GridGeometry grid3 = new GridGeometry(new GridExtent(2, 1), CELL_CENTER, new AffineTransform2D(1, 0, 0, 1, 1, 0), crs);
    final GridCoverage coverage1 = new BufferedGridCoverage(grid1, bands1, DataBuffer.TYPE_INT);
    final GridCoverage coverage3 = new BufferedGridCoverage(grid3, bands3, DataBuffer.TYPE_INT);
    final GridCoverageResource resource1 = new InMemoryGridCoverageResource(Names.createLocalName(null, null, "Coverage1"), coverage1);
    final GridCoverageResource resource3 = new InMemoryGridCoverageResource(Names.createLocalName(null, null, "Coverage3"), coverage3);
    final WritablePixelIterator write1 = WritablePixelIterator.create((WritableRenderedImage) coverage1.render(null));
    final WritablePixelIterator write3 = WritablePixelIterator.create((WritableRenderedImage) coverage3.render(null));
    write1.moveTo(0, 0);
    write1.setSample(0, 1);
    write3.moveTo(0, 0);
    write3.setSample(0, -1);
    write3.moveTo(1, 0);
    write3.setSample(0, 3);
    /*
        We expect a final coverage with values [1,NaN,3] on a single row
        +---+---+---+
        | 1 |NaN| 3 |
        +---+---+---+
        */
    final AggregatedCoverageResource aggregate = new AggregatedCoverageResource();
    aggregate.setInterpolation(Interpolation.NEAREST);
    aggregate.setMode(AggregatedCoverageResource.Mode.ORDER);
    aggregate.add(resource1);
    aggregate.add(resource3);
    aggregate.setSampleDimensions(Collections.singletonList(sd));
    final double[] resolution = aggregate.getGridGeometry().getResolution(true);
    Assert.assertArrayEquals(new double[] { 1.0, 1.0 }, resolution, 0.0);
    final GridGeometry gridGeometry = aggregate.getGridGeometry();
    final GridCoverage coverage = aggregate.read(grid);
    final RenderedImage image = coverage.render(null);
    final PixelIterator reader = PixelIterator.create(image);
    reader.moveTo(0, 0);
    assertEquals(1, reader.getSample(0));
    reader.moveTo(1, 0);
    assertEquals(Double.NaN, reader.getSampleDouble(0), 0.0);
    reader.moveTo(2, 0);
    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 29 with InMemoryGridCoverageResource

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

the class AggregatedCoverageResourceTest method testSharedGridGeometry.

/**
 * Test the grid geometry is preserved if all coverages have the same.
 */
@Test
public void testSharedGridGeometry() 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 | 2 | 3 |
        +---+---+---+

        Coverage 2
        +---+---+---+
        | 4 | 5 | 6 |
        +---+---+---+
        */
    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 GridCoverageResource resource1 = new InMemoryGridCoverageResource(coverage1);
    final GridCoverageResource resource2 = new InMemoryGridCoverageResource(coverage2);
    final WritablePixelIterator write1 = WritablePixelIterator.create((WritableRenderedImage) coverage1.render(null));
    final WritablePixelIterator write2 = WritablePixelIterator.create((WritableRenderedImage) coverage2.render(null));
    write1.moveTo(0, 0);
    write1.setPixel(new double[] { 1 });
    write1.moveTo(1, 0);
    write1.setPixel(new double[] { 2 });
    write1.moveTo(2, 0);
    write1.setPixel(new double[] { 3 });
    write2.moveTo(0, 0);
    write2.setPixel(new double[] { 4 });
    write2.moveTo(1, 0);
    write2.setPixel(new double[] { 5 });
    write2.moveTo(2, 0);
    write2.setPixel(new double[] { 6 });
    /*
        We expect a final coverage with values [1:4,2:5,3:6] on a single row
        +---+---+---+
        |1:4|2:5|3:6|
        +---+---+---+
        */
    final AggregatedCoverageResource.VirtualBand band0 = new AggregatedCoverageResource.VirtualBand();
    band0.setSources(new AggregatedCoverageResource.Source(resource1, 0));
    final AggregatedCoverageResource.VirtualBand band1 = new AggregatedCoverageResource.VirtualBand();
    band1.setSources(new AggregatedCoverageResource.Source(resource2, 0));
    final AggregatedCoverageResource aggregate = new AggregatedCoverageResource(Arrays.asList(band0, band1), AggregatedCoverageResource.Mode.ORDER, null);
    aggregate.setInterpolation(Interpolation.NEAREST);
    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(1, reader.getSample(0));
    assertEquals(4, reader.getSample(1));
    reader.moveTo(1, 0);
    assertEquals(2, reader.getSample(0));
    assertEquals(5, reader.getSample(1));
    reader.moveTo(2, 0);
    assertEquals(3, reader.getSample(0));
    assertEquals(6, reader.getSample(1));
}
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 30 with InMemoryGridCoverageResource

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

the class AggregatedCoverageResourceTest method typeInference.

/**
 * Ensure that aggregation properly detect source data types and re-use them for output production.
 */
@Test
public void typeInference() throws Exception {
    final CoordinateReferenceSystem crs = CommonCRS.defaultGeographic();
    final AffineTransform2D gridToCRS = new AffineTransform2D(1, 0, 0, 1, 0, 0);
    final IntFunction<GridGeometry> translateGrid = i -> new GridGeometry(new GridExtent(1, 1).translate(i, 0), CELL_CENTER, gridToCRS, crs);
    final GridGeometry gridLeft = translateGrid.apply(0);
    final GridGeometry gridCenterLeft = translateGrid.apply(1);
    final GridGeometry gridCenterRight = translateGrid.apply(2);
    final GridGeometry gridRight = translateGrid.apply(3);
    final GridGeometry overallGrid = new GridGeometry(new GridExtent(4, 1), CELL_CENTER, gridToCRS, crs);
    final SampleDimension sd = new SampleDimension.Builder().setName("data").build();
    final GridCoverage bandShort = new BufferedGridCoverage(gridLeft, Collections.singletonList(sd), DataBuffer.TYPE_SHORT);
    final GridCoverage bandInt = new BufferedGridCoverage(gridCenterLeft, Collections.singletonList(sd), DataBuffer.TYPE_INT);
    final AggregatedCoverageResource aggregate = new AggregatedCoverageResource();
    aggregate.setInterpolation(Interpolation.NEAREST);
    aggregate.add(new InMemoryGridCoverageResource(bandInt));
    aggregate.add(new InMemoryGridCoverageResource(bandShort));
    RenderedImage rendering = aggregate.read(overallGrid).render(null);
    assertEquals("Infered sample type is wrong", DataBuffer.TYPE_INT, rendering.getSampleModel().getDataType());
    final GridCoverage bandFloat = new BufferedGridCoverage(gridCenterRight, Collections.singletonList(sd), DataBuffer.TYPE_FLOAT);
    aggregate.add(new InMemoryGridCoverageResource(bandFloat));
    rendering = aggregate.read(overallGrid).render(null);
    assertEquals("Infered sample type is wrong", DataBuffer.TYPE_FLOAT, rendering.getSampleModel().getDataType());
    // Test non-homogeneous aggregation
    final SampleDimension userDefinedSd = new SampleDimension.Builder().setName("data").setBackground("NaN", Double.NaN).addQuantitative("percentage", 0, 1, 100d, 0d, Units.PERCENT).build();
    aggregate.add(new InMemoryGridCoverageResource(new BufferedGridCoverage(gridRight, Collections.singletonList(userDefinedSd), DataBuffer.TYPE_DOUBLE)));
    rendering = aggregate.read(overallGrid).render(null);
    assertEquals("Infered sample type is wrong", DataBuffer.TYPE_DOUBLE, rendering.getSampleModel().getDataType());
}
Also used : Color(java.awt.Color) AxisDirection(org.opengis.referencing.cs.AxisDirection) Arrays(java.util.Arrays) PixelIterator(org.apache.sis.image.PixelIterator) PixelInCell(org.opengis.referencing.datum.PixelInCell) Envelope(org.opengis.geometry.Envelope) DefaultFactories(org.apache.sis.internal.system.DefaultFactories) WritableRenderedImage(java.awt.image.WritableRenderedImage) InMemoryGridCoverageResource(org.geotoolkit.storage.memory.InMemoryGridCoverageResource) TransformException(org.opengis.referencing.operation.TransformException) GeneralEnvelope(org.apache.sis.geometry.GeneralEnvelope) StorageCountListener(org.geotoolkit.storage.StorageCountListener) BufferedImage(java.awt.image.BufferedImage) RenderedImage(java.awt.image.RenderedImage) Names(org.apache.sis.util.iso.Names) CELL_CENTER(org.opengis.referencing.datum.PixelInCell.CELL_CENTER) List(java.util.List) Interpolation(org.apache.sis.image.Interpolation) GridCoverageBuilder(org.apache.sis.coverage.grid.GridCoverageBuilder) WritablePixelIterator(org.apache.sis.image.WritablePixelIterator) AbstractMathTransform1D(org.apache.sis.referencing.operation.transform.AbstractMathTransform1D) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem) FactoryException(org.opengis.util.FactoryException) DataBuffer(java.awt.image.DataBuffer) SampleDimension(org.apache.sis.coverage.SampleDimension) ContentEvent(org.geotoolkit.storage.event.ContentEvent) GridGeometry(org.apache.sis.coverage.grid.GridGeometry) ModelEvent(org.geotoolkit.storage.event.ModelEvent) BufferedImages(org.geotoolkit.image.BufferedImages) AffineTransform2D(org.apache.sis.internal.referencing.j2d.AffineTransform2D) CRSFactory(org.opengis.referencing.crs.CRSFactory) Graphics2D(java.awt.Graphics2D) CommonCRS(org.apache.sis.referencing.CommonCRS) DataStoreException(org.apache.sis.storage.DataStoreException) GridCoverageResource(org.apache.sis.storage.GridCoverageResource) IntFunction(java.util.function.IntFunction) DefaultCoordinateSystemAxis(org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis) Units(org.apache.sis.measure.Units) MathTransform1D(org.opengis.referencing.operation.MathTransform1D) DefaultImageDatum(org.apache.sis.referencing.datum.DefaultImageDatum) Test(org.junit.Test) BufferedGridCoverage(org.apache.sis.coverage.grid.BufferedGridCoverage) StoreEvent(org.apache.sis.storage.event.StoreEvent) GridCoverage(org.apache.sis.coverage.grid.GridCoverage) DefaultCartesianCS(org.apache.sis.referencing.cs.DefaultCartesianCS) GridExtent(org.apache.sis.coverage.grid.GridExtent) AggregationEvent(org.geotoolkit.storage.event.AggregationEvent) Assert(org.junit.Assert) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) GridGeometry(org.apache.sis.coverage.grid.GridGeometry) GridExtent(org.apache.sis.coverage.grid.GridExtent) InMemoryGridCoverageResource(org.geotoolkit.storage.memory.InMemoryGridCoverageResource) 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) 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