The amount of new objects detected by modern astronomical instruments and methods makes proper classification of single objects very hard.
Automatic classification lacks either robustness or speed.
In this paper we give an introduction of the kNN-method and the enhancements to the basic algorithm. Comparisions between the enhanced and the basic algorithm and an implementation of the X-tree is shown. In the last part we present some results from a test application of this algorithm to carry out a spectral classification of stars in the Hipparcos and Tycho catalogs based on the photometric parameters contained in those catalogs.