Automatic administrative boundary fusion drawing method and meteorological drawing method based on python language

By using an automated administrative boundary fusion mapping method based on Python, the problems of cross-scale accuracy loss and manual dependence in traditional meteorological mapping have been solved. This method achieves seamless connection of cross-level boundaries and efficient automated meteorological mapping, thereby improving mapping accuracy and consistency.

CN121685759APending Publication Date: 2026-03-17ZHONGNONG SUNSHINE (JILIN PROVINCE) BIG DATA GROUP CO LTD

Patent Information

Application Number
CN202511847690.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Traditional meteorological mapping is prone to loss of accuracy when converting between scales, has large interpolation errors in complex terrain areas, relies on manual operation with low efficiency and low automation, and is difficult to personalize with commercial software. The automation level of multi-scale color patch maps is also insufficient.

Method used

An automated administrative boundary fusion mapping method based on Python is adopted. Through multi-format data loading, topological relationship repair and optimization, multi-level boundary fusion, and intelligent matching analysis, seamless connection of cross-level boundaries is achieved. Combined with dynamic interpolation algorithm and boundary whitening processing, the automation and accuracy of meteorological mapping are improved.

Benefits of technology

It enables seamless integration of cross-level boundary data, improves the efficiency and accuracy of meteorological mapping, ensures the consistency and reproducibility of results, eliminates boundary overlap or breakage issues, and enhances the automation of the mapping process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121685759A_ABST
    Figure CN121685759A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic administrative boundary fusion charting method and a meteorological charting method based on a python language. Belongs to the technical field of meteorological charting, and particularly relates to the cross technical field of meteorological data processing and geographic information system visualization. The method starts with the construction of a multi-scale adaptive boundary fusion map, so as to solve the problems of cross-scale (such as province-to-village) precision faults and large interpolation errors of complex terrains, and achieve a cross-level administrative division boundary seamless aggregation technology (village level-town level-county level-province level). Therefore, the problem that precision is easy to lose when cross-scale conversion (such as from province to village) is carried out during meteorological mapping is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of meteorological mapping technology, specifically involving the interdisciplinary field of meteorological data processing and geographic information system visualization. Background Technology

[0002] Meteorological mapping, as the core carrier of meteorological data visualization, directly supports meteorological research, disaster early warning and response, and agricultural production regulation. Its accuracy and efficiency play a decisive role in the scientific validity and feasibility of related decisions. From a technical perspective, Python, with its rich scientific computing ecosystem, offers advantages such as flexible customization, high automation (reducing manual intervention, improving efficiency, and ensuring accuracy), and adaptability to multiple workflows, making it the preferred tool for meteorological data processing. At the research level, the integration of automated optimization techniques and interpolation algorithms (e.g., using machine learning to assist in algorithm selection and parameter optimization) has become a popular direction in the field of meteorological data processing. However, due to the lack of multi-scale adaptability and a complete Python technology chain, it is difficult to meet actual business needs.

[0003] Traditional meteorological mapping has limitations in terms of both overall structure and workflow: its workflow is based on a single scale design, and it is prone to loss of accuracy when performing cross-scale transformations (e.g., from province to village); in complex terrain areas, interpolation errors are large due to station distribution issues. Furthermore, this method is highly dependent on manual labor; algorithm selection and parameter tuning rely heavily on experience, and the extensive manual operations during multi-scale mapping lead to low efficiency, poor consistency of results, and cumbersome and unreproducible large-scale data processing. Additionally, manual cropping of administrative boundaries on color patches is time-consuming, error-prone, and skill-dependent; scale changes increase the difficulty and risk, and there is a lack of automation mechanisms.

[0004] Significant shortcomings exist in tools, algorithms, and research: Commercial software, limited by preset template parameters, struggles to adapt to personalized mapping needs, resulting in low automation levels for batch multi-scale color patch mapping. Mainstream interpolation algorithms each have their drawbacks (Kriging is parameter-sensitive, inverse distance weighting has low accuracy in sparse regions, and radial basis function methods are computationally expensive). Traditional processes lack scientific evaluation when selecting algorithms, relying on manual parameter tuning, and Python has failed to overcome automation bottlenecks. Current research on automated optimization lacks multi-scale adaptation and a complete Python chain, making practical implementation difficult. Summary of the Invention

[0005] This invention starts with constructing a multi-scale adaptive boundary fusion mapping system to solve the problems of accuracy discontinuity across scales (such as from province to village) and large interpolation errors in complex terrain. It realizes seamless aggregation technology across administrative boundaries (village level → township level → county level → province level), thereby solving the problem of easy loss of accuracy when performing cross-scale conversions (such as from province to village) in meteorological mapping.

[0006] The first aspect of this invention provides an automated administrative boundary fusion mapping method based on the Python language, comprising the following steps: S1. Receive multi-level administrative boundary vector data containing Shapefile, GeoJSON and JSON file formats, perform data loading and format unification processing, and obtain standardized data with a unified coordinate system. S2. Perform topological relationship repair and optimization on the standardized data generated in step S1 to achieve intelligent segmentation and redistribution of overlapping areas, thereby obtaining topologically consistent and seamless boundary data without overlap. S3. Perform multi-level administrative boundary fusion processing on the topology optimization data generated in step S2 to obtain seamless multi-level administrative boundary data; S4. Receive the fused boundary data obtained in step S3, perform multi-strategy intelligent matching analysis, and obtain a Shapefile file that can be used for meteorological mapping.

[0007] Furthermore, in step S1, the data loading and format standardization process includes: Multi-format vector data loading: The Fiona database is used as the underlying driving engine, and an adaptive data loader is built in combination with the Geopandas database; the format detection algorithm identifies the multi-source vector data formats of multi-level administrative boundaries, including Shapefile files, GeoJSON files and JSON files; Intelligent coordinate recognition and transformation: The PyProj library is used to realize coordinate system transformation, and various input data are uniformly converted into the WGS84 coordinate system; Data quality check: To address data quality issues, a geometric validity verification algorithm based on Shapely is used to automatically repair invalid geometric objects using the buffer(0) method, thereby obtaining standardized data with a unified coordinate system.

[0008] Furthermore, in step S2, the topology repair and optimization process includes: Gap Detection and Stitching: A gap detection algorithm based on R-tree spatial indexing is used to identify gap regions by constructing a boundary line network and applying line string polygonization technology. For the detected gaps, an adaptive buffer stitching algorithm is used to dynamically adjust the stitching parameters according to the gap size. Overlapping region denoising: Shapely overlay analysis technology is used to detect overlapping regions. A priority conflict resolution mechanism is constructed, and priority weights are assigned to each administrative boundary element. The weights are determined comprehensively based on administrative level, data source reliability, and data timeliness. The ownership of overlapping regions is determined through the priority conflict resolution mechanism. High-priority elements are retained in overlapping regions, while low-priority elements are removed from overlapping regions. The Voronoi region segmentation algorithm is used to construct a Voronoi diagram with the center point of the overlapping region as the seed point. The overlapping regions are intelligently segmented and redistributed to obtain topologically consistent and seamless boundary data without overlap.

[0009] Furthermore, in step S3, the hierarchical administrative boundary fusion processing includes: Topology Preservation: Construct a hierarchical fusion engine based on Geopandas Dissolve, and use the topology preservation algorithm to ensure boundary continuity during the fusion process; Boundary fusion: The dissolve processing method is used for boundary fusion. During the fusion process, memory block technology is used. Each data block is fused sequentially from township to county level and from county to province level. A parallel processing framework is built based on the Multiprocessing library to distribute multiple provincial data blocks to different processing processes. Each process independently completes the step-by-step fusion. Finally, the results are merged and summarized to obtain a seamless multi-level administrative boundary dataset.

[0010] Furthermore, in step S4, the multi-strategy intelligent matching analysis includes: Code matching: Standardize administrative codes by converting text codes into numeric codes; construct the standard administrative code library into a Python dictionary structure, traverse the data source to be matched, and perform batch matching; perform bidirectional verification of the matching results, and resolve conflicts when one-to-many or many-to-one matching occurs; Name fuzzy matching: Based on the Levenstein distance, string similarity is calculated by determining the minimum number of single-character edit operations required to convert one string into another, converting the edit distance into a similarity score between 0 and 1, and determining a match by setting a threshold; Spatial relationship matching: The BallTree algorithm is used to perform nearest neighbor search and spatial inclusion analysis on the coordinate positions of the merged administrative boundaries and external spatial elements to locate the administrative regions to which they belong and determine which administrative region these elements fall within, thereby achieving intelligent optimization of the matching results.

[0011] A second aspect of this invention provides an automated meteorological mapping method based on the Python language. This method is performed on the Python language platform and includes the following steps: Step 1: Read meteorological data in CVS format, set layer control parameters, and load Shapefile data of multi-level administrative boundaries according to the set layers; Step 2: Create a regular network coordinate system and generate gridded meteorological element data based on the optimal interpolation algorithm for the data; Step 3: Create a PlateCarree projected coordinate system, set the coordinate axis format, and configure the coordinate axis labels and tick styles; Step 4: For the Shapefile data of multi-level administrative boundaries, use an automated administrative boundary fusion mapping method based on Python to obtain Shapefile files for meteorological mapping. Based on the Shapefile files for meteorological mapping, add administrative boundaries hierarchically. Step 5: Draw the color patch map, add the necessary map elements, whiten the administrative boundaries, and output the meteorological map in image format.

[0012] Furthermore, the data optimization interpolation algorithm is as follows: Algorithm switching based on spatial scale and terrain complexity indicators: in small-scale regions Automatically enable Kriging interpolation; in large-scale regions Automatically enable RBF radial basis function; introduce elevation correction factor to optimize interpolation results in terrain undulation areas.

[0013] Furthermore, the whitening process for administrative boundaries involves: applying gradient processing to boundary pixels using an anti-aliasing algorithm to construct a color transition zone between the boundary and the color patch area; calculating the color difference between adjacent pixels on the boundary line; and adjusting the pixel brightness and saturation of the transition zone to create a continuous gradient effect between the administrative boundary line and the surrounding meteorological element color patches, thereby eliminating visual discontinuities and jagged edges.

[0014] The beneficial effects of the administrative boundary fusion mapping method described in this invention are as follows: It innovates a cross-level boundary fusion method, eliminates compatibility differences in boundary data of different administrative levels, avoids boundary overlap or breakage problems, and improves the accuracy of meteorological elements and administrative regions overlay display; it overcomes the problems of fragmented traditional mapping processes and frequent manual intervention, and realizes unattended operation from data cleaning to map export, significantly improving mapping efficiency while ensuring the consistency and reproducibility of results.

[0015] The beneficial effects of the automated meteorological mapping method described in this invention are: it solves technical problems such as optimizing spatial interpolation accuracy, adaptive handling of administrative boundaries, and improving the efficiency of automated processes in meteorological mapping, and realizes an automated closed loop of "data input - intelligent processing - high-precision output". Attached Figure Description

[0016] Figure 1This is a flowchart of the administrative boundary fusion mapping method described in this embodiment of the invention; Figure 2 This is a flowchart of the automated meteorological mapping method described in this embodiment of the invention. Detailed Implementation

[0017] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.

[0018] Example 1 This embodiment provides an automated administrative boundary fusion mapping method based on the Python language, such as... Figure 1 As shown, it includes the following steps: Step 1: Receive multi-level administrative boundary vector data containing Shapefile, GeoJSON, and JSON file formats, perform data loading and format unification processing to obtain standardized data with a unified coordinate system.

[0019] Data loading and format standardization processing includes: Multi-format vector data loading: The Fiona database is used as the underlying driving engine, and an adaptive data loader is built in combination with the Geopandas database; the format detection algorithm identifies the multi-source vector data formats of multi-level administrative boundaries, including Shapefile files, GeoJSON files and JSON files; Intelligent coordinate recognition and transformation: The PyProj library is used to realize coordinate system transformation, and various input data are uniformly converted into the WGS84 coordinate system; Data quality check: To address data quality issues, a geometric validity verification algorithm based on Shapely is used to automatically repair invalid geometric objects using the buffer(0) method, thereby obtaining standardized data with a unified coordinate system.

[0020] Step 2: Perform topological relationship repair and optimization on the standardized data generated in Step 1 to achieve intelligent segmentation and redistribution of overlapping areas, thereby obtaining topologically consistent and seamless, non-overlapping boundary data.

[0021] Topology repair and optimization processes include: Gap Detection and Stitching: A gap detection algorithm based on R-tree spatial indexing is used to identify gap regions by constructing a boundary line network and applying line string polygonization technology. For the detected gaps, an adaptive buffer stitching algorithm is used to dynamically adjust the stitching parameters according to the gap size. Overlapping region denoising: Shapely overlay analysis technology is used to detect overlapping regions. A priority conflict resolution mechanism is constructed, and priority weights are assigned to each administrative boundary element. The weights are determined comprehensively based on administrative level, data source reliability, and data timeliness. The ownership of overlapping regions is determined through the priority conflict resolution mechanism. High-priority elements are retained in overlapping regions, while low-priority elements are removed from overlapping regions. The Voronoi region segmentation algorithm is used to construct a Voronoi diagram with the center point of the overlapping region as the seed point. The overlapping regions are intelligently segmented and redistributed to obtain topologically consistent and seamless, non-overlapping boundary data.

[0022] Step 3: Perform multi-level administrative boundary fusion processing on the topology optimization data generated in Step 2 to obtain seamlessly connected multi-level administrative boundary data.

[0023] The process of integrating hierarchical administrative boundaries includes: Topology Preservation: Construct a hierarchical fusion engine based on Geopandas Dissolve, and use the topology preservation algorithm to ensure boundary continuity during the fusion process; Boundary fusion: The dissolve processing method is used for boundary fusion. During the fusion process, memory block technology is used, that is, the township-level administrative boundary data is divided into multiple data blocks according to the provincial administrative division code. Each data block is fused sequentially from township to county level and from county to province level. A parallel processing framework is built based on the Multiprocessing library, which distributes multiple provincial data blocks to different processing processes. Each process independently completes the step-by-step fusion (fusion from lower level B to higher level A), that is, the two-level fusion operation of "township → county level" and "county level → province level". Finally, the results are uniformly summarized by the result merging module to obtain a seamless multi-level administrative boundary dataset.

[0024] Step 4: Receive the fused boundary data obtained in Step 3, perform multi-strategy intelligent matching analysis, and obtain a Shapefile file that can be used for meteorological mapping.

[0025] Multi-strategy intelligent matching analysis includes: Code matching: Administrative code standardization is performed, mapping historical versions of administrative division codes to the latest versions. Text codes (such as "Beijing-Haidian District") are converted into numeric codes (110108), and missing administrative codes are filled in. Higher-level codes are derived from lower-level administrative division codes. An efficient and accurate matching algorithm based on hash tables is used to construct the standard administrative code library into a Python dictionary structure, traversing the data source to be matched and performing batch accurate matching. The matching results are verified bidirectionally. When one-to-many or many-to-one matching occurs, spatial inclusion relationship analysis and area overlap rate calculation are used to resolve conflicts. Name fuzzy matching: The RapidFuzz library is used to calculate string similarity based on Levenstein distance. It calculates the minimum number of single-character editing operations (including insertion, deletion, and replacement of characters) required to convert one string into another, converts the edit distance into a similarity score between 0 and 1, and determines the match by setting a threshold. This achieves fault-tolerant matching and accurate association of administrative region names, and solves problems caused by differences in name spelling, simplified and traditional character conversion, and homophones. Spatial Relationship Matching: The BallTree algorithm is used to perform nearest neighbor search and spatial inclusion analysis on the coordinates of the merged administrative boundaries and external spatial elements (such as weather stations) to quickly locate the possible administrative regions to which these elements belong and determine which specific administrative region they fall within. For difficult elements located near the boundaries, a weighted voting mechanism and confidence assessment system are used to optimize the matching accuracy to over 95% and significantly improve processing speed, achieving intelligent optimization of matching results and solving matching difficulties caused by coordinate deviations or complex boundaries.

[0026] This method focuses on "automating boundary handling" to solve problems that are traditionally handled manually: Multi-format loading: Load SHP / GeoJSON / JSON vector boundaries and extract attributes such as administrative code, level, and name; Topology processing: Automatically stitches up boundary gaps and removes redundancy in overlapping areas, ensuring continuous and intact boundaries; Cross-level aggregation: Supports seamless aggregation from village to township to county to city to provincial boundaries, and ensures no omissions in matching through administrative code verification.

[0027] Example 2 Building upon Example 1, this paper further extends this method by providing an automated administrative boundary fusion mapping method based on the Python language. The flowchart of the method is shown below. Figure 2 As shown, it includes: Step 1: Read meteorological data in CVS format.

[0028] Step 2: Set layer control parameters; Through a parameterized configuration mechanism, users can differentiate the visual attributes (boundary line color, line width, and labeling rules) of administrative boundaries at different levels such as village, township, county, and provincial, establish hierarchical distinction standards, provide preset parameter support for seamless aggregation of cross-level boundaries, and ensure that the boundaries of different levels have clear distinction and relevance in visual presentation.

[0029] Step 3: Load multi-level administrative boundary Shapefile data according to the set layers; Step 4: Create a regular grid coordinate system and generate gridded meteorological element data based on the optimal interpolation algorithm for the data.

[0030] Step 5: Create a PlateCarree projected coordinate system, set the coordinate axis format (latitude and longitude scale), and configure the coordinate axis labels and scale styles.

[0031] Step 6: Add administrative boundaries in layers (province-city-county-township-town), and key areas can be specially marked.

[0032] Step 7: Draw the color patch diagram.

[0033] Step 8: Automatically add components: compass rose, title, copyright information watermark, administrative division name, etc.

[0034] Step 9: Whiten the administrative boundaries, output .jpg / .png image format, and save.

[0035] In step 3, multi-level administrative boundary Shapefile data is loaded. This is one of the data types that the automated administrative boundary fusion mapping method based on Python in Example 1 can process. In step 6, the automated administrative boundary fusion mapping method based on Python is used to obtain a Shapefile file for meteorological mapping from the multi-level administrative boundary Shapefile data. Based on the Shapefile file for meteorological mapping, administrative boundaries are added hierarchically. A layered rendering mechanism of "high-level base and low-level overlay" is adopted, and administrative boundary layers are overlaid sequentially in the order of provincial level → municipal level → county level → township level (or vice versa). This makes the high-level boundaries serve as the spatial framework base and the low-level boundaries serve as detail supplementary layers. At the physical level, precise nesting and seamless aggregation of different level boundaries are achieved, solving the technical pain points of hierarchical confusion and boundary breakage in traditional multi-scale maps.

[0036] In step 4, the dynamic interpolation decision mechanism specifically consists of an adaptive algorithm switching logic based on spatial scale (resolution) and terrain complexity indicators. (1) Small-scale region Automatically enable Kriging interpolation (precision priority). (2) Large-scale regions Automatically enable RBF radial basis functions (velocity priority). (3) In areas with undulating terrain, an elevation correction factor is introduced to optimize the interpolation results.

[0037] In step 9, the administrative boundary whitening process is essentially a boundary visual optimization process integrating anti-aliasing algorithms. To address the jagged distortion problem that easily occurs at the junction of administrative boundaries and meteorological element color spots, an anti-aliasing algorithm is used to perform gradient processing on boundary pixels to construct a color transition zone between the boundary and the color spot area. The algorithm calculates the color difference between adjacent pixels on the boundary line and automatically adjusts the pixel brightness and saturation of the transition zone, so that the administrative boundary line and the color spots of the surrounding meteorological elements present a continuous gradient effect, eliminating visual discontinuities and jaggedness. This processing is linked to the hierarchical attributes of administrative boundaries to ensure that the smoothness and visual distinction of boundaries at different levels are balanced, thus ensuring both clear and distinguishable boundaries and achieving overall visual uniformity of the map.

[0038] It completely solves the problem of jagged distortion of administrative boundaries in traditional color-coded maps, improves the visual aesthetics and professional quality of the maps, and enhances the visual coherence of cross-level boundary nesting, meeting the map usage needs of multiple scenarios such as academic reports and emergency command.

[0039] Example 3 This embodiment further defines Embodiment 2. It aims to address current problems in meteorological mapping, such as lack of multi-scale adaptation, subjective algorithm selection, inefficient parameter optimization, insufficient process automation, and weak personalized adaptation. It constructs an automated interpolation optimization technology system based on Python to achieve accurate visualization and efficient generation of multi-scale meteorological elements, providing support for meteorological operations.

[0040] The method in Example 2 solves technical problems such as optimizing spatial interpolation accuracy in meteorological mapping, adaptive handling of administrative boundaries, and improving the efficiency of automated processes. The following is a detailed explanation of the processes in the roadmap in sequence: After the process starts, the project initialization is completed first. The system automatically performs environment self-check (including dependency library loading and storage path verification) and basic parameter preset. Then it enters the data processing stage. The system prioritizes reading CSV data containing latitude, longitude and core meteorological elements (other fields do not interfere with the drawing, focusing on key dimensions). Users can configure the layer display order, transparency and preset whether key areas are specially marked. Simultaneously, SHP / GeoJSON / JSON format administrative boundary data is loaded.

[0041] Based on core parameters, a regular grid coordinate system is constructed. According to the data, the system selects the best interpolation from multiple algorithms such as inverse distance weighting, kriging, and radial basis as needed (e.g., kriging is selected to maintain accuracy at small scales and radial basis is selected to improve efficiency at large scales). Combined with geographic data, the latitude and longitude boundary range is locked. The system uses the PlateCarree projection coordinate system by default to standardize latitude and longitude scales and labels, and layered and superimposes multi-scale boundaries of province, city, county and township (supports independent style control).

[0042] The system automatically matches dynamic color schemes based on meteorological element types (precipitation / temperature, etc.), draws color patches by filling contour lines and generates intelligent legends, and overlays user-defined outer and second layers. It automatically adds components such as north arrows and copyright watermarks, and whitens the boundaries. Ranking tables or pie charts can be added as needed to provide more in-depth statistics. The final output is a high-resolution result of 200dpi+, supporting multiple formats such as PNG / PDF / JPG, and named according to adaptive rules, realizing an automated closed loop of "data input - intelligent processing - high-precision output".

Claims

1. A python language-based automated administrative boundary fusion mapping method, the method being performed in a python language platform, characterized in that, The method comprises the following steps: S1, receiving multi-level administrative boundary vector data in Shapefile file, GeoJSON file and JSON file format, performing data loading and format unification processing, and obtaining standardized and coordinate system consistent data; S2, repairing and optimizing the topological relationship of the standardized data generated in step S1, realizing intelligent segmentation and redistribution of overlapping areas, and obtaining topologically consistent and seamless gap-free and non-overlapping boundary data; S3, performing multi-level administrative boundary fusion processing on the topologically optimized data generated in step S2, and obtaining seamless multi-level administrative boundary data; S4, receiving the fusion boundary data obtained in step S3, performing multi-strategy intelligent matching analysis, and obtaining a Shapefile file that can be used for meteorological mapping.

2. The python language based automated administrative boundary conflation mapping method as claimed in claim 1, wherein, In step S1, the data loading and format unification processing includes: Multi-format vector data loading: using Fiona database as the underlying driving engine, combining Geopandas database to build an adaptive data loader; through format detection algorithm to identify multi-source vector data format of multi-level administrative boundary, including Shapefile file, GeoJSON file and JSON file; Intelligent recognition and conversion of coordinates: applying PyProj library to realize coordinate system conversion, and converting various input data to WGS84 coordinate system; Data quality inspection: for data quality problems, using Shapely-based geometric validity verification algorithm, using buffer(0) method to automatically repair invalid geometric bodies, and obtaining standardized and coordinate system consistent data.

3. The python language based automated administrative boundary conflation mapping method as claimed in claim 2, wherein, In step S2, the topological relationship repairing and optimization processing includes: Gap detection and stitching: based on the gap detection algorithm of R-tree spatial index, the gap area is identified by constructing boundary line network and applying line string polygonization technology, and for the detected gap, an adaptive buffer stitching algorithm is used to dynamically adjust the stitching parameters according to the size of the gap; Overlap area denoising: using Shapely overlay analysis technology to detect overlapping areas, constructing a priority conflict resolution mechanism, assigning priority weights to each administrative boundary element, and determining the ownership of the overlapping area through the priority conflict resolution mechanism; high-priority elements retain the overlapping area, and low-priority elements are removed from the overlapping area; using Voronoi region segmentation algorithm, taking the center point of the overlapping area as the seed point, constructing Voronoi diagram, and intelligently segmenting and redistributing the overlapping area to obtain topologically consistent and seamless gap-free and non-overlapping boundary data.

4. The python language based automated administrative boundary conflation mapping method as claimed in claim 3, wherein, In step S3, the hierarchical administrative boundary fusion processing includes: Topology preservation: constructing a hierarchical fusion engine based on Geopandas Dissolve, and using a topological preservation algorithm to ensure boundary continuity during fusion; Boundary fusion: The dissolve processing method is used for boundary fusion. In the process of fusion, the memory block technology is used. Each data block is sequentially fused from township to county and from county to province. Based on the Multiprocessing library, a parallel processing framework is constructed. Multiple provincial data blocks are distributed to different processing processes. Each process independently completes the hierarchical fusion. Finally, the results are merged and unified to obtain seamless multi-level administrative boundary data set.

5. The python language based automated administrative boundary conflation mapping method as claimed in claim 4, wherein, In step S4, the multi-strategy intelligent matching analysis includes: Code matching: Standardization processing of administrative code is performed to convert the character code into digital code. The standard administrative code library is constructed as a Python dictionary structure. The batch matching is performed by traversing the data source to be matched. The bidirectional verification is performed on the matching results. When one-to-many or many-to-one matching occurs, conflict resolution is performed. Fuzzy name matching: Based on the Levenshtein distance string similarity calculation, the minimum single character editing operation times required to convert one string into another string are calculated. The edit distance is converted into a similarity score between 0 and 1. The matching is determined by setting a threshold. Spatial relationship matching: The BallTree algorithm is used for nearest neighbor search and spatial inclusion analysis on the coordinate positions of the fused administrative boundaries and external spatial elements to locate the administrative area and determine the specific administrative area where these elements fall, thereby realizing intelligent optimization of the matching results.

6. A method for automated meteorological mapping based on python language, the method is carried out in python language platform, characterized in that, The method uses the python-based automatic administrative boundary fusion mapping method of any one of claims 1-5. The method includes the following steps: Step 1: Read the CVS format weather data, set the layer control parameters, and load the Shapefile data of multi-level administrative boundaries according to the set layer; Step 2: Create a regular network coordinate system and generate grid weather element data according to the data optimization interpolation algorithm; Step 3: Create a PlateCarree projection coordinate system, set the coordinate axis format, and configure the coordinate axis label and scale style; Step 4: Use the python-based automatic administrative boundary fusion mapping method to obtain the Shapefile file for weather mapping by using the Shapefile data of multi-level administrative boundaries; Step 5: Perform color mapping and add the required map elements, whiten the administrative boundaries, and output the picture format weather mapping.

7. The python language based automated meteorological graphing method as claimed in claim 6, wherein, When reading the CVS format weather data, the core parameters to be read are: longitude field, latitude field, and corresponding data element field.

8. The python language based automated meteorological plotting method as claimed in claim 7, wherein, The data optimization interpolation algorithm is as follows: Switching algorithm based on spatial scale and terrain complexity index: Kriging interpolation is automatically enabled in small-scale areas RBF radial basis function is automatically enabled in large-scale areas Introducing an elevation correction factor to optimize the interpolation results in areas with complex terrain.

9. The python language based automated meteorological graphing method as claimed in claim 8, wherein, The whiten processing of administrative boundaries is as follows: the anti-aliasing algorithm is used to perform gradient processing on the boundary pixels, a color transition zone between the boundary and the color area is constructed, the color difference of adjacent pixels of the boundary line is calculated, and the brightness and saturation of the transition zone are adjusted to make the color of the administrative boundary line and the surrounding weather element color present a continuous gradient effect, and eliminate visual discontinuity and jagged phenomenon.

10. A computer readable storage medium for storing computer instructions, characterized in that, The computer instructions, when executed by a processor, implement the steps of the method of any of claims 6-9.

Citation Information

Patent Citations

  • Method for drawing administrative map of HTML5 rich client side

    CN105227646A

  • Fast fusion operation method for multi-source spatial data

    CN107423753A

  • Geographic information processing method and device, equipment and storage medium

    CN119379940A

  • Aerosol prediction method and system based on artificial intelligence

    CN119964669A

  • GIS-based meteorological data fusion platform and construction method thereof

    CN120180360A

Cited By

  • Urban earthquake prevention one map adaptive multi-scale visualization mapping method and system

    CN122199738A