Automatic checking method for consistency between text indicators of territorial space planning and GIS data
By constructing a semantic mapping library and using tolerance comparison technology, the problems of low efficiency, error-proneness, and delayed results in the verification of planning texts and GIS data in territorial spatial planning have been solved, realizing an automated and accurate verification process and improving the quality and efficiency of territorial spatial planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YUNNAN DESIGN INST GRP CO LTD
- Filing Date
- 2026-04-22
- Publication Date
- 2026-07-31
AI Technical Summary
In territorial spatial planning, existing technologies suffer from low efficiency, error-proneness, difficulty in bridging the semantic and dimensional gaps, delayed feedback, and poor robustness, making it difficult to verify binding indicators.
A rule-driven approach is used to build a semantic mapping library, which enables automatic alignment and unit conversion between planning text and GIS data. Real-time alerts and verification reports are provided through tolerance comparison and graphical feedback.
It has achieved automation, precision, and efficiency in the verification of binding indicators, reduced the missed detection rate, improved verification efficiency and accuracy, simplified the operation process, and supported the planning needs of different regions.
Smart Images

Figure CN122491249A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of land spatial planning data processing, computer information processing, natural language processing, and geographic information systems, specifically a method for automatically verifying the consistency between land spatial planning text indicators and GIS data. It is applicable to the consistency verification of binding indicators throughout the entire process of land spatial planning preparation, review, and implementation supervision, providing technical support for planning approval. Background Technology
[0002] Throughout the entire process of compiling, reviewing, and supervising the implementation of territorial spatial planning, the consistency of binding indicators is a core quality requirement. The legally mandated indicators (such as the area of ecological protection red lines, the area of permanent basic farmland protection, and the area of urban development boundaries) explicitly stated in the planning text (unstructured Word document) must be completely consistent with the statistical values of the vector layers in the territorial spatial information platform's GIS database. This is a necessary condition for the planning approval.
[0003] Currently, the industry generally uses the manual visual comparison method: the reviewers first search for the indicator values one by one in the Word document, then manually open GIS software such as ArcMap / ArcGIS Pro, locate the corresponding vector layer, open the attribute table to perform the statistical function, mentally calculate or use a calculator to complete the unit conversion, and then manually compare whether the two are consistent.
[0004] Existing technologies have significant drawbacks: First, they are extremely inefficient and prone to errors. A single planning project typically contains hundreds of binding indicators, and repetitive manual operations can easily lead to visual fatigue, resulting in missed detections and misjudgments. Furthermore, checking a single indicator can take several minutes. Second, the semantic and dimensional gaps are difficult to bridge. There are encoding differences between the natural language descriptions in the text and the physical field names in the GIS database. In addition, the default unit for GIS fields is often square meters, while planning texts commonly use square kilometers and acres, making manual conversion prone to errors of orders of magnitude. Third, the feedback of results is delayed and not intuitive. After problems are discovered manually, they must be recorded manually. It is impossible to automatically mark abnormal locations or provide real-time alerts, which seriously affects the efficiency of the review. Fourth, they have poor robustness and cannot handle non-standard expressions such as abbreviations and typos in the text, which can easily lead to missed detections of indicators.
[0005] To address the aforementioned shortcomings, it is necessary to construct an integrated verification method that can automatically align, convert, compare, and provide real-time alerts between planning texts and GIS data. This would overcome the limitations of traditional manual verification, improve verification efficiency and accuracy, and support the high-quality development of territorial spatial planning. Summary of the Invention
[0006] This invention addresses the shortcomings of existing technologies by providing an automatic cross-modal data verification method. It solves four core technical problems when comparing unstructured planning text with structured GIS spatial data: semantic alignment difficulties, error-prone unit conversion, low verification efficiency, and delayed result feedback. This method automates, improves the accuracy, and increases the efficiency of constraint indicator verification.
[0007] This invention proposes an automated verification process integrating rule-driven approach, spatial measurement, semantic alignment, and tolerance comparison. By constructing a semantic mapping library between planning terms and GIS layers, it achieves automatic extraction and structuring of text indicators. Combined with automatic statistics and unit normalization of GIS spatial data, it ultimately completes numerical comparison based on configurable tolerances and provides real-time alerts through a graphical interface. The specific technical steps are as follows: S1. Structural decomposition and interpretation of planning text indicators; S2, GIS spatial data attribute domain mapping and normalization; S3. Comparison and graphical feedback based on numerical tolerance; The structured decomposition of the S1 planning text indicators: Construct a semantic mapping library, use improved regular expressions to extract complete triplets of "indicator name + constraint prefix + value + unit" from the planning text, and generate the first verification code containing layer code and retained precision value, providing a unified format basis for subsequent comparison; The S2GIS spatial data attribute domain mapping and normalization: By connecting to the Geodatabase through the spatial data engine, the target feature class is automatically traversed and the specified area field value is accumulated to complete the unit normalization and coordinate system projection transformation, and a second code to be verified containing the same layer code and the normalized value is generated. The S3 method, based on numerical tolerance, provides comparison and graphical feedback: it extracts the numerical portions of the first and second codes to be verified, performs a fuzzy comparison using a configurable tolerance threshold (default 0.01 square kilometers), considers rounding differences in planning texts to improve system robustness; if the difference exceeds the tolerance threshold, it immediately calls the system GUI interface to generate a modal dialog box, highlighting the difference information (including indicator name, text extraction value, GIS calculated value, difference, and tolerance threshold) and suspending the verification process, achieving system-level mandatory alarms to ensure that reviewers can promptly detect anomalies; regardless of whether the comparison results are consistent, a complete verification report and error log are automatically generated, facilitating problem location, rectification tracking, and result traceability.
[0008] Preferably, the semantic mapping library in step S1 is in JSON format, establishing a one-to-one correspondence between planning terms and GIS layer codes, area fields, and default units, and supporting flexible expansion according to local planning standards.
[0009] Preferably, the constraint prefix in step S1 includes "not less than", "not less than", "not more than", and "is", which are used to determine whether the indicator is a lower limit value, an upper limit value, or a precise value; the regular expression supports arbitrary space matching between the constraint prefix and the indicator value or unit.
[0010] Preferably, the spatial data engine in step S2 is ArcPy or SuperMap Objects; it connects to the Geodatabase, automatically traverses the target feature class, accumulates the specified area field value, and completes the area statistics of the GIS data; it calls a general unit conversion function to automatically convert the default unit of the GIS data (such as square meters) to a standard unit (such as square kilometers, mu) consistent with the text, completely avoiding manual conversion errors; if the feature class coordinate system is a geographic coordinate system (such as WGS84), it needs to first perform a projection conversion to an equal-area projection coordinate system (such as Albers) to ensure the accuracy of area measurement; it generates a second code to be verified containing the same layer code and normalized values to ensure the format consistency with the first code to be verified, which facilitates subsequent numerical comparison.
[0011] Preferably, the unit normalization in S2 is achieved through a general unit conversion function, supporting automatic conversion between square meters, mu, hectares, and square kilometers, and uniformly converting them into standard units consistent with the planning text.
[0012] Preferably, step S1 further includes a fuzzy semantic matching module, which uses Levenshtein edit distance to match abbreviated and misspelled terms in the planning text with standard terms in the semantic mapping library. First, the extracted terms are precisely matched. If the matching fails, fuzzy matching is performed. The similarity between the extracted terms and the standard terms in the mapping library is calculated. When the similarity exceeds a set threshold (0.6 to 0.8), it is automatically associated with the correct layer code to avoid missed detection and solve the problem of missed detection caused by abbreviated and misspelled terms in the text.
[0013] Preferably, the modal pop-up alarm in step S3 is a system-level forced alarm that seizes the focus of operation, explicitly displays the indicator name, text extraction value, GIS calculated value, difference and tolerance threshold information, and suspends the verification process until the user confirms.
[0014] Preferably, this method can be encapsulated as a RESTful API interface, suitable for a B / S architecture-based land spatial planning "one map" implementation supervision information system. In actual deployment, the GDB path is read through the server-side configuration file and is not directly exposed in the API parameters to ensure data security. The API request parameters include base64 encoded Word document content, the server-side Geodatabase storage path, and tolerance thresholds. The response results include the total number of checks, the number of passes, the number of failures, the number of errors, and detailed check information for each indicator. After receiving the response, the front-end displays the details of the abnormal indicators and handling suggestions through a pop-up overlay, realizing cross-platform passive alerts.
[0015] Compared with the prior art, the beneficial effects of the present invention are: By using an extensible JSON-format semantic mapping library, a one-to-one correspondence is established between planning natural language terms and GIS layer codes, area fields, and default units, solving the encoding difference problem between natural language descriptions and database physical fields, and achieving accurate association between text and GIS data.
[0016] The design incorporates a universal unit conversion function that supports automatic conversion of all commonly used planning units, such as square meters, mu (a Chinese unit of area), hectares, and square kilometers. It also combines coordinate system projection transformation to ensure the accuracy of area measurement and completely avoids orders of magnitude errors caused by manual conversion.
[0017] Considering the differences in rounding expressions in planning texts, a configurable tolerance threshold is used for numerical comparison instead of strict string comparison, which improves the system's adaptability to non-standard expressions and enhances its robustness.
[0018] By using system-level modal pop-ups to seize the focus of operations, it enables passive perception and forced feedback of abnormal information, eliminating the need for users to actively initiate queries and solving the problem of delayed feedback of traditional manual verification results.
[0019] The Levenshtein edit distance algorithm is used to process text abbreviations and typos, and automatically associates them with standard terms to further reduce the false negative rate and improve the system's ability to adapt to non-standard text.
[0020] This invention reduces the verification time for a single indicator from minutes to milliseconds, and the verification of hundreds of indicators can be completed within 1 second, improving efficiency by more than a thousand times. It significantly reduces repetitive work for reviewers, shortens the planning review cycle, and improves efficiency significantly.
[0021] By using automatic semantic alignment, automatic unit conversion, and tolerance-based fuzzy comparison, the system completely eliminates orders-of-magnitude errors caused by manual mental calculation and unit conversion, reducing the false judgment rate to 0 and ensuring the accuracy of the verification results.
[0022] No professional GIS skills are required; ordinary planning personnel can complete the entire verification process, which lowers the technical threshold for planning review, increases the accessibility of verification work, and reduces the operational threshold.
[0023] The semantic mapping library can be flexibly expanded according to local planning standards, supporting all quantifiable binding indicators and adapting to the verification needs of different regions and types of territorial spatial planning.
[0024] The system automatically generates standardized verification reports and error logs, recording in detail the verification results, difference information, and reasons for anomalies for each indicator. This facilitates problem identification, rectification tracking, and accountability, thereby improving the standardization of planning reviews.
[0025] It can be deployed as a desktop standalone system or encapsulated as a web API interface, adapting to various application scenarios such as standalone verification and cross-platform collaborative verification, and meeting the needs of different planning review modes. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the overall structure and installation of the present invention. Detailed Implementation
[0027] The present invention will be further described below with reference to the accompanying drawings in the embodiments of the present invention.
[0028] This embodiment is applicable to standalone verification scenarios under the Windows operating system environment. It is developed using the Python language and relies on standard libraries such as ArcPy, python-docx, and tkinter. The specific implementation steps are as follows: Step 1: Build an indicator semantic mapping library Create a JSON-formatted configuration file named indicator_mapping.json to store the mapping between planning terms and GIS layers. This file supports flexible expansion. An example is shown below: json { "Area of ecological protection red line": { "gis_layer": "STBHHX", "area_field": "Shape_Area", "default_unit": "square meters" }, "Permanent basic farmland protection area": { "gis_layer": "YJJBNT", "area_field": "MJ", "default_unit": "mu"}, "Urban development boundary area": { "gis_layer": "CZKFBJ", "area_field": "Area_KM", "default_unit": "square kilometers" } } Step 2: Structural decomposition and interpretation of planning text indicators: The python-docx library is used to read Word planning documents. An improved regular expression is employed to extract indicator triples, supporting constraint prefixes such as "not less than," "not less than," "not exceeding," and "is," as well as matching any spaces. A semantic mapping library is loaded, and the extracted terms are first subjected to exact matching. If a match fails, fuzzy semantic matching is performed (with a threshold set to 0.7). The correct layer information is then associated to generate the first verification code. The core code logic is as follows: 1) Read Word documents and extract text content, eliminating document formatting interference; 2) Use the regular expression r"([\u4e00-\u9fa5]+area)(?:not less than|not less than|not more than|is)?\s*(\d+(?:\.\d+)?)\s*(square kilometers|hectares|mu|square meters)" to extract indicator triplets; 3) Fuzzy matching functions (based on Levenshtein edit distance) are used to handle abbreviations and misspelled terms to ensure accurate association between terms and the mapping library; 4) Keep the index value to two decimal places and combine it with the layer code to generate the first code to be verified (e.g., "STBHHX100.50").
[0029] Step 3: Attribute extraction and unit normalization of GIS spatial data Connecting to the Geodatabase via ArcPy involves configuring the workspace path, traversing the target feature classes, and checking for the existence of layers and area fields to avoid errors. Area field values are accumulated; if the feature class uses a geographic coordinate system (such as WGS84), it is first projected to the Albers equal-area projection coordinate system. A general unit conversion function is then called to convert the default units of the GIS data to standard units consistent with the text, generating a second verification code. The unit conversion function supports automatic conversion between square meters, mu, hectares, and square kilometers, with the core conversion relationship being: 1 square kilometer = 100 hectares = 1500 mu = 10 6 square meters.
[0030] Step 4: Encode Comparison and Graphical Alarm The tolerance threshold is configured to be 0.01 square kilometers. Numerical portions are extracted from the two codes to be verified, and the difference is calculated. If the difference exceeds the tolerance threshold, a system-level modal pop-up is generated using the tkinter library to explicitly display the anomaly information and pause the verification process. Regardless of the comparison result, verification details are recorded, a standardized verification report is generated (saved in txt format), and an error log is also recorded for subsequent traceability. After verification is completed, a message "Verification complete, report saved" is output.
[0031] To address common abbreviations and typos in planning texts, a fuzzy matching module based on Levenshtein edit distance is added to Example 1. The specific implementation is as follows: 1) Install dependencies: Install the Levenshtein library using the command "pip install python-Levenshtein"; 2) Write a fuzzy matching function: calculate the edit distance between the extracted terms and the standard terms in the mapping library, convert the similarity (similarity = 1 - edit distance / longest term length), and when the similarity is ≥ 0.7, it is determined to be a successful match and automatically associates the layer information corresponding to the standard terms; 3) Integrate into the text parsing process: First, perform exact matching. If the matching fails, trigger fuzzy matching. If fuzzy matching also fails, output the message "No mapping relationship found" and skip this indicator. Example of effect: When the phrase "ecological red line area" (abbreviation) appears in the text, the system calculates that its edit distance with the standard term "ecological protection red line area" is 2, and the similarity is 0.75, which exceeds the threshold of 0.7. Therefore, it is automatically associated with the layer code STBHHX to avoid missed detection.
[0032] This embodiment applies to the "One Map" implementation supervision information system for land spatial planning based on a B / S architecture. The verification function is encapsulated as a RESTful API interface, and the specific implementation is as follows: 1) API Interface Definition: The request address is / api / v1 / indicator / verify, the request method is POST, and the request parameters include the content of a base64 encoded Word document, the server-side Geodatabase storage path, and the tolerance threshold; the response format is JSON, which includes the response code, prompt information, and verification details (total number, number of passes, number of failures, number of errors, and verification results for each indicator). 2) Server-side deployment: The verification logic is encapsulated as a microservice, and the GDB path is read through the configuration file to avoid path exposure and ensure data security; multi-threading is used to process verification tasks to improve concurrency processing capabilities; 3) Front-end interaction: After receiving the JSON response, the front-end will pop up an error message overlay through Ant Design's Modal.error component or Element UI's Notification component, which will explicitly list the details of the abnormal indicators, the difference information and the handling suggestions (such as "It is recommended to verify the layer topology error or modify the planning text"), so as to realize cross-platform passive alarm. 4) Data security: Validate request parameters and filter illegal requests; decrypt and validate base64 encoded Word documents to prevent malicious file uploads; record API call logs to facilitate system operation and maintenance and security auditing.
[0033] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An automatic verification method for the consistency between indicators in territorial spatial planning texts and GIS data, characterized in that... It includes three steps: S1. Structural decomposition and interpretation of planning text indicators; S2, GIS spatial data attribute domain mapping and normalization; S3. Comparison and graphical feedback based on numerical tolerance; The structured decomposition of the S1 planning text indicators is as follows: a semantic mapping library is constructed, and improved regular expressions are used to extract the complete triplet of "indicator name + constraint prefix + value + unit" in the planning text, and a first code to be verified containing layer code and retained precision value is generated. The S2GIS spatial data attribute domain mapping and normalization: By connecting to the Geodatabase through the spatial data engine, the target feature class is automatically traversed and the specified area field value is accumulated to complete the unit normalization and coordinate system projection transformation, and a second code to be verified containing the same layer code and the normalized value is generated. The S3 is based on numerical tolerance comparison and graphical feedback: extract the numerical part of the two codes to be verified, and use a configurable tolerance threshold for fuzzy comparison. If the difference exceeds the threshold, a system-level modal pop-up alarm is triggered, and a verification report and error log are automatically generated.
2. The automatic verification method for consistency between land spatial planning text indicators and GIS data according to claim 1, characterized in that, The semantic mapping library in step S1 is in JSON format, establishing a one-to-one correspondence between planning terms and GIS layer codes, area fields, and default units, and supports flexible expansion according to local planning standards.
3. The automatic verification method for consistency between land spatial planning text indicators and GIS data according to claim 1, characterized in that, The constraint prefix in step S1 includes "not less than", "not less than", "not more than", and "is", which are used to determine whether the indicator is a lower limit, upper limit, or precise value; the regular expression supports matching any space between the constraint prefix and the indicator value or unit.
4. The automatic verification method for consistency between land spatial planning text indicators and GIS data according to claim 1, characterized in that, The spatial data engine in step S2 is ArcPy or SuperMap Objects; if the feature class coordinate system is a geographic coordinate system, then a projection transformation to an equal-area projected coordinate system is performed first to ensure the accuracy of area measurement.
5. The automatic verification method for consistency between land spatial planning text indicators and GIS data according to claim 1, characterized in that, The unit normalization in S2 is achieved through a general unit conversion function, which supports automatic conversion between square meters, mu, hectares, and square kilometers, and uniformly converts them into standard units consistent with the planning text.
6. The automatic verification method for consistency between land spatial planning text indicators and GIS data according to claim 1, characterized in that, Step S1 further includes a fuzzy semantic matching module, which uses Levenshtein edit distance to match abbreviations, misspellings and other terms in the planning text with standard terms in the semantic mapping library. The matching threshold can be flexibly configured between 0.6 and 0.
8.
7. The automatic verification method for consistency between land spatial planning text indicators and GIS data according to claim 1, characterized in that, The modal pop-up alarm in step S3 is a system-level forced alarm that takes over the focus of operation, explicitly displays the indicator name, text extraction value, GIS calculated value, difference and tolerance threshold information, and suspends the verification process until the user confirms.
8. The method for automatic verification of consistency between land spatial planning text indicators and GIS data according to claim 1, characterized in that, The method can be encapsulated as a RESTful API interface, which is suitable for the implementation supervision information system of "one map" for land and space planning in B / S architecture. The API request parameters include the content of a base64 encoded Word document, the storage path of the Geodatabase on the server side and the tolerance threshold. The response results include the total number of checks, the number of passes, the number of failures and detailed check information for each indicator.
9. The method for automatic verification of consistency between land spatial planning text indicators and GIS data according to claim 1, characterized in that, The tolerance threshold can be flexibly configured according to the accuracy requirements of the planning text, with a default value of 0.01 square kilometers.