The invention represents an improved method of measuring trenches on semiconductor wafers with optical spectroscopy. According to the described method, it is possible to characterize not only depth but also shape of the trench. The advancement is achieved by improved Effective Medium Approximation-based modeling of the optical response of trench structures.