Wireless sensor network is becoming increasingly important in applications such as environmental monitoring and traffic control. They collect a large amount of sensor data, e.g., temperature and pressure. Nearby sensor nodes monitoring an environmental feature typically measure correlated values. In this paper, we propose a new location-aware-based data clustering (LABDC) algorithm to analyze the spatial correlation of sensor data. LABDC is a lossy mechanism that reduces the number of transmissions and provides approximate query results to users. Without using real-time sensor data, LABDC performs data clustering tasks based on the user-provided error-tolerance threshold and the sensor data dissimilarity matrix. Subsequently, only one node per cluster is selected as the clusterhead by maximal remainder energy. Mobile agent collects data of clusterheads. Mathematical models and simulations are used to evaluate the energy efficiency and correctness of LABDC. Extensive experiments show that LABDC largely reduces transmission costs compared to other data clustering algorithms.