private static int prefixScan(int tx) {
    tx = (tx >>> 8) ^ tx;
    tx = (tx >>> 4) ^ tx;
    tx = (tx >>> 2) ^ tx;
    tx = (tx >>> 1) ^ tx;
    return tx;
  }
Fast hilbert space-filling curve implementation ported from C++
<a href="https://github.com/rawrunprotected/hilbert_curves">github.com/rawrunprotected/hilbert_curves</a> by
<a href="https://threadlocalmutex.com/">threadlocalmutex.com</a> (public domain).
planetiler-core/src/main/java/com/onthegomap/planetiler/util/Hilbert.java