Detecting topological transitions in two dimensions by Hamiltonian evolution