Search in sources :

Example 1 with DecoderWrapper

use of org.apache.sis.internal.netcdf.ucar.DecoderWrapper in project sis by apache.

the class MetadataReaderTest method testUCAR.

/**
 * Reads the metadata using the UCAR library and compares
 * its string representation with the expected one.
 *
 * @throws IOException if an I/O error occurred.
 * @throws DataStoreException if a logical error occurred.
 */
@Test
public void testUCAR() throws IOException, DataStoreException {
    final Metadata metadata;
    try (Decoder input = new DecoderWrapper(new NetcdfDataset(open(NCEP)), GeometryLibrary.JAVA2D, TestCase.LISTENERS)) {
        metadata = new MetadataReader(input).read();
    }
    compareToExpected(metadata);
}
Also used : DecoderWrapper(org.apache.sis.internal.netcdf.ucar.DecoderWrapper) DefaultMetadata(org.apache.sis.metadata.iso.DefaultMetadata) Metadata(org.opengis.metadata.Metadata) NetcdfDataset(ucar.nc2.dataset.NetcdfDataset) Decoder(org.apache.sis.internal.netcdf.Decoder) ChannelDecoderTest(org.apache.sis.internal.netcdf.impl.ChannelDecoderTest) Test(org.junit.Test)

Aggregations

Decoder (org.apache.sis.internal.netcdf.Decoder)1 ChannelDecoderTest (org.apache.sis.internal.netcdf.impl.ChannelDecoderTest)1 DecoderWrapper (org.apache.sis.internal.netcdf.ucar.DecoderWrapper)1 DefaultMetadata (org.apache.sis.metadata.iso.DefaultMetadata)1 Test (org.junit.Test)1 Metadata (org.opengis.metadata.Metadata)1 NetcdfDataset (ucar.nc2.dataset.NetcdfDataset)1