# An Approach for a Spatial Data Attribute Similarity Measure Based on Granular Computing Closeness
## 2 Prerequisite Knowledge  
The similarity measure is the degree of closeness between two things. The closer the two things are, the larger their similarity measure value is, while the more distant the two things are, the smaller their similarity measure value is [28]. There are many different methods for measuring similarity, and they are generally selected according to actual problems. Common similarity measures have correlation coefficients and similarity coefficients. The correlation coefficient is used to measure the closeness between variables (e.g., the relationship between various counties' GDPs, population densities and other indexes within a provincial administrative division). Obviously, when calculating the correlation coefficient of two indexes, each index has the same number of samples. To measure the proximity between spatial entity samples, similarity coefficients should be used, such as the measure between economic (GDP) and social (population density) indexes between different land types. The similarity coefficient is a quantitative description of the similarity between classification units, so the degree of similarity between these things must be described by quantitative methods. Things often need to be characterized by multiple variables. For example, in Figure 1 there are nine land units divided into \(\mathbf{P}\) and \(\mathbf{Q}\) land types, each with a population density (represented by R, where R1 and R2 represent two values of population density) and GDP (represented by G, where G1 and G2 represent two values of GDP). How to measure the similarity of land use indexes between the \(\mathbf{P}\) and \(\mathbf{Q}\) land types in this region requires the introduction of similarity measure methods. The general similarity is measured based on different distances. The distance measure has a distance based on continuous index data, and there is also a set distance based on discrete data. Spatial entity attribute index discrete values are used, and a set distance is used in this study. Let \(X=\{x_{1},x_{2},\cdots,x_{n}\}\) be a universe with two sets, \(\mathbf{P}\) and \(\mathbf{Q}\), \(P,Q\in F(X)\). The distance measure between the sets \(\mathbf{P}\) and \(\mathbf{Q}\) is defined by the following formula [29]:  
\[D(P,Q)=1-\frac{|P\cap Q|}{|P\cup Q|} \tag{1}\]  
The set distance reflects the degree of difference between the two sets. When \(P\
eq Q\) and \(P\cap Q=\Phi\), the difference between the sets \(\mathbf{P}\) and \(\mathbf{Q}\) is the largest, and the sets \(\mathbf{P}\) and \(\mathbf{Q}\) are completely different. Conversely, if \(P=Q\), the sets P and \(\mathbf{Q}\) are completely similar. The distance of the sets reflects the degree of difference between the sets caused by different relationships in the same universe. The distance formula shows that the fewer elements there are in the two sets of common intersections, the larger the distance is, while the more intersecting elements there are, the smaller the distance is. The \(\mathbf{P}\) and \(\mathbf{Q}\) land types represent two types of sets as in Figure 1, where \(\mathbf{P}\) contains land units {1,2,5,7,8} and \(\mathbf{Q}\) contains land units {3,4,6,9}. Similarly, the population density indicator also has two sets, R1 {1,4,6,7} and R2 {2,3,5,8,9}, and the GDP indicator has two sets, G1 {1,5,7} and G2 {2,3,4,6,8,9}, so that  
Figure 1: Spatial entity set distance solution process diagram. different land types composed of each land unit can be obtained, and different measure sets can be obtained. For example, the first unit is \(\mathbf{P}\) [R1,G2], which means that its land type is \(\mathbf{P}\), the population density index is R1, the GDP index is G2, and it is the same as the seventh land unit belonging to the set \(\mathbf{P}\) and \(\mathbf{Q}\) as the public part of the two indicators, \(P\cap Q\).