Many applications require the management of spatial data in very large spatial databases. We propose a grid-based clustering algorithm to process spatial data. This algorithm uses a grid-based method to identify data that are compressible and data that must be maintained in memory. Thus the algorithm compresses data without decreasing the quality of clustering. Through one scan over a database, our algorithm can obtain accurate clustering results with limited memory. The performance study on very large datasets demonstrates the effectiveness and efficiency of our algorithm