@Override public void exitBandSpecifier(BandSpecifierContext ctx) { Expression e = getAsType(ctx.expression(), Expression.class); set(ctx, new Band(e)); }
@Override public void exitBandSpecifier(BandSpecifierContext ctx) { Expression e = getAsType(ctx.expression(), Expression.class); set(ctx, new Band(e)); }
@Test public void bandWithIntLiteral() throws Exception { Band b = new Band( new IntLiteral("1") ); assertThat( b.toString(), is("1") ); }
@Test public void ndvi_s2() throws Exception { Set<GetSourceValue> sourcePositions = getSourcePositions("ndvi_s2.jfl", "src"); assertThat(sourcePositions, hasSize(2)); assertThat( sourcePositions, hasItems( new GetSourceValue( "src", new ImagePos(new Band(new IntLiteral("7")), Pixel.DEFAULT)))); assertThat( sourcePositions, hasItems( new GetSourceValue( "src", new ImagePos(new Band(new IntLiteral("3")), Pixel.DEFAULT)))); }