A digital moiré fringe-scanning method for centering a circular fringe image is proposed. The image of a nondiffracting beam, whose cross section is a circular fringe, is first downloaded onto a computer. The image is then superposed with a digital circular grating, whose center is close to the center of the image, to generate circular moiré fringes. Changing the phase of a digital grating can cause moiré fringe scanning. The global center of the image can be calculated by use of sets of the scanned picture. Because all the image data are used for the calculation, the effect of random noise on centering is greatly reduced and the center position resolution can reach the order of a subelement of a CCD. The measurement of spatial straightness is discussed.