Because of the environment of farmland is complex and its area is vast, wireless sensor network is used to monitor its environment. The purpose is to realize the accurate management of farmland and ensure the yield and quality of crops. In this paper, taking two parameters of the farmland environment and the position of nodes as an example, we put forward a spatial correlation clustering algorithm which based on hierarchical data. The method classify the data of multiple source sensors by according to the association strength of parameters of the farmland environment firstly. Then, take a clustering analysis based on spatial density for each class of data. This method ensure the consistency of data and temporal and spatial relevance. The experimental results has a better guidance role in the farmland.