Due to the complexity of the interactions among the nodes of the complex networks, the properties of the network modules, to a large extent, remain unknown or unexplored. In this paper, we introduce the spatial correlation function Grs to describe the correlations among the modules of the weighted networks. In order to test the proposed method, we use our method to analyze and discuss the modular structures of the ER random networks, scale-free networks and the Chinese railway network. Rigorous analysis of the existing data shows that the spatial correlation function Grs is suitable for describing the correlations among different network modules. Remarkably, we find that different networks display different correlations, especially, the correlation function Grs with different networks meets different degree distribution, such as the linear and exponential distributions.