question: protected boolean isEmpty ( ByteBuffer bbuf ) { switch ( layerType ) { case none : case footprint : case viewshed : case derivative : break ; case elevation : case field : FloatBuffer fbuf = bbuf . asFloatBuffer ( ) ; int fl = fbuf . limit ( ) ; for ( int i = 0 ; i < fl ; ++ i ) { if ( ! Float . isNaN ( fbuf . get ( i ) ) ) { return ( false ) ; } } break ; case colorimage : IntBuffer ibuf = bbuf . asIntBuffer ( ) ; int il = ibuf . limit ( ) ; for ( int i = 0 ; i < il ; ++ i ) { if ( ibuf . get ( i ) != 0 ) { return ( false ) ; } } break ; case grayimage : int bl = bbuf . limit ( ) ; for ( int i = 0 ; i < bl ; ++ i ) { if ( bbuf . get ( i ) != 0 ) { return ( false ) ; } } break ; } return ( true ) ; }
target:  Determine if a tile is empty