We present a method to measure the viscosity of polymer thin films. The material is spin coated onto a silicon substrate and specially designed nanopatterns are imprinted on the film using thermal nanoimprint. A brief reflow is performed during which patterns flow under surface tension. Spectral densities of the topology before and after annealing are compared and the rheologic properties, such as viscosity, are extracted as fitting parameters of an evolution model. Contrary to previous similar approaches, emphasis was put on the spatial description rather than the temporal decay of the patterns. We used this method to measure the viscosity of polystyrene for two molecular weights at various temperatures and successfully recovered results of previous authors.