public long encode(int x, int y) {
        int EIGHTBITMASK = 0xff;
        return (MortonTable256[(y >> 8) & EIGHTBITMASK] << 17
                | MortonTable256[(x >> 8) & EIGHTBITMASK] << 16
                | MortonTable256[y & EIGHTBITMASK] << 1
                | MortonTable256[x & EIGHTBITMASK]);
    }
@Test
    public void testEncode() {
        SpatialKeyAlgo algo = new SpatialKeyAlgo(32, new BBox(-180, 180, -90, 90));
        long val = algo.encodeLatLon(-24.235345f, 47.234234f);
        assertEquals("01100110101000111100000110010100", BitUtil.LITTLE.toLastBitString(val, 32));
    }