assertXpathEvaluatesTo("new title", "/coverage/title", dom );
CoverageInfo c = catalog.getCoverageByName( "wcs", "tazdem");
assertEquals( "new title", c.getTitle() );
List<CoverageDimensionInfo> dimensions = c.getDimensions();
CoverageDimensionInfo dimension = dimensions.get(0);
assertEquals( "GRAY_INDEX", dimension.getName());
NumberRange range = dimension.getRange();
assertEquals( -9999.0, range.getMinimum(), DELTA);
assertEquals( -9999.0, range.getMaximum(), DELTA);
assertEquals("GridSampleDimension[-9999.0,-9999.0]", dimension.getDescription());
List<Double> nullValues = dimension.getNullValues();
assertEquals( -9999.0, nullValues.get(0), DELTA);
// Updating dimension properties
xml =
"<coverage>" +
"<name>tazdem</name>" +
"<title>new title</title>" +
"<dimensions>" +
"<coverageDimension>" +
"<name>Elevation</name>" +
"<description>GridSampleDimension[-100.0,1000.0]</description>" +
"<nullValues>" +
"<double>-999</double>" +
"</nullValues>" +
"<range>" +
"<min>-100</min>" +
"<max>1000</max>" +
"</range>" +
"</coverageDimension>" +
"</dimensions>" +
"</coverage>";
response =
putAsServletResponse("/rest/workspaces/wcs/coveragestores/DEM/coverages/tazdem", xml, "text/xml");
assertEquals( 200, response.getStatusCode() );
c = catalog.getCoverageByName( "wcs", "tazdem");
dimensions = c.getDimensions();
dimension = dimensions.get(0);
assertEquals( "Elevation", dimension.getName());
range = dimension.getRange();
assertEquals( -100.0, range.getMinimum(), DELTA);
assertEquals( 1000.0, range.getMaximum(), DELTA);
assertEquals("GridSampleDimension[-100.0,1000.0]", dimension.getDescription());
nullValues = dimension.getNullValues();
assertEquals( -999.0, nullValues.get(0), DELTA);
CoverageStoreInfo coverageStore = catalog.getStoreByName("wcs", "DEM", CoverageStoreInfo.class);
GridCoverageReader reader = null;
GridCoverage2D coverage = null;