Light emitting diodes become brighter because of the contribution of patterned sapphire substrates (PSS). The dimensions of PSS crucially affect its performance. The most suitable instrument to measure PSS is atomic force microscope, which provides three-dimensional surface profiles. This paper proposes an automatic method to analyze AFM-collected raw data and produce characteristic parameters of PSS, including height, diameters, pitch, and side angles. Experimental results show that this method has good repeatability of 1.2 and 6.3 nm on measuring height and bottom diameter, respectively. This nanometrology method will be extensively applicable for similar nanostructures with periodic patterns.