A method for determining a polishing endpoint includes obtaining spectra
from different zones on a substrate during different times in a polishing
sequence, matching the spectra with indexes in a library and using the
indexes to determining a polishing rate for each of the different zones
from the indexes. An adjusted polishing rate can be determined for one of
the zones, which causes the substrate to have a desired profile when the
polishing end time is reached.