The influence of the created surface roughness on the coercivity of magnetic thin films has been investigated. The magnetic thin films (CoFe and alternatively NiFe) are sputtered on top of smooth substrates that were previously covered with an array of considerably rougher lines with one of these materials Pt, Cu, CoFe, and NiFe. The lines have been patterned using optical lithography into arrays that are deposited with different thicknesses varying between 5 nm-15 nm. The lines have been designed to have a very rough edge and seated in two different angles relative to the wafer edge (zero and 45 degrees). Magneto-optic Kerr effect (MOKE) measurements showed two distinct switching fields in the hysteresis loops that are due to magnetic domain wall trapping created by the surface roughness. The magnetization reversal showed a strong dependence on the height, the orientation angle, and the material's type of the created surface roughness (the lines).