@Override public void initialize() throws OperatorException { initialized = true; setTargetProduct(new Product("A", "AT", 10, 10)); } }
@Before public void setUp() throws Exception { product = new Product("name", "type", 10, 10); cfTimePart = new CfTimePart(); }
@Override protected void setUp() throws Exception { product = new Product("product", "type", 200, 300); product.addBand("b1", ProductData.TYPE_INT8); product.addBand("b2", ProductData.TYPE_INT8); }
@Override public void setUp() throws Exception { _generalFilterBandPersistable = new GeneralFilterBandPersistable(); _product = new Product("p", "doesntMatter", 2, 2); _source = _product.addBand("anyBand", ProductData.TYPE_UINT16); }
@Test public void testMaskGroupIsInitiallyEmpty() throws Exception { final Product p = new Product("P", "T", 1, 1); assertEquals(0, p.getMaskGroup().getNodeCount()); }
private Product createSourceProduct() { final Product sourceProduct = new Product("sp", "spt", 4, 4); sourceProduct.addBand("b1", ProductData.TYPE_INT32); sourceProduct.addTiePointGrid(new TiePointGrid("tpg1", 3, 3, 0, 0, 2, 2, new float[]{ 0.1f, 0.2f, 0.3f, 0.2f, 0.3f, 0.4f, 0.3f, 0.4f, 0.5f, })); return sourceProduct; }
@Override public void setUp() throws Exception { _srcProduct = new Product("srcProduct", "pType", 100, 200); _srcBand1 = _srcProduct.addBand("Band1", ProductData.TYPE_INT8); _srcBand2 = _srcProduct.addBand("Band2", ProductData.TYPE_INT32); _destProduct = new Product("destProduct", "pType", 25, 50); _destBand1 = _destProduct.addBand("Band1", ProductData.TYPE_INT8); _destBand2 = _destProduct.addBand("Band2", ProductData.TYPE_INT32); _subsetDef = new ProductSubsetDef("subset"); _subsetDef.setRegion(50, 100, 50, 100); _subsetDef.setSubSampling(2, 2); }
@Test public void testSelectProfile_6() throws Exception { RGBImageProfile[] rgbImageProfiles = new RGBImageProfile[0]; Product product = new Product("some_name_123", "some_type_123", 1, 1); product.setDescription("This is some description text."); RGBImageProfile profile = RGBImageProfilePane.findProfileForProductPattern(rgbImageProfiles, product); assertNull(profile); } }
@Override public void initialize() { targetProduct = new Product("name", "desc", RASTER_WIDTH, RASTER_HEIGHT); targetProduct.addBand("OperatorBand", ProductData.TYPE_INT8); targetProduct.addBand("ConstantBand", ProductData.TYPE_INT8).setSourceImage(new BufferedImage(RASTER_WIDTH, RASTER_HEIGHT, BufferedImage.TYPE_BYTE_INDEXED)); targetProduct.addBand(new VirtualBand("VirtualBand", ProductData.TYPE_FLOAT32, RASTER_WIDTH, RASTER_HEIGHT, "OperatorBand + ConstantBand")); targetProduct.setPreferredTileSize(2, 2); }
public void testBitmaskDefExpressionsAreUpdateIfForeignNodeNameChanged() { final Product product1 = new Product("P1", "t", 1, 1); final VirtualBand p1v1 = new VirtualBand("P1V1", ProductData.TYPE_FLOAT32, 1, 1, "42"); product1.addBand(p1v1); final Product product2 = new Product("P2", "t", 1, 1); final BitmaskDef p2bd = new BitmaskDef("P2BD", "P2-Bitmask", "$1.P1V1 == 42.0", Color.RED, 0.5f); product2.addBitmaskDef(p2bd); _productManager.addProduct(product1); _productManager.addProduct(product2); p1v1.setName("TheAnswer"); assertEquals("$1.TheAnswer == 42.0", p2bd.getExpr()); }
@Override public void initialize() throws OperatorException { int w = sourceProduct.getSceneRasterWidth(); int h = sourceProduct.getSceneRasterHeight(); Product product = new Product("X", "Y", w, h); product.addBand(new Band("D", ProductData.TYPE_INT32, w, h)); setTargetProduct(product); }
@Before public void setUp() throws Exception { appContext = new DefaultAppContext("Fart, fart!"); defaultProducts = new Product[4]; for (int i = 0; i < defaultProducts.length; i++) { defaultProducts[i] = new Product("P" + i, "T" + i, 10, 10); appContext.getProductManager().addProduct(defaultProducts[i]); } appContext.setSelectedProduct(defaultProducts[0]); }
@Before public void setUp() throws Exception { sourceP = new Product("test", "test", 6, 7); final Band latBand = sourceP.addBand(bandNameLat, ProductData.TYPE_FLOAT32); fillWithData(latBand, 0.03f, 30f); final Band lonBand = sourceP.addBand(bandNameLon, ProductData.TYPE_FLOAT32); fillWithData(lonBand, 0.047f, 50f); pixelGeoCoding = GeoCodingFactory.createPixelGeoCoding(latBand, lonBand, null, 5); sourceP.setGeoCoding(pixelGeoCoding); }
@Before public void setup() { product = new Product("P", "T", 11, 11); pyramids = new VectorDataNode("pyramids", Placemark.createGeometryFeatureType()); product.getVectorDataGroup().add(pyramids); image = new VectorDataMultiLevelImage(VectorDataMultiLevelImage.createMaskMultiLevelSource(pyramids), pyramids); }
@Override public void initialize() throws OperatorException { Product sourceProduct = getSourceProduct(); tileSize = sourceProduct.getPreferredTileSize(); Product product = new Product("name", "type", sourceProduct.getSceneRasterWidth(), sourceProduct.getSceneRasterHeight()); product.addBand("A", ProductData.TYPE_FLOAT32); product.addBand("B", ProductData.TYPE_FLOAT32); setTargetProduct(product); }
@Before public void setUp() throws Exception { result = new StringWriter(); final CsvProductWriterPlugIn plugIn = new CsvProductWriterPlugIn(result, CsvProductWriter.WRITE_FEATURES | CsvProductWriter.WRITE_PROPERTIES); writer = plugIn.createWriterInstance(); product = new Product("testProduct", "testType", 2, 3); fillBandDataFloat(product.addBand("radiance_1", ProductData.TYPE_FLOAT32), 0); fillBandDataFloat(product.addBand("radiance_2", ProductData.TYPE_FLOAT64), 10); fillBandDataInt(product.addBand("radiance_3", ProductData.TYPE_INT32), 100); writer.writeProductNodes(product, ""); }
@Override public void initialize() throws OperatorException { sourceBand = sourceProduct.getBand(bandName); targetProduct = new Product(sourceProduct.getName(), sourceProduct.getProductType(), sourceProduct.getSceneRasterWidth(), sourceProduct.getSceneRasterHeight()); targetBand = targetProduct.addBand(bandName, sourceBand.getDataType()); }
@Override public void initialize() { output = new Product("Op3Name", "Op3Type", RASTER_WIDTH, RASTER_HEIGHT); output.addBand(new Band("Op3A", ProductData.TYPE_INT8, RASTER_WIDTH, RASTER_HEIGHT)); output.addBand(new Band("Op3B", ProductData.TYPE_INT8, RASTER_WIDTH, RASTER_HEIGHT)); output.addBand(new Band("Op3C", ProductData.TYPE_INT8, RASTER_WIDTH, RASTER_HEIGHT)); output.addBand(new Band("Op3D", ProductData.TYPE_INT8, RASTER_WIDTH, RASTER_HEIGHT)); }
@Test public void testDeprecatedProperties() throws Exception { final Product product = new Product("n", "t", 1, 1); assertNull(instance.getPlacemarkGroup(product)); assertEquals("track_point", instance.getRoleName()); assertEquals("track point", instance.getRoleLabel()); assertNull(instance.getCursorImage()); assertNotNull(instance.getCursorHotSpot()); assertEquals(null, instance.getShowLayerCommandId()); }
@Test public void testDeprecatedProperties() throws Exception { final Product product = new Product("n", "t", 1, 1); assertSame(product.getGcpGroup(), instance.getPlacemarkGroup(product)); assertEquals("gcp", instance.getRoleName()); assertEquals("GCP", instance.getRoleLabel()); assertNull(instance.getCursorImage()); assertNotNull(instance.getCursorHotSpot()); assertEquals("showGcpOverlay", instance.getShowLayerCommandId()); }