In inspection and workpiece localization, sampling point data is an important issue. Since the devices for sampling only sample discrete points, not the completely surface, sampling size and location of the points will be taken into consideration. In this paper a method is presented for determining the sampled points size and location for achieving efficient sampling. Firstly, uncertainty analysis of the localization parameters is investigated. A localization uncertainty model is developed to predict the uncertainty of the localization process. Using this model the minimum size of the sampled points is predicted. Secondly, based on the algebra theory an eigenvalue-optimal optimization is proposed. Then a freeform surface is used in the simulation. The proposed optimization is implemented. The simulation result shows its effectivity.