Search in sources :

Example 26 with SampleDimension

use of org.apache.sis.coverage.SampleDimension in project sis by apache.

the class AbstractGridResource method createMetadata.

/**
 * Invoked the first time that {@link #getMetadata()} is invoked. The default implementation populates
 * metadata based on information provided by {@link #getIdentifier()}, {@link #getGridGeometry()} and
 * {@link #getSampleDimensions()}. Subclasses should override if they can provide more information.
 *
 * @param  metadata  the builder where to set metadata properties.
 * @throws DataStoreException if an error occurred while reading metadata from the data store.
 */
@Override
protected void createMetadata(final MetadataBuilder metadata) throws DataStoreException {
    super.createMetadata(metadata);
    metadata.addSpatialRepresentation(null, getGridGeometry(), false);
    for (final SampleDimension band : getSampleDimensions()) {
        metadata.addNewBand(band);
    }
}
Also used : SampleDimension(org.apache.sis.coverage.SampleDimension)

Aggregations

SampleDimension (org.apache.sis.coverage.SampleDimension)26 GridGeometry (org.apache.sis.coverage.grid.GridGeometry)5 Category (org.apache.sis.coverage.Category)4 GridExtent (org.apache.sis.coverage.grid.GridExtent)4 MathTransform1D (org.opengis.referencing.operation.MathTransform1D)4 RenderedImage (java.awt.image.RenderedImage)3 Test (org.junit.Test)3 IndexColorModel (java.awt.image.IndexColorModel)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 DoubleUnaryOperator (java.util.function.DoubleUnaryOperator)2 MeasurementRange (org.apache.sis.measure.MeasurementRange)2 NumberRange (org.apache.sis.measure.NumberRange)2 DataStoreContentException (org.apache.sis.storage.DataStoreContentException)2 CoordinateReferenceSystem (org.opengis.referencing.crs.CoordinateReferenceSystem)2 TransformException (org.opengis.referencing.operation.TransformException)2 Color (java.awt.Color)1 Dimension (java.awt.Dimension)1 Shape (java.awt.Shape)1 BufferedImage (java.awt.image.BufferedImage)1