Topological phases in spin systems are exciting frontiers of research with intimate connections to quantum coding theory. However, there is a disconnection between quantum codes and the idea of topology, in the absence of geometry and physical realizability. Here, we introduce a toy model, in which quantum codes are constrained to not only have a local geometric description, but also have translation and scale symmetries. These additional physical constraints enable us to assign topologically invariant properties to geometric shapes of logical operators of the code. Topological phases of the model are analyzed by geometrically classifying logical operators. The classification scheme also has topologically universal properties which are invariant under local unitary transformations and local perturbations, and may explain how global symmetries of a system Hamiltonian give rise to topological phases in correlated spin systems.