Color filling method for vector layer equivalent region and terminal

By traversing the equal value area and deleting the intersection part, the problem of overlapping the equal value area in the traditional coloring method is solved, efficient non-overlapping coloring is achieved, and the accuracy of visual results is improved.

CN120219561APending Publication Date: 2025-06-27福州城投新基建集团有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510148502.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The traditional equal-value area coloring method can easily lead to overlap and unnecessary calculation burden when processing multiple equal-value areas, affecting the accuracy of visual results.

Method used

By obtaining the area boundary coordinates of all equal value areas, traverse these areas, determine whether there is an intersection part, and delete the intersection area from the target equal value area, obtain the updated non-overlapping equal value areas, and then color these updated areas.

Benefits of technology

The non-overlapping coloring of equal value areas is achieved, which avoids the problem of repeated coloring, improves the coloring efficiency, and ensures the accuracy of the final visualization results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219561A_ABST
    Figure CN120219561A_ABST
Patent Text Reader

Abstract

The invention provides a color filling method for equivalent regions of a vector layer and a terminal. The method comprises the following steps: acquiring region boundary coordinates of all equivalent regions; all the equivalent areas are traversed, when a target equivalent area is traversed, whether the target equivalent area intersects with other equivalent areas is judged according to the area boundary coordinates, and if yes, the intersecting area is deleted from the target equivalent area to obtain an updated equivalent area; and coloring all the updated equivalent areas. According to the method and the device, the ranges corresponding to all the updated equivalent areas are not overlapped, so that each updated equivalent area is only filled with the corresponding color during coloring, the problem that the same area is colored repeatedly is avoided, only non-overlapped areas need to be colored, the coloring range is reduced, and the coloring efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of surveying and mapping technologies, and particularly to a method for coloring an isometric area of a vector layer and a terminal. Background Art

[0002] In geographic information systems (GIS) and map production, isometric areas are usually used to represent spatial distribution data such as topographic features, climate distribution, temperature, etc. For example, on a topographic map, isometric areas can show the height of terrain at different elevations; on a climate map, isometric areas can show the temperature distribution in different regions. In scientific research and engineering fields, isometric areas are also widely used to represent the spatial distribution of various physical quantities, such as temperature distribution, pressure distribution, electric field intensity, etc. By drawing an isometric surface map, the variation law of data can be intuitively displayed, helping people better understand and analyze spatial data. In addition to maps and scientific research, isometric areas also have important applications in fields such as meteorology, geology, ecology, and environmental science. By drawing an isometric area map, it can help people better understand the distribution law of spatial data and provide support for research and decision-making in related fields.

[0003] Please refer to Figure 7 , in program development and system applications, isometric areas are usually supplemented with coloring to visually display the variation and distribution of data. However, since there may be inclusion or overlapping relationships between multiple isometric areas. The traditional coloring logic generally consists of three steps: 1. Region division. Isoline drawing: According to the numerical distribution in the dataset, a series of isolines are first generated. These isolines divide the entire visualization space into different regions, and each region corresponds to a specific numerical range. Threshold setting: Set thresholds for different isolines to determine which points belong to the same isometric area. For example, in a weather map, different isobars correspond to different air pressure values. 2. Color mapping. Fixed color scheme: Assign a fixed color to each isometric area. This is usually achieved through a pre-defined color map, such as a gradient from cold colors to warm colors. Layer-by-layer covering: Color each region in ascending order of numerical range. If two or more isometric areas overlap, the later-drawn region will cover the previously drawn region. 3. Processing overlapping regions. When dealing with overlapping or inclusion relationships, traditional methods often adopt the simple logic of "the last drawer wins". This means that when multiple regions overlap, the color of the last-drawn region will cover the colors of all other underlying regions.

[0004] In the related art, this coloring method may cause the same region to be colored multiple times when processing the same region, because the region may belong to isometric areas of different ranges, which increases the unnecessary computational burden. The layer-by-layer covering method may also cause color superposition, affecting the accuracy of the final visualization result. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method for coloring the equal - value regions of a vector layer to achieve non - overlapping coloring of the equal - value regions.

[0006] A method for coloring the equal - value regions of a vector layer, the method comprising: Obtain the regional boundary coordinates of all equal - value regions; Traverse all the equal - value regions. When the target equal - value region is traversed, determine whether the target equal - value region intersects with other equal - value regions according to the regional boundary coordinates. If so, delete the intersecting region from the target equal - value region to obtain an updated equal - value region; Color all the updated equal - value regions.

[0007] To solve the above - mentioned technical problem, another technical solution adopted by the present invention is: A coloring terminal for equal - value regions of a vector layer, comprising a memory, a processor, and a computer program stored on the memory and running on the processor. When the processor executes the computer program, the following steps are implemented: Obtain the regional boundary coordinates of all equal - value regions; Traverse all the equal - value regions. When the target equal - value region is traversed, determine whether the target equal - value region intersects with other equal - value regions according to the regional boundary coordinates. If so, delete the intersecting region from the target equal - value region to obtain an updated equal - value region; Color all the updated equal - value regions.

[0008] The beneficial effect of the present invention is as follows: After obtaining the equal - value regions, obtain the regional boundary coordinates of all equal - value regions, traverse the equal - value regions, and determine whether there is an intersection between the equal - value regions according to the regional boundary coordinates. If so, delete the intersecting region from the target equal - value region traversed to obtain an updated equal - value region, so as to ensure that after the traversal is completed, the ranges corresponding to each updated equal - value region do not overlap. Thus, when coloring, each updated equal - value region will only be filled with its corresponding color, avoiding the problem of coloring the same region repeatedly, and only need to color non - overlapping regions, reducing the coloring range and thus improving the coloring efficiency. Description of the Drawings

[0009] Figure 1 It is a step - flow chart of a method for coloring equal - value regions of a vector layer provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of the process of pre - processing equal - value region data provided by an embodiment of the present invention; Figure 3Another step flowchart of a method for coloring an isometric area of a vector layer provided by an embodiment of the present invention; Figure 4 Schematic diagram of steps of an interpolation process provided by an embodiment of the present invention; Figure 5 Schematic diagram of steps of an execution process of an interpolation algorithm according to an embodiment of the present invention; Figure 6 Another step flowchart of a method for coloring an isometric area of a vector layer provided by an embodiment of the present invention; Figure 7 Schematic diagram of the structure of a coloring terminal for an isometric area of a vector layer provided by an embodiment of the present invention; Figure 8 Schematic diagram of the filling effect of the isometric area.

[0010] Label description: 1. A coloring terminal for an isometric area of a vector layer; 2. A processor; 3. A memory. Detailed implementation manners

[0011] To describe in detail the technical content, achieved purpose and effects of the present invention, the following is described in conjunction with the implementation manners and with reference to the accompanying drawings.

[0012] Please refer to Figure 1 , a method for coloring an isometric area of a vector layer, the method includes: Obtain the regional boundary coordinates of all isometric areas; Traverse all the isometric areas. When the target isometric area is traversed, judge whether the target isometric area intersects with other isometric areas according to the regional boundary coordinates. If so, delete the intersecting area from the target isometric area to obtain an updated isometric area; Color all the updated isometric areas.

[0013] As can be seen from the above description, the beneficial effect of the present invention is that after obtaining the isometric areas, the regional boundary coordinates of all isometric areas are obtained, the isometric areas are traversed, and it is judged whether there is an intersection between the isometric areas according to the regional boundary coordinates. If so, the intersecting area is deleted from the traversed target isometric area to obtain an updated isometric area, so as to ensure that after the traversal ends, the ranges corresponding to each updated isometric area do not overlap. Therefore, when coloring, each updated isometric area will only be filled with its corresponding color, avoiding the problem of coloring the same area repeatedly, and only the non-overlapping areas need to be colored, reducing the coloring range and thus improving the coloring efficiency.

[0014] Further, after obtaining the regional boundary coordinates of all isometric areas and before traversing all the isometric areas, it further includes: Determine whether the first coordinate system where the region boundary coordinates are located is the same as the target coordinate system for drawing the contour region. If so, execute the step of traversing all the contour regions; otherwise, convert the region boundary coordinates to the target coordinate system.

[0015] As can be seen from the above description, before formally traversing, the region boundary coordinates are processed. If the coordinate system corresponding to the region boundary coordinates is different from the target coordinate system for finally drawing the contour region, the region boundary coordinates are converted to the target coordinate system to ensure the accuracy of the final drawing result.

[0016] Further, after obtaining the region boundary coordinates of all the contour regions and before traversing all the contour regions, it also includes: Traverse all the contour regions. When traversing to the contour region to be processed, sort all the region boundary coordinates in the contour region to be processed in ascending order along the first coordinate axis. Traverse the sorted region boundary coordinates. When traversing to the region boundary coordinate to be processed, determine whether the distance between the region boundary coordinate to be processed and the previous region boundary coordinate is greater than the distance threshold. If so, perform interpolation processing; otherwise, continue traversing.

[0017] As can be seen from the above description, after obtaining the region boundary coordinates of all the contour regions, the distances between the coordinates are judged. If the distance is too far, it means that directly connecting two points will be rather abrupt and affect the accuracy of the circled contour range. Therefore, interpolation processing is performed when it is judged that the distance is greater than the distance threshold to smooth the connection line between the contour points with a relatively large distance, improve the accuracy of the contour region division, and enhance the beauty of the boundary of the finally obtained contour region.

[0018] Further, when traversing all the contour regions and when traversing to the target contour region, determine whether the target contour region intersects with other contour regions according to the region boundary coordinates. If so, delete the intersecting region from the target contour region to obtain the updated contour region, including: Traverse all the contour regions in a preset order. When traversing to the target contour region, obtain the comparison contour regions sorted after the target contour region, and judge one by one whether the target contour region intersects with the comparison contour regions. If so, delete the intersecting region from the target contour region to obtain the updated contour region.

[0019] As can be seen from the above description, traversing the equivalent regions in a preset order can avoid missing equivalent regions. When the target equivalent region is traversed, only the target equivalent region is intersected with the comparison equivalent regions whose order is after it. After traversing in order like this, each pair of equivalent regions has been compared once, avoiding the process of repeated comparison, thus ensuring the processing efficiency.

[0020] Further, the traversing all the equivalent regions in a preset order includes: Obtaining the minimum value of each of the equivalent regions on the first coordinate axis one by one, and arranging all the equivalent regions in the order of the magnitudes of the minimum values to obtain the sorted equivalent regions; Traversing the sorted equivalent regions.

[0021] As can be seen from the above description, after sorting the equivalent regions according to the minimum value on the first coordinate axis within the equivalent regions and then traversing, for the equivalent regions, the smaller first coordinate axis usually corresponds to the outermost equivalent region. It is possible to traverse from the outermost to the inside, which can ensure that the larger target equivalent region always subtracts the smaller intersecting region, avoiding the situation where the smaller equivalent region is completely deleted as the target equivalent region when one equivalent region completely covers another equivalent region.

[0022] Further, the deleting the intersecting region from the target equivalent region to obtain the updated equivalent region includes: Deleting the intersecting region from the target equivalent region through Boolean difference set operation to obtain the updated equivalent region.

[0023] As can be seen from the above description, through Boolean difference set operation, the intersecting region between two regions can be directly removed, thereby realizing deleting the intersecting region from the target equivalent region. And the process of Boolean difference set operation is simple and has high execution efficiency.

[0024] Further, the judging whether the target equivalent region intersects with the comparison equivalent region one by one includes: Judging whether the target equivalent region intersects with the comparison equivalent region one by one through topological intersection calculation method.

[0025] As can be seen from the above description, there are already relatively mature algorithms in topology for calculating the mutual relationships between points, lines and surfaces. Here, first use the topological intersection calculation method to judge whether the target equivalent region has an intersecting relationship with the comparison equivalent region. If there is an intersecting relationship, then obtain the specific intersecting region and process the subsequent steps. If it is judged that there is no intersecting relationship, there is no need to perform the corresponding calculation. By judging whether there is an intersection first and then obtaining the specific intersecting region, the amount of data to be processed in the case of no intersecting relationship is reduced, thereby further improving the processing efficiency.

[0026] Further, the coloring of all the updated iso-value regions includes: Coloring all the updated iso-value regions through a scan-line algorithm.

[0027] As can be seen from the above description, coloring the updated iso-value regions through the scan-line algorithm can avoid the situation of missed coloring, achieve correct coloring of the updated iso-value regions, and ensure the display effect.

[0028] Further, the regional boundary coordinates include longitude and latitude coordinates.

[0029] As can be seen from the above description, setting the longitude and latitude coordinates as the regional boundary coordinates can adapt to most map scenarios, such as contour lines, isotherms, etc.

[0030] Please refer to Figure 7 , a coloring terminal for iso-value regions of a vector layer, including a memory, a processor, and a computer program stored on the memory and running on the processor, wherein when the processor executes the computer program, each step in the above-mentioned coloring method for iso-value regions of a vector layer is implemented.

[0031] The above-mentioned coloring method and terminal for iso-value regions of a vector layer according to the present invention can be applied to the drawing of iso-value regions, especially the drawing of feature lines such as contour lines and isotherms in maps, which will be described below through specific embodiments.

[0032] Please refer to the figure. Embodiment 1 of the present invention is as follows: A coloring method for iso-value regions of a vector layer includes the steps of: S1. Obtain the regional boundary coordinates of all iso-value regions. Among them, the regional boundary coordinates can be longitude and latitude coordinates or coordinates in other coordinate systems. The regional boundary coordinates of all iso-value regions can be loaded into the memory for processing, reducing the data loading time and further improving the processing efficiency.

[0033] In an optional embodiment, between S1 and S2, it includes: determining whether the first coordinate system where the regional boundary coordinates are located is consistent with the target coordinate system for drawing the iso-value regions. If so, execute S2; otherwise, convert the regional boundary coordinates to the target coordinate system and then execute S2. Among them, the target coordinate system can be the coordinate system corresponding to the front end where the iso-value regions will finally be presented. In this way, the coordinate system of the final iso-value regions can match the coordinate system required for front-end display, ensuring that the iso-value regions can be normally displayed.

[0034] In the field of GIS information, for the same actual location, the specific values will be different with different coordinate systems. Commonly used coordinate systems include WGS84 (World Geodetic System - 1984 Coordinate System, a geocentric coordinate system), CGCS2000 (China Geodetic Coordinate System 2000), etc. Generally, before rendering multiple data, one coordinate system is used as the reference, that is, the target coordinate system.

[0035] Among them, generally, the data corresponding to an isovalue region is stored as a single record in a spatial database or a spatial data file. Then, before rendering and loading, it is necessary to read all the isovalue region data (N records or N files) from the database or storage disk into the memory at one time, so that when processing the isovalue region, the data can be directly obtained from the memory without interacting with the database again, thereby improving the efficiency of data processing.

[0036] Refer to Figure 2 , for example, if the isovalue region data is from SHP, read the CRS (Coordinate Reference System) information of the isovalue region, that is, the coordinate system information; if the CRS information is inconsistent with the target coordinate system, perform coordinate transformation on the coordinate points of the isovalue region. If the isovalue region data is from GEOJson, read the CRS information of each isovalue region. If the CRS information is empty, the default CRS information is WGS84. If the CRS information is inconsistent with the target coordinate system, perform coordinate transformation on the coordinate points of the isovalue region. If the isovalue region data is from KML, the default CRS information is WGS84. If the CRS information is inconsistent with the unified target coordinate system, perform coordinate transformation on the coordinate points of the isovalue region. Among them, SHP, KML, and GEOJson are respectively three storage formats of spatial data.

[0037] Please refer to Figure 5 , in an optional implementation, an interpolation process S01 - S02 is also included between S1 and S2.

[0038] S01, traverse all the isovalue regions. When traversing the isovalue region to be processed, sort all the region boundary coordinates in the isovalue region to be processed in ascending order along the first coordinate axis. Among them, the first coordinate axis can be longitude.

[0039] Please refer to Figure 4 , among them, before S01, it also includes judging whether to perform the interpolation process according to different data sources, including steps (1) to (2).

[0040] (1) If the data of the isometric region is from SHP, read the geom_type information of the isometric region. If it is point data, enter the isometric line generation logic; otherwise, do not process the data of this isometric region. Here, Geom_type is a standard field in SHP, and in Chinese it is geometric type, which indicates whether the vector data stored in this SHP file is point, line, or polygon.

[0041] If the data of the isometric region is from GEOJson, read the type information of the isometric region. If it is point data, enter the isometric line generation logic; otherwise, do not process the data of this isometric region. The Type in GeoJson is the same as Geom_type in SHP, and in Chinese it is geometric type, which indicates whether the vector data stored in this SHP file is point, line, or polygon.

[0042] If the data of the isometric region is from KML, check <placemark>Whether the subordinate data label of <point>, if so, it indicates point data and enters the contour generation logic; otherwise, the data of the contour area is not processed.

[0043] (2) Generate contours based on the point data obtained in (1), which is usually implemented by encapsulated methods in the system. The boundary coordinates of the area traversed in S01 are the points on the generated contour.

[0044] S02. Traverse the sorted boundary coordinates of the area. When the boundary coordinates of the area to be processed are traversed, determine whether the distance between the boundary coordinates of the area to be processed and the previous boundary coordinates is greater than the distance threshold. If so, perform interpolation processing; otherwise, continue traversing.

[0045] In an alternative embodiment, interpolation processing is implemented by generating intermediate points through a spline interpolation algorithm, including the following steps (1) to (2).

[0046] (1) Calculate the number num_samples of intermediate points to be supplemented: ; where segment_length represents the distance between two adjacent data points, that is, the distance between the boundary coordinates of the area to be processed and the previous boundary coordinates in the above text; num_points_per_unit is the sampling density per unit distance and can be a preset value.

[0047] (2) Perform interpolation calculation according to the number of intermediate points, using the thin plate spline interpolation algorithm: ; where , is the radial basis function (RBF), where r = ||s - s i| |, representing the distance from the prediction point s to the known point s i , represents the weight to be solved, a0, a1, and a3 respectively represent the coefficients to be solved, and (x, y) represents the coordinates of the prediction point s. The specific solution process has been described in detail in the prior art, and the calculation process of the solution does not belong to the main concept of this application and will not be elaborated here. After completing the interpolation calculation, the original points and the interpolated intermediate points form a new contour, replacing the points on the corresponding original contour.

[0048] It can be seen that the coordinate system conversion can be performed after the interpolation process, or it can be determined whether the coordinate system conversion is required first, and then the interpolation process is performed in the target coordinate system. The execution order of the two steps is not limited in this embodiment. Refer to Figure 3 , the coordinate system conversion and the interpolation process belong to the data preprocessing process.

[0049] Please refer to Figure 5 , S2. Traverse all the equal-value regions. When the target equal-value region is traversed, determine whether the target equal-value region intersects with other equal-value regions according to the region boundary coordinates. If so, delete the intersecting region from the target equal-value region to obtain an updated equal-value region.

[0050] In an alternative embodiment, S2 includes: Traverse all the equal-value regions in a preset order. When the target equal-value region is traversed, obtain the comparison equal-value regions sorted after the target equal-value region, and determine one by one whether the target equal-value region intersects with the comparison equal-value regions. If so, delete the intersecting region from the target equal-value region to obtain an updated equal-value region.

[0051] In an alternative embodiment, if the target equal-value region does not intersect with the comparison equal-value region, no operation is performed, and continue to obtain the next comparison equal-value region to perform the intersection judgment with the target equal-value region until all comparison equal-value regions have been judged with the target equal-value region.

[0052] In an alternative embodiment, traversing all the equal-value regions in a preset order in S2 includes S21 - S22.

[0053] S21. Obtain the minimum value of each equal-value region on the first coordinate axis one by one, and arrange all the equal-value regions in the order of the magnitude of the minimum values to obtain the sorted equal-value regions.

[0054] In an alternative embodiment, obtaining the minimum value of each equal-value region on the first coordinate axis in S21 includes the following steps (1) to (4).

[0055] (1) Traverse all the equal-value regions, for example, by means of a loop.

[0056] (2) For each equal-value region, arrange the data on its first coordinate axis from large to small. For example, the arrangement from large to small on the first coordinate axis can be achieved by using the bubble sort algorithm. Here, it can also be arranged from small to large, which is not limited herein. In this way, the boundaries of the equal-value regions can be marked, and thus the positional relationship between each equal-value region can be roughly determined by comparing the boundaries of each equal-value region.

[0057] (3) After the sorting is completed, pick up the data on the first coordinate axis of the first point, which is the minimum value of the first coordinate axis of this equal-value region.

[0058] (4) Attach the attribute of the minimum value on the first coordinate axis to the corresponding equal-value region, and mark the minimum value of the first coordinate axis of this equal-value region, so that it can be recycled in subsequent loops.

[0059] In an alternative embodiment, arranging all the equal-value regions in the order of the magnitude of the minimum value in S21 to obtain the sorted equal-value regions includes the following steps (1) to (3).

[0060] (1) Loop through the equal-value regions that have marked the minimum value on the first coordinate axis.

[0061] (2) Sort all the equal-value regions according to the minimum value on the first coordinate axis. For example, sorting can be achieved through the bubble algorithm. In this way, the outermost equal-value regions can be traversed preferentially. Thus, when deleting the currently traversed equal-value region in subsequent steps, the smaller regions can be deducted from the larger regions without affecting the rendering of the smaller regions, avoiding the situation where when one region completely envelopes another region, the enveloped region, as the target equal-value region being traversed, will delete itself. Further, based on this concept, other extended methods can also be used to avoid this situation, such as sorting not according to coordinates but according to the numerical values of the equal-value regions, etc., which will not be elaborated here.

[0062] (3) After sorting, obtain a sequence of equal-value regions arranged in the order of the magnitude of the minimum value on the first coordinate axis.

[0063] S22. Traverse the sorted equal-value regions. For example, a first-level loop can be set to loop through the sequence of sorted equal-value regions.

[0064] In an alternative embodiment, in S2, determining whether the target equal-value region intersects with the comparison equal-value region one by one includes: determining whether the target equal-value region intersects with the comparison equal-value region one by one through a topological intersection calculation method. For example, a second-level loop can be set in the first-level loop, and in the second-level loop, it is determined one by one whether the target equal-value region intersects with the comparison equal-value region. That is, in the second-level loop, the start of the loop is the next comparison equal-value region of the target equal-value region in the first-level loop. Among them, the topological intersection calculation can be implemented through the GDAL (Geospatial Data Abstraction Library, an open-source raster spatial data conversion library under the X / MIT license agreement, which uses an abstract data model to represent various supported file formats) library to perform the topological intersection calculation.

[0065] In an alternative embodiment, in S2, deleting the intersecting region from the target equal-value region to obtain an updated equal-value region includes: deleting the intersecting region from the target equal-value region through a Boolean difference set operation to obtain an updated equal-value region. Among them, the Boolean difference set operation is implemented through the Shapely library in Python (a library for processing and analyzing two-dimensional geometric objects).

[0066] After completing the above first loop and second loop, a set of non-overlapping polygon data calculated based on the isosurface can be obtained.

[0067] Referring to Figure 3 , after executing step S2, a polygon area that corresponds to each isosurface area separately and does not overlap with other isosurface areas can be obtained.

[0068] S3. Color all the updated isosurface areas.

[0069] In an alternative embodiment, S3 includes: coloring all the updated isosurface areas through the scan-line algorithm. Referring to Figure 3 , S3 is to fill the polygon area obtained in S2.

[0070] In an alternative embodiment, S3 includes steps (1)-(5) (1) Use the scan-line algorithm to perform a coloring operation on each non-overlapping polygon (each updated isosurface area).

[0071] (2) After obtaining an updated isosurface area, start scanning row by row from the second coordinate axis with the lowest value in its polygon to the second coordinate axis with the highest value. For example, scan row by row according to the dimension or scan column by column according to the longitude.

[0072] (3) During the scanning process of each row, determine the intersection points of the current scan line and the polygon boundary.

[0073] (4) After sorting the intersection points, process the intersection points in pairs to determine the intervals to be filled.

[0074] (5) Fill these intervals, that is, complete the coloring of this row.

[0075] Among them, the scan-line algorithm provided by the PyClipper library in Python can be used to implement the coloring operation.

[0076] Please refer to Figure 6 , the second embodiment of the present invention is: A coloring terminal 1 for isosurface areas of a vector layer, including a memory 3, a processor 2, and a computer program stored on the memory 3 and running on the processor 2. When the processor 2 executes the computer program, each step in the first embodiment is implemented.

[0077] In summary, the coloring method and terminal for the isometric area of the vector layer provided by the present invention propose an improved coloring method for the problem of repeated coloring of isometric areas. This method performs non-overlapping polygon conversion calculations on a group of isometric areas, first finds the non-overlapping polygons, and then in the subsequent coloring stage, colors the non-overlapping polygons instead of the original isometric areas, so that only one coloring is required for each isometric surface graph to complete all coloring work. There is no waste of time in repeatedly coloring the overlapping parts. Specifically, a two-layer loop is used to calculate the polygons corresponding to the isometric areas that do not overlap with other isometric areas, and then the updated isometric areas are colored, so that each isometric area only needs to be colored once, avoiding the problem of the same area being colored multiple times.

[0078] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in the related technical field, shall be similarly included in the patent protection scope of the present invention.< / point> < / placemark>

Claims

1. A method for coloring equal-value areas of a vector layer, characterized in that: Includes steps: Get the region boundary coordinates of all equal-valued regions; Traversing all the isovalue areas, when traversing to the target isovalue area, judging whether the target isovalue area intersects with other isovalue areas according to the area boundary coordinates, if so, deleting the intersecting area from the target isovalue area to obtain an updated isovalue area; All the updated equal-value areas are colored.

2. A method for coloring equal-value areas of a vector layer according to claim 1, characterized in that: After obtaining the region boundary coordinates of all the equal-valued regions, before traversing all the equal-valued regions, the following further includes: Determine whether the first coordinate system where the region boundary coordinates are located is consistent with the target coordinate system for drawing the isovalued region. If so, execute the step of traversing all the isovalued regions; otherwise, convert the region boundary coordinates into the target coordinate system.

3. A method for coloring equal-value areas of a vector layer according to claim 1 or 2, characterized in that: After obtaining the region boundary coordinates of all the equal-valued regions, before traversing all the equal-valued regions, the following further includes: Traversing all the equal-value areas, when traversing to the equal-value area to be processed, arranging the boundary coordinates of all the areas in the equal-value area to be processed in order of magnitude on the first coordinate axis; The sorted region boundary coordinates are traversed, and when the region boundary coordinates to be processed are traversed, it is determined whether the distance between the region boundary coordinates to be processed and the previous region boundary coordinates is greater than a distance threshold. If so, interpolation processing is performed, otherwise the traversal is continued.

4. A method for coloring equal-valued areas of a vector layer according to claim 1, characterized in that: The traversing of all the isovalue areas, when the target isovalue area is traversed, judging whether the target isovalue area intersects with other isovalue areas according to the area boundary coordinates, and if so, deleting the intersecting area from the target isovalue area to obtain an updated isovalue area includes: All the isovalue areas are traversed in a preset order. When a target isovalue area is traversed, the comparison isovalue areas sorted after the target isovalue area are obtained, and it is determined one by one whether the target isovalue area intersects with the comparison isovalue area. If so, the intersecting area is deleted from the target isovalue area to obtain an updated isovalue area.

5. A method for coloring equal-value areas of a vector layer according to claim 4, characterized in that: The traversing all the equal value areas in a preset order comprises: Obtaining the minimum values ​​of the equal-valued areas on the first coordinate axis one by one, and arranging all the equal-valued areas in order of the minimum values ​​to obtain the sorted equal-valued areas; The sorted equal-valued areas are traversed.

6. A method for coloring equal-value areas of a vector layer according to claim 4 or 5, characterized in that: The step of deleting the intersecting area from the target isovalue area to obtain an updated isovalue area comprises: The intersecting area is deleted from the target iso-valued area by means of a Boolean difference operation to obtain an updated iso-valued area.

7. A method for coloring equal-value areas of a vector layer according to claim 4, characterized in that: The step of determining whether the target isovalue area intersects with the comparison isovalue area one by one comprises: Whether the target isovalued region intersects with the comparison isovalued region is determined one by one by using a topological intersection calculation method.

8. The method for coloring equal-valued areas of a vector layer according to claim 1, characterized in that: The coloring of all the updated equal-value areas comprises: All the updated equal-value areas are colored by a scan line algorithm.

9. A method for coloring equal-value areas of a vector layer according to claim 1, characterized in that: The area boundary coordinates include longitude and latitude coordinates.

10. A terminal for filling equal-value areas of a vector layer, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method for coloring the equal-value area of ​​a vector layer described in any one of claims 1-9 is implemented.