public Vector2f getTex(float x, float z, Vector2f store) {
        if (x < 0 || z < 0 || x >= size || z >= size) {
            store.set(Vector2f.ZERO);
            return store;
        }
        int idx = (int) (z * size + x);
        return store.set(getMesh().getFloatBuffer(Type.TexCoord).get(idx*2),
                         getMesh().getFloatBuffer(Type.TexCoord).get(idx*2+1) );
    }
The maximum lod supported by this terrain patch.
If the patch size is 32 then the returned value would be log2(32)-2 = 3
You can then use that value, 3, to see how many times you can divide 32 by 2
before the terrain gets too un-detailed (can't stitch it any further).
@return the maximum LOD
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/TerrainPatch.java