Optical resonances of gold nanoparticles on a gold surface: quantitative correlation of geometry and resonance wavelength