public void testRasterFilterRed() throws Exception { String queryString = "wcs?sourcecoverage=" + getLayerId(MOSAIC) + "&request=getcoverage" + "&service=wcs&version=1.0.0&format=image/tiff&crs=EPSG:4326" + "&bbox=0,0,1,1&CQL_FILTER=location like 'red%25'&width=150&height=150"; MockHttpServletResponse response = getAsServletResponse(queryString); RenderedImage image = readTiff(response); // check the pixel int[] pixel = new int[3]; image.getData().getPixel(0, 0, pixel); assertEquals(255, pixel[0]); assertEquals(0, pixel[1]); assertEquals(0, pixel[2]); }
public void testRasterFilterGreen() throws Exception { String queryString = "wcs?sourcecoverage=" + getLayerId(MOSAIC) + "&request=getcoverage" + "&service=wcs&version=1.0.0&&format=image/tiff&crs=EPSG:4326" + "&bbox=0,0,1,1&CQL_FILTER=location like 'green%25'&width=150&height=150"; MockHttpServletResponse response = getAsServletResponse(queryString); // make sure we can read the coverage back RenderedImage image = readTiff(response); // check the pixel int[] pixel = new int[3]; image.getData().getPixel(0, 0, pixel); assertEquals(0, pixel[0]); assertEquals(255, pixel[1]); assertEquals(0, pixel[2]); }
@Test public void testRasterFilterRed() throws Exception { String queryString = "wcs?sourcecoverage=" + getLayerId(MOSAIC) + "&request=getcoverage" + "&service=wcs&version=1.0.0&format=image/tiff&crs=EPSG:4326" + "&bbox=0,0,1,1&CQL_FILTER=location like 'red%25'&width=150&height=150"; MockHttpServletResponse response = getAsServletResponse(queryString); RenderedImage image = readTiff(response); // check the pixel int[] pixel = new int[3]; image.getData().getPixel(0, 0, pixel); assertEquals(255, pixel[0]); assertEquals(0, pixel[1]); assertEquals(0, pixel[2]); }
@Test public void testRasterFilterGreen() throws Exception { String queryString = "wcs?sourcecoverage=" + getLayerId(MOSAIC) + "&request=getcoverage" + "&service=wcs&version=1.0.0&&format=image/tiff&crs=EPSG:4326" + "&bbox=0,0,1,1&CQL_FILTER=location like 'green%25'&width=150&height=150"; MockHttpServletResponse response = getAsServletResponse(queryString); // make sure we can read the coverage back RenderedImage image = readTiff(response); // check the pixel int[] pixel = new int[3]; image.getData().getPixel(0, 0, pixel); assertEquals(0, pixel[0]); assertEquals(255, pixel[1]); assertEquals(0, pixel[2]); }