Characterization of topological phases in the compass ladder model