Rural planning drawing generation method and device, equipment and medium
By automating the processing of project information, boundary data, and vector layers to generate planning drawings, the inefficiency and compliance verification difficulties in rural planning and mapping have been resolved. This has enabled efficient integration of multi-source data and conflict identification, thereby improving the efficiency and quality of planning.
Patent Information
- Application Number
- CN202511584681.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-02-27
AI Technical Summary
The existing rural planning and mapping business suffers from problems such as low planning efficiency, difficulty in verifying planning compliance, and insufficient ability to integrate multi-source data.
By receiving and saving project information, a project information table is generated. Pre-stored administrative boundary data is called to generate boundary polygons, which are then overlaid onto a preset boundary layer. Vector layer files are parsed to obtain geometric data and attribute fields. Vector polygons are matched and overlaid to generate feature layers. Constraint layers are read and overlaid to generate conflict layers. Finally, rendering is performed to generate planning drawings.
It has achieved automated closed-loop processing of project information, standardized and automated legend configuration, and automatic identification and visualization of planning conflicts, which has significantly shortened the mapping cycle and improved the compliance of results and the efficiency of data integration.
Smart Images

Figure CN121582371A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically, to a method, apparatus, equipment, and medium for generating rural planning drawings. Background Technology
[0002] Rural planning-related services encompass the preparation of rural land use plans, land use supervision, and dynamic assessment. These services require the generation of village planning drawings and technical documents that meet specific guidelines. Furthermore, with the increasing digitalization of planning, incorporating relevant control and guidance requirements from the plans into the land use planning database as separate additional layers has become an important direction for promoting the modernization of rural spatial governance. This also necessitates combining technological means to enhance the standardization and flexibility of planning.
[0003] In current rural planning and mapping operations, traditional methods primarily rely on manual labor. Staff must manually adjust various constraint indicators and draw boundaries, while also utilizing conventional GIS tools for assistance. During the planning scheme verification phase, existing GIS tools lack dynamic rule engine support, requiring additional time for legend standardization and mapping specification verification. Regarding data processing, village planning needs to integrate multi-dimensional data such as topography, remote sensing imagery, and land ownership; however, the general lack of structured databases makes it difficult to achieve intelligent association between structured data and unstructured text information. Therefore, existing technologies suffer from low planning efficiency, difficulty in verifying planning compliance, and insufficient multi-source data integration capabilities. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, such as low planning efficiency, difficulty in verifying planning compliance, and insufficient ability to integrate multi-source data, the present invention proposes the following technical solution: In the first aspect, this invention proposes a method for generating rural planning drawings, comprising: Receive and save project information, and generate the first project information table; In response to the user's request to select mapping parameters, the system calls the pre-stored administrative boundary data, generates boundary polygons, and overlays the boundary polygons onto a preset boundary layer to obtain the mapping area. Receive and parse the vector layer files uploaded by the user to obtain geometric data and attribute fields; Based on the geometric data and attribute fields, vector polygons are matched from a preset legend library, and the matched vector polygons are superimposed onto the mapping area to generate a feature layer; Iterate through the attribute fields of the feature layer, summarize the features corresponding to the same type of field and write them into the first project information table, and generate the second project information table. Read the preset constraint layer, overlay the feature layer and constraint layer within the mapping area, and generate a conflict layer; The mapping area, the feature layer, the conflict layer, and the second project information table are rendered to generate planning drawings.
[0005] As a preferred technical solution, in response to a user's request to select cartographic parameters, pre-stored administrative boundary data is invoked to generate boundary polygons, and the boundary polygons are superimposed onto a preset boundary layer to obtain the cartographic area, including: Read the vector boundary corresponding to the user-selected area from the pre-stored administrative boundary data to obtain the original boundary line; The original boundary line is transformed to a unified coordinate system and then subjected to point thinning to obtain the thinned boundary line. The thinned boundary lines are topologically closed to generate closed surface features as boundary polygons. The boundary polygon is geometrically superimposed with a preset boundary layer to obtain the mapping area.
[0006] As a preferred technical solution, based on the geometric data and attribute fields, vector polygons are matched from a preset legend library, and the matched vector polygons are superimposed onto the mapping area to generate a feature layer, including: Text extraction is performed on the geometric data and the attribute fields to obtain key geometric attribute fields; The key fields of the geometric attributes are input into the trained fine-tuning model to generate semantic vector clusters; The semantic vector clusters are matched with preset legend fields to obtain matching fields; The matching field is compared with the legend identifiers in the preset legend library, and the legend style corresponding to the matching field is selected. The selected legend style is bound to the geometric data to obtain a styled vector polygon; The styled vector polygons are superimposed onto the mapping area to generate a feature layer.
[0007] As a preferred technical solution, a preset constraint layer is read, and the feature layer and constraint layer are overlaid within the mapping area to generate a conflict layer, including: The feature layer is sliced to obtain a sliced feature set, and the sliced feature set is checked for fields. Features containing constraint fields are identified by regular expression matching and value range matching to obtain marked features. Perform geometric Boolean operations on the marked features and the preset constraint layer to identify overlapping features; The overlapping elements are subjected to attribute logic verification, and elements with mutually exclusive attributes are filtered out to obtain conflicting elements. The conflicting elements are merged into conflict polygons to generate a conflict layer.
[0008] As a preferred technical solution, the mapping area, the feature layer, the conflict layer, and the second project information table are rendered to generate planning drawings, including: Input the mapping area, the feature layer, the conflict layer, and the second project information table into the rendering queue, and create a drawing canvas according to the layout parameters selected by the user. Perform vector rasterization on the feature layer and the conflict layer to obtain a raster-formatted feature image and conflict image; The element images and the conflict images are drawn sequentially onto the drawing canvas in layer order, and the second project information table is simultaneously written into the embedded table area of the drawing canvas. The completed drawing canvas is image-encoded and output as a planning drawing.
[0009] As a preferred technical solution, the attribute fields of the feature layer are traversed, the features corresponding to the same type of field are summarized and written into the first project information table, and a second project information table is generated, including: Extract the attribute fields of each feature in the feature layer, group features with the same field name into the same field set, sum the geometric area attribute values within each field set to obtain the total area of that field set, and write the total area into the first project information table to generate the second project information table. Receive and save project information, generating the first project information table, including: Receive the project name and project type input by the user, write the project name and project type into the project information table, establish a unique identifier corresponding to the project, and generate the first project information table.
[0010] Secondly, the present invention also proposes a rural planning map generation device, applied in the rural planning map generation method as described in any embodiment of the first aspect, comprising: The first generation module is used to receive and save project information and generate the first project information table. The first overlay module is used to respond to the user's request to select cartographic parameters, call the pre-stored administrative boundary data, generate boundary polygons, and overlay the boundary polygons onto a preset boundary layer to obtain the cartographic area; The acquisition module is used to receive and parse the vector layer files uploaded by the user, and obtain the geometric data and attribute fields; The second overlay module is used to match vector polygons from a preset legend library based on the geometric data and attribute fields, and overlay the matched vector polygons onto the mapping area to generate a feature layer; The summary writing module is used to traverse the attribute fields of the feature layer, summarize the features corresponding to the same type of fields and write them into the first project information table, and generate the second project information table. The overlay module is used to read preset constraint layers and overlay the feature layers and constraint layers within the mapping area to generate conflict layers. The rendering module is used to render the mapping area, the feature layer, the conflict layer, and the second project information table to generate planning drawings.
[0011] Thirdly, the present invention also proposes an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the operations performed by the rural planning drawing generation method as described in any of the embodiments of the first aspect.
[0012] In a fourth aspect, the present invention also proposes a computer-readable storage medium storing a program that is executed by a processor as performed by the rural planning drawing generation method described in any of the embodiments of the first aspect.
[0013] The beneficial effects of the present invention include at least the following: This invention automates the closed-loop processing of project information, administrative boundaries, vector layers, and constraint layers within the same cartographic workflow. It automatically generates boundary polygons based on pre-stored administrative boundary data and overlays them onto the base map, eliminating the need for repeated manual boundary adjustments. It automatically matches vector polygons and generates feature layers using a preset legend library, achieving standardization and automation of legend configuration. It automatically summarizes and updates the project information table by traversing the attribute fields of feature layers, avoiding manual statistics and repetitive data entry. It generates conflict layers through the automatic overlay of feature and constraint layers, enabling automatic identification and visualization of planning conflicts. Finally, it outputs complete drawings through integrated rendering, effectively solving the shortcomings of traditional methods such as low planning efficiency, difficulty in compliance verification, and insufficient multi-source data integration capabilities. This significantly shortens the cartographic cycle and improves the compliance of the results and the efficiency of data integration. Attached Figure Description
[0014] Figure 1 This is a schematic flowchart of the rural planning map generation method provided in an embodiment of the present invention.
[0015] Figure 2 This is a schematic diagram illustrating the effect of the planning drawings provided in an embodiment of the present invention.
[0016] Figure 3 This is a schematic diagram of the rural planning drawing generation device provided in an embodiment of the present invention.
[0017] Figure 4 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0018] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred technical solutions. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred technical solutions are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0019] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0020] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0021] Example 1 This embodiment proposes a method for generating rural planning drawings, such as... Figure 1 As shown, Figure 1 This is a flowchart illustrating a method for generating rural planning drawings provided in this embodiment. The method includes the following steps: S1: Receive and save project information, and generate the first project information table; S2: In response to the user's request to select mapping parameters, call the pre-stored administrative boundary data, generate boundary polygons, and overlay the boundary polygons onto the preset boundary layer to obtain the mapping area; S3: Receive and parse the vector layer file uploaded by the user to obtain geometric data and attribute fields; S4: Based on the geometric data and attribute fields, match vector polygons from the preset legend library, and overlay the matched vector polygons onto the mapping area to generate a feature layer; S5: Traverse the attribute fields of the feature layer, summarize the features corresponding to the same type of field and write them into the first project information table, and generate the second project information table. S6: Read the preset constraint layer, overlay the feature layer and constraint layer within the mapping area, and generate a conflict layer; S7: Render the mapping area, the feature layer, the conflict layer, and the second project information table to generate planning drawings.
[0022] As an example, in the specific implementation process, the "demonstration village" project information is received and saved, generating the first project information table. Subsequently, pre-stored high-precision vector administrative boundary data of the village is automatically retrieved, and boundary polygons are generated based on the CGCS2000 coordinate system. These polygons are then overlaid onto a preset boundary layer, completing the automatic delineation of the mapping area. After receiving the SHP format land use vector file uploaded by the user, its geometric data and attribute fields such as "cultivated land," "forest land," and "homestead" are automatically parsed. Based on the parsing results, corresponding vector polygon symbols are automatically matched from a preset legend library, and the matched elements are automatically overlaid onto the mapping area, generating an element layer. The attribute fields of the element layer are traversed, and elements corresponding to the same type of field are automatically summarized. The summary results are written into the first project information table, generating the second project information table. Simultaneously, the preset "ecological protection red line" is automatically read as a constraint layer. Within the mapping area, geometric Boolean operations are used to overlay the element layer and the constraint layer, automatically identifying and generating conflict layers composed of illegally occupied areas. Finally, the mapping area, feature layers, conflict layers, and the second project information table are automatically rendered in an integrated manner to synthesize a "Demonstration Village Land Use Planning Map" that meets the specifications, and then the output is completed.
[0023] Understandably, by automating the closed-loop processing of project information, administrative boundaries, vector layers, and constraint layers within the same cartographic workflow, and automatically generating boundary polygons based on pre-stored administrative boundary data and overlaying them onto the base map, the work of repeatedly adjusting boundaries manually is eliminated. The standardization and automation of legend configuration are achieved by automatically matching vector polygons and generating feature layers through a preset legend library. The automatic summarization and updating of project information tables by traversing feature layer attribute fields avoids manual statistics and repetitive data entry. The automatic overlay processing of feature layers and constraint layers generates conflict layers, enabling automatic identification and visualization of planning conflicts. Finally, the integrated rendering outputs complete drawings, effectively solving the shortcomings of traditional methods such as low planning efficiency, difficulty in compliance verification, and insufficient multi-source data integration capabilities. This significantly shortens the cartographic cycle and improves the compliance of the results and the efficiency of data integration.
[0024] Example 2 This embodiment is an improvement on the rural planning map generation method proposed in Embodiment 1.
[0025] In this embodiment, in response to a user's request to select cartographic parameters, pre-stored administrative boundary data is invoked to generate boundary polygons, and the boundary polygons are superimposed onto a preset boundary layer to obtain the cartographic area, including: Read the vector boundary corresponding to the user-selected area from the pre-stored administrative boundary data to obtain the original boundary line; The original boundary line is transformed to a unified coordinate system and then subjected to point thinning to obtain the thinned boundary line. The thinned boundary lines are topologically closed to generate closed surface features as boundary polygons. The boundary polygon is geometrically superimposed with a preset boundary layer to obtain the mapping area.
[0026] As an example, in the specific implementation process, taking a planning project for a village in a certain county as an example, the lossless vector boundary data corresponding to the village is read from the pre-stored administrative boundary database to obtain the original boundary line; then, the improved Douglas-Peucker algorithm is called to perform point thinning processing on the boundary line, which significantly reduces the number of data points while preserving the original curve shape features to the maximum extent; next, the thinned boundary line is automatically converted and unified to the CGCS2000 national coordinate system, and topological closure processing is performed through spatial overlay analysis and topology engine to generate accurate closed surface features as boundary polygons; finally, the boundary polygons are geometrically overlaid with the pre-set image base map, automatically cropped and locked to obtain the final mapping area.
[0027] Understandably, high-precision coordinate transformation and topological closure ensure the mathematical accuracy and geometric integrity of the boundary data, providing a reliable spatial benchmark for all subsequent spatial analysis and cartographic operations, thus ensuring the accuracy and authority of the planning drawings from the source.
[0028] In this embodiment, based on the geometric data and attribute fields, vector polygons are matched from a preset legend library, and the matched vector polygons are superimposed onto the mapping area to generate a feature layer, including: Text extraction is performed on the geometric data and the attribute fields to obtain key geometric attribute fields; The key fields of the geometric attributes are input into the trained fine-tuning model to generate semantic vector clusters; The semantic vector clusters are matched with preset legend fields to obtain matching fields; The matching field is compared with the legend identifiers in the preset legend library, and the legend style corresponding to the matching field is selected. The selected legend style is bound to the geometric data to obtain a styled vector polygon; The styled vector polygons are superimposed onto the mapping area to generate a feature layer.
[0029] As an example, in the specific implementation process, taking the land use planning of a certain village as an example, the system receives and parses the SHP format vector file uploaded by the user to obtain its geometric data and attribute fields such as "JBNT" and "JSYDMJ"; it extracts text from the attribute fields using a natural language processing engine to obtain key geometric attribute fields; it inputs the key fields into a pre-trained 32B-LLaMA fine-tuning model to generate a high-dimensional semantic vector cluster; it performs similarity matching and structured filtering on the semantic vector cluster with standard fields such as "basic farmland" and "construction land" in the preset legend library to accurately locate the matching fields; based on the matching results, it automatically selects the corresponding symbols, colors, and fill styles from the legend library; it binds the selected legend styles with the original geometric data to generate styled vector polygons; finally, it automatically overlays the vector polygons onto the defined mapping area to generate a standardized feature layer.
[0030] Understandably, through intelligent semantic understanding and matching, the consistency between the element layer and the preset legend library is ensured, which guarantees the standardization and accuracy of the symbol expression in the planning drawings from the source, and lays a reliable data foundation for subsequent statistical analysis, conflict detection and output.
[0031] In this embodiment, a preset constraint layer is read, and the feature layer and constraint layer are overlaid within the mapping area to generate a conflict layer, including: The feature layer is sliced to obtain a sliced feature set, and the sliced feature set is checked for fields. Features containing constraint fields are identified by regular expression matching and value range matching to obtain marked features. Perform geometric Boolean operations on the marked features and the preset constraint layer to identify overlapping features; The overlapping elements are subjected to attribute logic verification, and elements with mutually exclusive attributes are filtered out to obtain conflicting elements. The conflicting elements are merged into conflict polygons to generate a conflict layer.
[0032] As an example, in the specific implementation process, taking the conflict detection between construction land and ecological protection red line in a village plan as an example, firstly, the generated "construction land" element layer is preprocessed into slices to form a slice element set; then, the attribute fields are matched logically using regular expressions and preset value ranges to automatically identify and mark all "construction land" patches; subsequently, the marked construction land patches are subjected to geometric Boolean operations with the preset "ecological protection red line" constraint layer to accurately identify the spatial overlap area; then, the element attributes of the overlapping area are logically verified, and the conflicting elements that violate the rules are automatically filtered out based on the mutual exclusion rule of "non-ecological construction is prohibited within the ecological protection red line"; finally, all conflicting elements are merged into a unified conflict polygon and a conflict layer marked with a highlight color is generated.
[0033] Understandably, by enforcing procedural rules, it is ensured that rigid constraints such as the "five-line control" are strictly followed without exception, thereby proactively identifying and marking planning conflicts at the source, which greatly improves the compliance rate of the results and the efficiency of the review process.
[0034] In this embodiment, rendering processing is performed on the mapping area, the feature layer, the conflict layer, and the second project information table to generate planning drawings, including: Input the mapping area, the feature layer, the conflict layer, and the second project information table into the rendering queue, and create a drawing canvas according to the layout parameters selected by the user. Perform vector rasterization on the feature layer and the conflict layer to obtain a raster-formatted feature image and conflict image; The element images and the conflict images are drawn sequentially onto the drawing canvas in layer order, and the second project information table is simultaneously written into the embedded table area of the drawing canvas. The completed drawing canvas is image-encoded and output as a planning drawing.
[0035] As an example, in the specific implementation process, the generated mapping area (including the remote sensing image base map), the symbolized feature layer, the highlighted conflict layer, and the second item information table containing statistical data are all input into the rendering queue. Based on the preset "A3 landscape" layout parameters, a drawing canvas of a specified size is automatically created. Subsequently, the vector-format feature layer and conflict layer are rasterized to generate feature images and conflict images respectively. Following the layer order of base map, feature, and conflict, the rasterized images are sequentially drawn onto the drawing canvas, while the second item information table is written into a structured table format in the designated area at the lower right corner of the canvas. After integrating mapping elements such as legend, scale bar, and wind rose diagram, the complete drawing canvas is image-encoded, and the final output is a digital image file of the "Land Use Planning Map of a Certain Village" containing all planning information and conforming to the specifications.
[0036] like Figure 2 As shown, Figure 2 This is a schematic diagram illustrating the effect of the planning drawings provided in the embodiments of the present invention. Figure 2 The project presents a village spatial control map, clearly showing the spatial distribution of core control elements such as ecological protection red lines, permanent basic farmland, and village construction boundaries. The attached tables and charts system summarizes actual data on key planning indicators such as cultivated land area, permanent basic farmland protection area, and village construction land scale, achieving a linked expression of map elements and statistical indicators. The overall layout is standardized and the elements are complete, demonstrating the technical advantages of this invention in automatically outputting standardized and compliant village planning maps.
[0037] Understandably, this invention shortens the mapping cycle from several days in traditional manual work to within minutes, completely avoiding problems such as layout confusion, missing elements, or inconsistent formats that may be caused by manual operation. Furthermore, it ensures the standardization and consistency of the results through programmatic driving, significantly improving the output efficiency and quality of planning drawings, and meeting the needs of large-scale, high-frequency village planning mapping.
[0038] In this embodiment, the attribute fields of the feature layer are traversed, the features corresponding to the same type of field are summarized and written into the first project information table, and a second project information table is generated, including: Extract the attribute fields of each feature in the feature layer, group features with the same field name into the same field set, sum the geometric area attribute values within each field set to obtain the total area of that field set, and write the total area into the first project information table to generate the second project information table. Receive and save project information, generating the first project information table, including: Receive the project name and project type input by the user, write the project name and project type into the project information table, establish a unique identifier corresponding to the project, and generate the first project information table.
[0039] As an example, in the specific implementation process, the system first receives and saves the user-inputted project name "XX Demonstration Village" and project type "Village Planning," automatically generating a UUID as a unique identifier, and establishing and storing the first project information table. Then, it iterates through the attribute fields of each element in the generated feature layer, grouping elements with the same field names as "Cultivated Land," "Construction Land," and "Forest Land" into their corresponding field sets. The system automatically calculates and accumulates the geometric area attribute values of all patches within each set to obtain the total area of each land use type. Finally, key statistical indicators such as "Total Cultivated Land Area" and "Total Construction Land Area" are automatically written into the corresponding fields of the first project information table, generating a second project information table containing complete spatial statistical information.
[0040] Understandably, by automating attribute traversal and statistical summarization, real-time dynamic linkage between spatial data and attribute statistics is achieved, completely avoiding omissions and errors that may occur in manual calculations. Furthermore, by automatically generating structured project information tables, it provides timely and accurate data support for planning decisions, significantly reducing the technical threshold and time cost of data processing, and ensuring the accuracy and reliability of data content in planning results.
[0041] Example 3 like Figure 3 As shown, this embodiment proposes a rural planning drawing generation device, which is applied to the rural planning drawing generation method described in the above embodiment, including: a grouping module 100, an alignment module 200, an adjustment module 300, and an execution module 400.
[0042] The grouping module 100 is used to perform adaptive grouping of floating-point data to obtain several groups of floating-point data; the alignment module 200 is used to extract the maximum exponent of each group of floating-point data as the shared exponent within the group, and perform mantissa alignment operation on the floating-point data within the group based on the shared exponent within the group; the adjustment module 300 is used to calculate the dynamic exponent offset of each group of floating-point data, and use the dynamic exponent offset to adjust the representable range of the exponent within the group to the range that adapts to the quantization exponent bit width; the execution module 400 is used to perform the following operations on each group of floating-point data after the exponent range adjustment: each group of floating-point data stores only the sign bit, mantissa bit, and shared exponent within the group; the representable range of the exponent within the group is adjusted to the valid range of operation, and multiplication and addition operations are performed on the floating-point data within the group.
[0043] It should be noted that the foregoing explanation of the rural planning map generation method embodiment also applies to the rural planning map generation device of this embodiment, and will not be repeated here.
[0044] Example 4 Figure 4This is a schematic diagram of the structure of the electronic device 700 provided in this embodiment. The electronic device 700 includes: a memory 701, a processor 702, and a computer program stored in the memory 701 and executable on the processor 702.
[0045] When processor 702 executes the program, it implements the rural planning drawing generation method provided in the above embodiments.
[0046] Furthermore, the electronic device 700 also includes a communication interface 703 for communication between the memory 701 and the processor 702.
[0047] The memory 701 may include high-speed RAM (Random Access Memory) and may also include non-volatile memory, such as at least one disk storage device.
[0048] If the memory 701, processor 702, and communication interface 703 are implemented independently, then the communication interface 703, memory 701, and processor 702 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0049] Optionally, in a specific implementation, if the memory 701, processor 702, and communication interface 703 are integrated on a single chip, then the memory 701, processor 702, and communication interface 703 can communicate with each other through an internal interface.
[0050] The processor 702 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention.
[0051] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for generating rural planning drawings.
[0052] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0053] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0054] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.
[0055] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.
[0056] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium. When executed, the program includes one or a combination of the steps of the method embodiments.
[0057] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A method of generating a rural planning map sheet, characterized by, The method comprises the following steps: receiving and saving project information, generating a first project information table; in response to a user's selection request for mapping parameters, calling pre-stored administrative boundary data, generating a boundary polygon, and superimposing the boundary polygon on a preset boundary layer to obtain a mapping area; receiving and parsing a user-uploaded vector layer file to obtain geometric data and attribute fields; based on the geometric data and attribute fields, matching a vector polygon from a pre-set legend library, and superimposing the matched vector polygon on the mapping area to generate a feature layer; traversing the attribute fields of the feature layer, summarizing and writing the features corresponding to the same type of fields into the first project information table to generate a second project information table; reading a pre-set constraint layer, and performing overlay processing on the feature layer and the constraint layer in the mapping area to generate a conflict layer; rendering the mapping area, the feature layer, the conflict layer, and the second project information table to generate a planning drawing.
2. The rural planning drawing generation method according to claim 1, characterized by, in response to a user's selection request for mapping parameters, calling pre-stored administrative boundary data, generating a boundary polygon, and superimposing the boundary polygon on a preset boundary layer to obtain a mapping area, comprising: reading a user-selected area corresponding to a vector boundary from pre-stored administrative boundary data to obtain an original boundary line; converting the original boundary line to a unified coordinate system and performing point thinning processing to obtain a thinned boundary line; performing topological closure processing on the thinned boundary line to generate a closed surface feature as a boundary polygon; performing geometric overlay on the boundary polygon and the preset boundary layer to obtain the mapping area.
3. The rural planning drawing generation method according to claim 1, characterized by, based on the geometric data and attribute fields, matching a vector polygon from a pre-set legend library, and superimposing the matched vector polygon on the mapping area to generate a feature layer, comprising: performing text extraction on the geometric data and the attribute fields to obtain geometric attribute key fields; inputting the geometric attribute key fields into a trained fine-tuning model to generate a semantic vector cluster; performing similarity matching on the semantic vector cluster and a pre-set legend field to obtain a matching field; comparing the matching field with legend identifiers in a pre-set legend library to select a legend style corresponding to the matching field; binding the selected legend style with the geometric data to obtain a vector polygon with a style; superimposing the vector polygon with a style on the mapping area to generate a feature layer.
4. The rural planning drawing generation method according to claim 1, characterized by, reading a pre-set constraint layer, and performing overlay processing on the feature layer and the constraint layer in the mapping area to generate a conflict layer, comprising: performing slicing processing on the feature layer to obtain a set of sliced features, and performing field checking on the set of sliced features to identify features containing constraint fields through regular matching and value range matching to obtain marked features; performing geometric Boolean operation on the marked features and a pre-set constraint layer to identify overlapping features; performing attribute logic verification on the overlapping features to filter out features with mutually exclusive attributes to obtain conflict features; merging the conflict features into a conflict polygon to generate a conflict layer.
5. The rural planning drawing generation method according to claim 1, characterized by, The rendering processing is performed on the drawing area, the element layer, the conflict layer and the second project information table to generate a planning drawing, including: inputting the drawing area, the element layer, the conflict layer and the second project information table into a rendering queue, and establishing a drawing canvas according to the version parameters selected by the user; performing vector rasterization on the element layer and the conflict layer to obtain element images and conflict images in raster format; drawing the element images and the conflict images to the drawing canvas in sequence according to the layer order, and synchronously writing the second project information table into an embedded table area of the drawing canvas; performing image encoding on the drawing canvas after drawing, and outputting a planning drawing.
6. The rural planning drawing generation method according to claim 1, wherein traversing the attribute fields of the element layer, and summarizing and writing the elements corresponding to the same fields into the first project information table to generate a second project information table, including: extracting the attribute fields of each element in the element layer, grouping the elements with the same field names into the same field set, accumulating the geometric area attribute values in each field set to obtain the summary area of the field set, and writing the summary area into the first project information table to generate the second project information table.
7. The rural planning drawing generation method according to claim 1, wherein receiving and saving project information to generate a first project information table, including: receiving the project name and the project type input by the user, writing the project name and the project type into the project information table, establishing a unique identifier corresponding to the project, and generating a first project information table.
8. A rural planning paper generating apparatus characterized by comprising: including: a first generation module configured to receive and save project information and generate a first project information table; a first superimposition module configured to, in response to a selection request of a user for drawing parameters, call pre-stored administrative boundary data, generate a boundary polygon, and superimpose the boundary polygon to a preset boundary layer to obtain a drawing area; an acquisition module configured to receive and parse a vector layer file uploaded by a user to obtain geometric data and attribute fields; a second superimposition module configured to, based on the geometric data and the attribute fields, match a vector polygon from a preset legend library, and superimpose the matched vector polygon to the drawing area to generate an element layer; a summary and writing module configured to traverse the attribute fields of the element layer, and summarize and write the elements corresponding to the same fields into the first project information table to generate a second project information table; a superposition module configured to read a preset constraint layer, and perform superposition processing on the element layer and the constraint layer in the drawing area to generate a conflict layer; a rendering module configured to perform rendering processing on the drawing area, the element layer, the conflict layer and the second project information table to generate a planning drawing.
9. An electronic device, comprising: The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the operations performed by the rural planning drawing generation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a program, and the program is executed by the processor to perform the operations of the rural planning drawing generation method according to any one of claims 1 to 7.