@Override
    public boolean load() {
        if (null != heightData) {
            unloadHeightMap();
        }


        heightData = new float[size * size];


        float[] temp1 = map1.getHeightMap();
        float[] temp2 = map2.getHeightMap();


        if (mode == ADDITION) {
            for (int i = 0; i < size; i++) {
                for (int j = 0; j < size; j++) {
                    heightData[i + (j * size)] =
                            (int) (temp1[i + (j * size)] * factor1
                            + temp2[i + (j * size)] * factor2);
                }
            }
        } else if (mode == SUBTRACTION) {
            for (int i = 0; i < size; i++) {
                for (int j = 0; j < size; j++) {
                    heightData[i + (j * size)] =
                            (int) (temp1[i + (j * size)] * factor1
                            - temp2[i + (j * size)] * factor2);
                }
            }
        }


        logger.fine("Created heightmap using Combiner");


        return true;
    }
<code>load</code> builds a new heightmap based on the combination of
two other heightmaps. The conditions of the combiner determine the
final outcome of the heightmap.

@return boolean if the heightmap was successfully created.
jme3-terrain/src/main/java/com/jme3/terrain/heightmap/CombinerHeightMap.java