1. A method comprising: using a scanning interferometry system to generate a sequence of phase-shifted interferometry images at different scan positions of an object comprising a buried surface; identifying a scan position corresponding to a position of best focus for the buried surface in the interferometry system based on information about the object, wherein identifying the scan position comprises determining information related to a difference between a physical thickness and an optical thickness of a material on the buried surface; generating a surface height profile of the buried surface at the scan position corresponding to the position of best focus based on the sequence of phase shifted images; obtaining, based on the surface height profile, a lateral metrology image at the scan position corresponding to the position of best focus; and determining lateral metrology information about the buried surface from the lateral metrology image.