Geospatial databases often contain erroneous measurements. For some such databases such as gravity databases, the known methods of detecting erroneous measurements -- based on regression analysis -- do not work well. As a result, to clean such databases, experts use manual methods which are very time-consuming. In this paper, we propose a (natural) "localized" version of regression analysis as a technique for automatic cleaning. We illustrate the efficiency of this technique on the example of the gravity database.