Move is_hexgonal check into lattice.