A spatial information measurement method for classified raster data and related equipment
By measuring the similarity and diversity probability entropy in the pixel neighborhood space of classified raster data, the problem of being unable to effectively measure spatial information in existing technologies is solved, and a comprehensive information evaluation of classified raster data is achieved.
Patent Information
- Application Number
- CN202411846808.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-16
AI Technical Summary
Existing technologies are difficult to effectively measure the spatial information of classified raster data, especially because the spatial structure and combination relationship between pixel values are not fully considered, resulting in incompatibility between the calculation methods in the field of geographic information and the field of landscape ecology.
By obtaining the pixel neighborhood space of classified raster data, calculating the similarity between the neighborhood boundary of homogeneous pixels and the reference shape, measuring the spatial morphological information, and combining the diversity probability entropy of heterogeneous pixels, coupling the calculation of the spatial information amount of each pixel neighborhood space, and finally superimposing the spatial information measurement results of the study area.
It effectively measures the spatial information of classified raster data, takes into account the spatial structure information between pixel category code values, makes up for the shortcomings of existing technologies, and improves the objectivity and efficiency of data cognition.
Smart Images

Figure CN119760044B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of raster data processing, and in particular to a classification raster data spatial information measurement method and related equipment. Background Art
[0002] The measurement of information in geospatial data is a fundamental issue in geographic information theory, with important applications in data mining, data compression, and understanding data from the perspective of information richness. Raster data is a major type of geospatial data, encompassing numerous data products such as remote sensing imagery, digital elevation models (DEMs), and land cover. Effectively measuring its information content can describe data richness, providing a decision-making aid for spatial pattern analysis, readability evaluation, and data screening, thereby enhancing the objectivity and efficiency of data cognition.
[0003] Calculating the spatial information content of categorized raster data is currently common in the field of landscape ecology. Research in the field of geographic information primarily focuses on raster data with grayscale numerical variations, such as remote sensing imagery and DEMs. However, the pixel values of categorized raster data represent only semantic types, belonging to the category of nominal scales. The types lack the characteristics of ordinal or interval scales, making it difficult to measure information using numerical calculations. The calculation of landscape diversity indices and edge-based Boltzmann thermodynamic entropy in the field of landscape pattern does not rely on raster pixel values and can theoretically be transferred to categorized raster data. The main idea of the former is to calculate the pixel value components in raster data and combine them with the Shannon information entropy model to calculate the probabilistic entropy of each category code value. However, such methods only consider the category code component information of the data and ignore the spatial structure or combination relationship between the different category code values. In response to this, Cushman et al. proposed the latter method to measure the thermal entropy of the landscape pattern, that is, to measure the entropy of the landscape pattern by the number of edges caused by different pixel values in the classified raster data. However, diversity is encouraged in the research field of landscape ecology. The pixel pattern with more edges is considered to have better diversity and the lower its entropy value. This is inconsistent with the understanding of the richness of information in the field of geographic information, and the measurement conclusion is difficult to transfer to classified raster data such as surface cover.
[0004] In summary, the computational methods in the field of geographic information mostly use numerical calculations, which are not suitable for classified raster data. The computational methods of landscape ecology are difficult to transfer to classified raster data due to the different purposes and significance of the research fields. Summary of the Invention
[0005] The present invention provides a method for measuring spatial information of classified raster data and related equipment, the purpose of which is to effectively measure the spatial information of classified raster data.
[0006] In order to achieve the above object, the present invention provides a method for measuring spatial information of classified raster data, comprising:
[0007] Step 1: Obtain classified raster data of the study area. The classified raster data includes geographic spatial data of multiple pixels. Each pixel corresponds to a pixel neighborhood space, and each pixel neighborhood space includes homogeneous pixels and heterogeneous pixels.
[0008] Step 2: for each pixel neighborhood space, the boundaries of each homogeneous pixel in the pixel neighborhood space are sequentially connected to form the pixel neighborhood boundary, and a reference shape for measuring the pixel neighborhood space is selected;
[0009] Step 3: For each pixel neighborhood space, the similarity between the pixel neighborhood boundary and the reference shape is calculated. The similarity is used to measure the spatial morphological information of homogeneous pixels in the pixel neighborhood space.
[0010] Step 4: For each pixel neighborhood space, calculate the diversity probability entropy of each heterogeneous pixel in the pixel neighborhood space. The diversity probability entropy is used to measure the spatial structure information of the heterogeneous pixels in the pixel neighborhood space.
[0011] Step 5: For each pixel neighborhood space, the spatial morphological information of homogeneous pixels and the spatial structural information of heterogeneous pixels in the pixel neighborhood space are coupled and calculated to obtain the spatial information amount of each pixel neighborhood space. The spatial information amounts of all pixel neighborhood spaces are superimposed to obtain the spatial information measurement result of the study area.
[0012] More specifically, step 2 includes:
[0013] For each pixel neighborhood space, find homogeneous pixels based on the adjacency relationship of the central pixel in the pixel neighborhood space, and extract the neighborhood boundaries of all homogeneous pixels;
[0014] Connect the neighborhood boundaries of each homogeneous pixel in sequence to form the pixel neighborhood boundary;
[0015] Calculate the geometric center point and spatial area of each pixel neighborhood boundary respectively;
[0016] The reference shape of the neighborhood space of the metric pixel is selected based on the geometric center point and spatial area.
[0017] Specifically, the expression for calculating the degree of similarity between the pixel neighborhood boundary and the reference shape is:
[0018]
[0019] Among them, I Homogeneous Indicates the degree of similarity, A P∩S Represents the geometric intersection area between the pixel neighborhood boundary P and the reference shape S, A P∪S Represents the geometric union area between the cell neighborhood boundary P and the reference shape S.
[0020] Furthermore, the expression for calculating the diversity probability entropy of each heterogeneous pixel in the pixel neighborhood space is:
[0021]
[0022] Among them, I Heterogeneous pixels represents the diversity probability entropy, n represents the type of category encoding, m i represents the number of coded pixels of the i-th category, and N represents the number of heterogeneous pixels.
[0023] Furthermore, the spatial structure information of heterogeneous pixels includes category coding composition information and adjustment weights;
[0024] The category code composition information includes the number of category codes, the position relationship of category codes and the type of category codes;
[0025] The adjustment weight is a weight parameter for adjusting the spatial morphological information and the category coding component information.
[0026] Furthermore, the calculation expression for adjusting the weight is:
[0027]
[0028] Among them, w represents the adjustment weight, M represents the number of pixels in the pixel neighborhood space, and Z represents the number of homogeneous pixels.
[0029] More specifically, step 5 includes:
[0030] For each pixel neighborhood space, the adjustment weight is used as a coupling parameter, and the coupling parameter is used to couple the spatial morphological information and the transformed spatial structure information to obtain the spatial information amount of each pixel neighborhood space, which is:
[0031] I Neighborhood =log2(w×I Homogeneous )×I Heterogeneous pixels
[0032] Among them, I Neighborhood Represents the amount of spatial information in the pixel neighborhood space;
[0033] The spatial information of all pixel neighborhood spaces is superimposed to obtain the spatial information measurement result of the study area:
[0034]
[0035] Among them, I CGD Represents the spatial information measurement results of the study area, P represents the number of rows of classified raster data, Q represents the number of columns of classified raster data, and I Neighborhood-pq Represents the amount of spatial information in the neighborhood space of the pixel in the pth row and the qth column.
[0036] The present invention also provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for measuring spatial information of classified raster data is implemented.
[0037] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method for measuring spatial information of classified raster data is implemented.
[0038] The above solution of the present invention has the following beneficial effects:
[0039] Compared with the prior art, the present invention obtains classified raster data of geographic spatial data including multiple pixels, each pixel corresponds to a pixel neighborhood space including homogeneous pixels and heterogeneous pixels; the boundaries of each homogeneous pixel are sequentially connected to form a pixel neighborhood boundary, and a reference shape for measuring the pixel neighborhood space is selected; the spatial morphological information of the homogeneous pixel is measured by calculating the degree of similarity between the pixel neighborhood boundary and the reference shape; the spatial structural information of the heterogeneous pixel is measured by calculating the diversity probability entropy of each heterogeneous pixel in the pixel neighborhood space; the spatial morphological information of the homogeneous pixel and the spatial structural information of the heterogeneous pixel are coupled and calculated to obtain the spatial information amount of each pixel neighborhood space, and the spatial information amounts of all pixel neighborhood spaces are superimposed to obtain the spatial information measurement result of the study area, which effectively considers the spatial structural information between the pixel category code values, thereby effectively measuring the spatial information of the classified raster data and making up for the deficiency in the research on spatial information measurement of the classified raster data.
[0040] Other beneficial effects of the present invention will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a spatial structure diagram of pixels with the same total number of edges;
[0042] Figure 2 A schematic diagram of a flow chart of an embodiment of the present invention;
[0043] Figure 3 A schematic diagram of the pixel neighborhood boundary formed by the aggregation of homogeneous pixels in the neighborhood space;
[0044] Figure 4 Schematic diagram of similarity calculation in an embodiment of the present invention;
[0045] Figure 5 A line graph showing changes in the adjustment weight and the number of heterogeneous pixels in an embodiment of the present invention;
[0046] Figure 6 This is the intersection diagram of the information volume and the number of elements of the county boundary experimental sample of 30m surface cover data;
[0047] Figure 7 This is the intersection diagram of the information volume and the number of elements of the county boundary experimental sample of 10m surface cover data;
[0048] Figure 8 Schematic diagram of the structure of the terminal device in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] To make the technical problems, technical solutions, and advantages to be solved by the present invention more clear, the following is a detailed description with reference to the accompanying drawings and specific embodiments. It is obvious that the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0050] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0051] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood broadly. For example, they may refer to a locking connection, a detachable connection, or an integral connection; they may refer to a mechanical connection or an electrical connection; they may refer to a direct connection or an indirect connection through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0052] In addition, the technical features involved in different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0053] In view of the existing problems, the present invention provides a classification raster data spatial information measurement method and related equipment.
[0054] like Figure 2 As shown, an embodiment of the present invention provides a method for measuring spatial information of classified raster data, including:
[0055] Step 1: Obtain classified raster data of the study area. The classified raster data includes geographic spatial data of multiple pixels. Each pixel corresponds to a pixel neighborhood space, and each pixel neighborhood space includes homogeneous pixels and heterogeneous pixels.
[0056] Step 2: for each pixel neighborhood space, the boundaries of each homogeneous pixel in the pixel neighborhood space are sequentially connected to form the pixel neighborhood boundary, and a reference shape for measuring the pixel neighborhood space is selected;
[0057] Step 3: For each pixel neighborhood space, the similarity between the pixel neighborhood boundary and the reference shape is calculated. The similarity is used to measure the spatial morphological information of homogeneous pixels in the pixel neighborhood space.
[0058] Step 4: For each pixel neighborhood space, calculate the diversity probability entropy of each heterogeneous pixel in the pixel neighborhood space. The diversity probability entropy is used to measure the spatial structure information of the heterogeneous pixels in the pixel neighborhood space.
[0059] Step 5: For each pixel neighborhood space, the spatial morphological information of homogeneous pixels and the spatial structural information of heterogeneous pixels in the pixel neighborhood space are coupled and calculated to obtain the spatial information amount of each pixel neighborhood space. The spatial information amounts of all pixel neighborhood spaces are superimposed to obtain the spatial information measurement result of the study area.
[0060] In an embodiment of the present invention, for each pixel in the classified raster data, a zero-valued pixel is filled in the four directions of the pixel, namely, the top, bottom, left, and right, to ensure that the edge information of the data is effectively calculated. Then, for the filled pixel, the center pixel in the first row and first column in the upper left corner and its eight neighboring pixels are first extracted to form a pixel neighborhood space, thereby obtaining a pixel neighborhood space with the same number of pixels as the classified raster data.
[0061] Specifically, step 2 includes:
[0062] For each pixel neighborhood space, find homogeneous pixels based on the adjacency relationship of the central pixel in the pixel neighborhood space, and extract the neighborhood boundaries of all homogeneous pixels;
[0063] Connect the neighborhood boundaries of each homogeneous pixel in sequence to form the pixel neighborhood boundary;
[0064] Calculate the geometric center point and spatial area of each pixel neighborhood boundary respectively;
[0065] The reference shape of the neighborhood space of the metric pixel is selected based on the geometric center point and spatial area.
[0066] Since there are only qualitative differences between different pixels in classified raster data, the differences between pixels are mainly reflected in the pixel boundaries formed by pixel aggregation or dispersion. The internally aggregated pixels show homogeneity, and the boundaries of heterogeneous pixels are formed due to the difference in coding values between heterogeneous pixels. Therefore, the embodiment of the present invention uses the boundaries formed by the aggregation of homogeneous pixels in the pixel neighborhood space as the neighborhood boundaries, such as Figure 3 shown.
[0067] In visual cognition research, circles are considered the simplest shape. However, in classified raster data, which uses a regular grid as the basic unit, the expression of circles is more complex. Due to the influence of resolution, circles in raster data are not simple and uniform. In contrast, squares are also unique and consistent in shape and angle with the basic components of raster data and the neighborhood space. As a reference shape, they have a unified reference standard and are more suitable as a reference shape for measuring the neighborhood boundary spatial information of classified raster data pixels. Therefore, the reference shape used in the embodiments of the present invention is a square.
[0068] Based on the above analysis, an embodiment of the present invention selects the degree of similarity between the pixel neighborhood boundary and a square as a measure of the spatial morphological information of the classified raster data, where the square is a square of equal area that coincides with the center point of the pixel neighborhood boundary.
[0069] like Figure 4 As shown, the embodiment of the present invention takes a given 3×3 pixel neighborhood space as an example. First, homogeneous pixels are found based on the adjacency relationship of the central pixels in the pixel neighborhood space, such as Figure 4 (a); Then, the neighborhood boundaries of all extracted homogeneous pixels are connected to form the pixel neighborhood boundaries, as shown in Figure 4 (b) As shown; Secondly, calculate the geometric center point and spatial area of each pixel neighborhood boundary respectively, and select the reference shape as a square based on the center point and spatial area, as shown in Figure 4 (c) As shown; Finally, the two are overlaid and analyzed, and the similarity is calculated based on the quantitative relationship between the geometric intersection and the geometric union between the pixel neighborhood boundary and the square. The expression of the similarity is:
[0070]
[0071] Among them, I HomogeneousIndicates the degree of similarity, A P∩S Represents the geometric intersection area between the pixel neighborhood boundary P and the reference shape S, A P∪S Represents the geometric union area between the pixel neighborhood boundary P and the reference shape S, where the reference shape S is a square S.
[0072] Taking into account the two characteristics of information "existence" and "non-zero", the similarity degree is calculated by subtracting the ratio of the geometric intersection area and the geometric union area from 2, so that the similarity degree value of the square is 1; when the similarity degree is higher, the amount of spatial state information representing the homogeneous pixel is smaller, and vice versa, the amount of spatial state information representing the homogeneous pixel is larger.
[0073] In this embodiment of the present invention, the spatial adjacency relationships formed by heterogeneous pixels primarily express the category diversity information within the spatial structure, and are primarily determined by the number, positional relationship, and type of category codes. Because the number of category codes for heterogeneous pixels is generally affected by the number of homogeneous pixels, and their positions also depend on the spatial morphology of homogeneous pixels, the two adjacency relationships are highly correlated and inseparable. Therefore, this embodiment of the present invention defines the information expressed by the spatial adjacency relationships of pixels in classified raster data as the spatial structure information of heterogeneous pixels.
[0074] Specifically, the spatial structure information of heterogeneous pixels includes category coding composition information and adjustment weights;
[0075] The category code composition information includes the number of category codes, the position relationship of category codes and the type of category codes;
[0076] The adjustment weight is a weight parameter for adjusting the spatial morphological information and the category coding component information.
[0077] In the pixel neighborhood space, since the number of heterogeneous pixels and the number of homogeneous pixels are in a relationship of increase and decrease, the corresponding two types of information are highly correlated. The more spatial positions the heterogeneous pixels have in the pixel neighborhood space, the more diverse the spatial structure information that can be formed between the heterogeneous pixels will be. Conversely, the more homogeneous the category coding composition information in the pixel neighborhood space is, the less spatial state information that can be expressed will be relatively. Therefore, the embodiment of the present invention uses the number of occupants of heterogeneous pixels as the adjustment weight between the neighborhood space morphological information and the category coding composition information to express the quantitative relationship between the homogeneous pixel area and the heterogeneous pixel area. However, this weight is not directly determined by the number of spatial occupants, but by the spatial combination form that can be formed by the spatial occupants, that is: the maximum diversity probability entropy of different numbers of spatial occupants, that is, the calculation expression of the adjustment weight is:
[0078]
[0079] Among them, w represents the adjustment weight, M represents the number of pixels in the pixel neighborhood space, and Z represents the number of homogeneous pixels.
[0080] Based on the above formula, in a given 3×3 pixel neighborhood space, for central pixels with different spatial structure information, their adjustment weights increase nonlinearly with the increase of the number of heterogeneous pixels, and their changing rules are as follows: Figure 5 shown.
[0081] Most preferably, the embodiment of the present invention adopts the Shannon information entropy model to calculate the diversity probability entropy of each heterogeneous pixel in the pixel neighborhood space, and its expression is:
[0082]
[0083] Among them, I Heterogeneous pixels represents the diversity probability entropy, n represents the type of category encoding, m i represents the number of coded pixels of the i-th category, and N represents the number of heterogeneous pixels.
[0084] In an embodiment of the present invention, the larger the diversity probability entropy value, the more homogeneous the category coding composition information in the pixel neighborhood space is, and the larger the amount of spatial structure information of the heterogeneous pixel is. Conversely, the smaller the amount of spatial structure information of the heterogeneous pixel is.
[0085] Most preferably, before step 5, the method further comprises:
[0086] Performing maximum and minimum normalization transformation on the spatial structure information of heterogeneous pixels to obtain the transformed spatial structure information;
[0087] Adjust the value range of the adjustment weight to [0, 1].
[0088] In an embodiment of the present invention, taking into account the numerical impact that the adjustment weight may have on the eigenvalue, the value range of the adjustment weight should be maintained within the value range of [0, 1]; when there is only one heterogeneous pixel spatial position in the pixel domain space, the diversity probability entropy is 0, but due to the non-negativity and existence of information, when there is a neighborhood heterogeneous pixel, there is also spatial structure information, and thus the adjustment weight of the spatial structure information of the heterogeneous pixel should not be 0; therefore, the embodiment of the present invention performs maximum and minimum normalization transformation processing on the spatial structure information of the heterogeneous pixel to eliminate the phenomenon of uninformative measurement value generated by the value of 0, and at the same time adjusts the value range of the adjustment weight to between [0, 1] to take into account both the practical significance of the appearance of the value of 0 and the excessive impact of the adjustment weight.
[0089] Specifically, step 5 includes:
[0090] For each pixel neighborhood space, the adjustment weight is used as a coupling parameter, and the coupling parameter is used to couple the spatial morphological information and the transformed spatial structure information to obtain the spatial information amount of each pixel neighborhood space, which is:
[0091] I Neighborhood =log2(w×I Homogeneous )×I Heterogeneous pixels
[0092] Among them, I Neighborhood Represents the amount of spatial information in the pixel neighborhood space;
[0093] The spatial information of all pixel neighborhood spaces is superimposed to obtain the spatial information measurement result of the study area:
[0094]
[0095] Among them, I CGD Represents the spatial information measurement results of the study area, P represents the number of rows of classified raster data, Q represents the number of columns of classified raster data, and I Neighborhood-pq Represents the amount of spatial information in the neighborhood space of the pixel in the pth row and the qth column.
[0096] Since the fragmentation of raster data is an indicator of the diversity of spatial relationships between pixels, an increase in fragmentation will gradually transform the original continuous landscape elements into a mosaic of many isolated, discontinuous patches, resulting in a richer adjacency relationship between heterogeneous pixels. The spatial structure information of classified raster data should show a certain correlation with the degree of data fragmentation. Therefore, based on the above method, the embodiment of the present invention analyzes its relationship with the fragmentation of raster data through a set of experiments to verify the effectiveness and rationality of the method, as follows:
[0097] Determine the dataset: The experimental datasets include the UC Merced Land-Use scene annotation dataset, the artificial simulation dataset, the GlobeLand30 surface coverage dataset, and the Tsinghua University FROM-GLC10 surface coverage dataset;
[0098] Determine the experimental environment: The information quantity measurement program was written based on the Python 3.8 platform, and the map data was viewed and visualized using the Qgis 3.26 software platform. The experimental computing platform was a desktop computer with an Intel(R) Core(TM) i9-10900 core processor and an NVIDIA GeForce RTX 2060 graphics card.
[0099] Experimental results analysis:
[0100] (1) Correlation analysis between the spatial information content of classified raster data and the fragmentation of raster data
[0101] Experimental hypothesis: The spatial structure information of classified raster data is generally positively correlated with the fragmentation of raster data;
[0102] Experimental design: Two sets of land cover datasets were selected. The number of polygons in the corresponding land cover vector data was used as an indicator of fragmentation. The results were used to examine whether the amount of information calculated by the method provided by the embodiment of the present invention changes with the fragmentation of the classified raster data.
[0103] The experimental data were selected from the GlobalLand30 surface cover dataset, the Tsinghua University FROM-GLC10 surface cover dataset, and the corresponding land cover vector dataset. The surface cover vector dataset was obtained by data conversion of the surface cover dataset.
[0104] The county boundaries of a certain administrative division in Northwest China were selected as research units, and the land cover dataset was clipped into independent experimental samples with geometric boundary morphology.
[0105] The basic attribute characteristics of the experimental samples, such as the average element area, number of elements, and map size, are counted in the vector data, and the spatial information of the corresponding experimental samples is calculated in the surface cover dataset.
[0106] The experimental results are as follows: In the GlobalLand30 dataset with a resolution of 30m, the relationship between the information calculation results of 97 samples formed by county boundaries as the division unit and the number of features is as follows Figure 6 As shown;
[0107] In the 10m resolution FROM-GLC10 dataset, the relationship between the information amount calculation results and the number of features of 97 samples formed by county boundaries as the division unit is as follows: Figure 7 As shown;
[0108] Experimental analysis: combined Figure 6 and Figure 7 It can be seen from the scatter plot and density plot in FIG that the method provided by the embodiment of the present invention maintains a high correlation between the degree of fragmentation of the same raster data.
[0109] Compared with the prior art, the embodiment of the present invention obtains classified raster data of geographic spatial data including multiple pixels, each pixel corresponds to a pixel neighborhood space including homogeneous pixels and heterogeneous pixels; the boundaries of each homogeneous pixel are sequentially connected to form a pixel neighborhood boundary, and a reference shape for measuring the pixel neighborhood space is selected; the spatial morphological information of the homogeneous pixel is measured by calculating the degree of similarity between the pixel neighborhood boundary and the reference shape; the spatial structural information of the heterogeneous pixel is measured by calculating the diversity probability entropy of each heterogeneous pixel in the pixel neighborhood space; the spatial morphological information of the homogeneous pixel and the spatial structural information of the heterogeneous pixel are coupled and calculated to obtain the spatial information amount of each pixel neighborhood space, and the spatial information amounts of all pixel neighborhood spaces are superimposed to obtain the spatial information measurement result of the study area, which effectively considers the spatial structural information between the pixel category code values, thereby effectively measuring the spatial information of the classified raster data and making up for the shortcomings of the research on spatial information measurement of the classified raster data.
[0110] An embodiment of the present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for measuring spatial information of classified raster data is implemented.
[0111] like Figure 8 As shown, the embodiment of the present invention provides a terminal device D10 including: at least one processor D100 ( Figure 8 Only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100. When the processor D100 executes the computer program D102, the above-mentioned classified raster data spatial information measurement method is implemented.
[0112] The terminal device D10 can be a computing device such as a desktop computer, a notebook, a PDA, a server, a server cluster, a cloud server, etc. The terminal device may include, but is not limited to, a processor D100 and a memory D101. It will be understood by those skilled in the art that Figure 8 This is merely an example of the terminal device D10 and does not constitute a limitation on the terminal device D10 . The terminal device D10 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device D10 may also include input and output devices, network access devices, etc.
[0113] The processor D100 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0114] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart memory card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card, etc. equipped on the terminal device D10. Furthermore, the memory D101 may also include both an internal storage unit of the terminal device D10 and an external storage device. The memory D101 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory D101 may also be used to temporarily store data that has been output or is to be output.
[0115] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0116] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0117] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method for measuring spatial information of classified raster data is implemented.
[0118] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned method embodiment, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may at least include: any entity or device capable of carrying the computer program code to a construction device / terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk, etc.
[0119] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for measuring spatial information of classified raster data, characterized in that: include: Step 1: Obtain classified raster data of a study area, wherein the classified raster data includes geographic spatial data of a plurality of pixels, each pixel corresponds to a pixel neighborhood space, and each pixel neighborhood space includes homogeneous pixels and heterogeneous pixels; Step 2: for each pixel neighborhood space, sequentially connect the boundaries of each homogeneous pixel in the pixel neighborhood space to form a pixel neighborhood boundary, and select a reference shape for measuring the pixel neighborhood space; Step 3: calculating the degree of similarity between the pixel neighborhood boundary and the reference shape for each pixel neighborhood space, wherein the degree of similarity is used to measure the spatial morphological information of homogeneous pixels in the pixel neighborhood space; Step 4, respectively calculating, for each pixel neighborhood space, the diversity probability entropy of each heterogeneous pixel in the pixel neighborhood space, wherein the diversity probability entropy is used to measure the spatial structure information of the heterogeneous pixels in the pixel neighborhood space; Step 5: For each of the pixel neighborhood spaces, the spatial morphological information of the homogeneous pixels and the spatial structural information of the heterogeneous pixels in the pixel neighborhood space are coupled and calculated to obtain the spatial information amount of each pixel neighborhood space, and the spatial information amounts of all pixel neighborhood spaces are superimposed to obtain the spatial information measurement result of the study area.
2. The method for measuring spatial information of classified raster data according to claim 1, characterized in that: The step 2 includes: For each of the pixel neighborhood spaces, respectively, homogeneous pixels are found based on the adjacency relationship of the central pixels in the pixel neighborhood space, and the neighborhood boundaries of all homogeneous pixels are extracted; Connect the neighborhood boundaries of each homogeneous pixel in sequence to form the pixel neighborhood boundary; Calculate the geometric center point and spatial area of each pixel neighborhood boundary respectively; A reference shape for measuring the pixel neighborhood space is selected based on the geometric center point and the spatial area.
3. The method for measuring spatial information of classified raster data according to claim 2, characterized in that: The expression for calculating the degree of similarity between the pixel neighborhood boundary and the reference shape is: Among them, I Homogeneous Indicates the degree of similarity, A P∩S Represents the geometric intersection area between the pixel neighborhood boundary P and the reference shape S, A P∪S Represents the geometric union area between the cell neighborhood boundary P and the reference shape S.
4. The method for measuring spatial information of classified raster data according to claim 3, characterized in that: The expression for calculating the diversity probability entropy of each heterogeneous pixel in the pixel neighborhood space is: Among them, I Heterogeneous pixels represents the diversity probability entropy, n represents the type of category encoding, m i represents the number of coded pixels of the i-th category, and N represents the number of heterogeneous pixels.
5. The method for measuring spatial information of classified raster data according to claim 4, characterized in that: The spatial structure information of the heterogeneous pixels includes category coding composition information and adjustment weights; The category code composition information includes the number of category codes, the position relationship of the category codes and the type of category codes; The adjustment weight is a weight parameter for adjusting the spatial morphology information and the category coding composition information.
6. The method for measuring spatial information of classified raster data according to claim 5, characterized in that: The calculation expression of the adjustment weight is: Among them, w represents the adjustment weight, M represents the number of pixels in the pixel neighborhood space, and Z represents the number of homogeneous pixels.
7. The method for measuring spatial information of classified raster data according to claim 6, characterized in that: Before step 5, also include: Performing maximum and minimum normalization transformation processing on the spatial structure information of the heterogeneous pixels to obtain transformed spatial structure information; The value range of the adjustment weight is adjusted to between [0, 1].
8. The method for measuring spatial information of classified raster data according to claim 7, characterized in that: The step 5 comprises: For each of the pixel neighborhood spaces, the adjustment weight is used as a coupling parameter, and the spatial morphological information and the transformed spatial structure information are coupled and calculated using the coupling parameter to obtain the spatial information amount of each pixel neighborhood space, which is: I Neighborhood =log2(w×I Homogeneous )×I Heterogeneous pixels Among them, I Neighborhood Represents the amount of spatial information in the pixel neighborhood space; The spatial information of all pixel neighborhood spaces is superimposed to obtain the spatial information measurement result of the study area: Among them, I CGD Represents the spatial information measurement results of the study area, P represents the number of rows of classified raster data, Q represents the number of columns of classified raster data, and I Neighborhood-pq Represents the amount of spatial information in the neighborhood space of the pixel in the pth row and the qth column.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for measuring spatial information of classified raster data according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for measuring spatial information of classified raster data according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Spatial heterogeneity mode recognition method and layering method based on grids
CN101308544A
Optimum segmentation dimension determining method for remotely-sensed image land cover classification
CN104881677A