Map drawing method and device for realizing multi-color coloring of vector regular grid

By creating companion sub-grids in the target grid layer and performing multi-color coloring, the problem of expressing multi-attribute events in regular grids is solved, multi-color coloring of the map and spatial distribution changes of multi-attribute events are achieved, and the information expression ability of the map is improved.

CN115937357BActive Publication Date: 2025-10-17CHINESE ACAD OF SURVEYING & MAPPING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211489813.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-25
Publication Date
2025-10-17
Estimated Expiration
2042-11-25

AI Technical Summary

Technical Problem

Existing map-making technology cannot effectively express the multi-attribute information of regular grids, resulting in the inability to map the spatial distribution changes of multi-attribute events in proportion. Existing solutions are mostly monochrome or segmented maps, which cannot meet the multi-color coloring requirements of multi-attribute events.

Method used

By determining the binary mapping vector between the target event and the color index code in the target grid layer, a companion sub-grid layer is created, and the coloring is assigned according to the ternary vector to form a colored sub-grid layer, which is finally superimposed on the target grid layer to achieve multi-color coloring.

Benefits of technology

It realizes multi-color coloring of regular grids, enriches the information expression ability of maps, expands the applicability of maps, and can more effectively express the spatial distribution changes of multi-attribute events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115937357B_ABST
    Figure CN115937357B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of map drawing, and provides a map drawing method and device for realizing multi-color dyeing of a vector regular grid. The method comprises the following steps: determining a binary mapping vector of a target event and a color index code in a target grid layer; wherein the target event is at least two; determining an accompanying sub-grid layer according to the target grid layer; wherein the accompanying sub-grid layer is consistent with the coordinate system and the plane projection of the target grid layer; determining a ternary vector of the accompanying sub-grid layer according to the binary mapping vector, and assigning a color index code to the grid in the accompanying sub-grid layer according to the ternary vector and the accompanying sub-grid layer, to obtain a dyeing sub-grid layer; and determining a target map according to the dyeing sub-grid layer and the target grid layer. In this embodiment, the accompanying sub-grid is created, and the sub-grid is dyed. The color of the sub-grid can represent the target event, so that the map can express more information, and the applicability of the map is expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of map drawing technology, and in particular to a map drawing method and device for realizing multi-color coloring of a vector regular grid. Background Art

[0002] A map is a graphic representation of geographic information (natural and socioeconomic phenomena) on Earth or other celestial bodies, using symbology to represent the distribution patterns and development changes of the quantity or quality of objects within a defined (cartographic) area, based on specific mathematical laws and scientifically generalized. Cartography is the study of the scientific and technological methods and processes involved in map compilation and printing. A map grid divides the mapping area into a vector grid using plane or spherical coordinates (longitude and latitude). Using this grid as a unit, attributes (events) classification, statistical classification, and change parameters can be described or expressed, thereby expressing the temporal and spatial distribution patterns of objects on the map. Its key characteristic is that it divides the mapping area into a grid of a certain scale, distinct from natural or administrative boundaries. Grids are categorized into regular and irregular grids. Regular grids are generally rectangular, but also include square grids. Due to their consistent area, they are a widely used mapping unit in cartography. Currently, there is a lack of methods for representing multiple attributes (events) using regular grids.

[0003] Current solutions focus on using grids as data containers or mapping units, but for a single grid, the mapping still uses a single color scheme. No patent has yet proposed a practical method for multi-color coloring of vector grids.

[0004] Currently, mainstream geographic information systems and mapping products, both domestically and internationally, support a mapping model based on regular grids as spatial units. However, without exception, all current map grids are monochromatic, meaning they can only represent a single attribute (event), such as population, energy density, temperature, or vegetation cover. However, in actual cartographic representation, multiple attributes (events) need to be represented, such as the ratio of primary, secondary, and tertiary industries; the number of elementary, middle, high, and university students; and the area of ​​different land use types. Since regular grids have a uniform area, all dimensional problems (such as quantity and area) can be converted into scale problems. This requires the grid to be able to represent multiple scales, which current monochromatic grids cannot address. An alternative approach is to map multiple attributes (events) separately in monochromatic colors, creating multiple maps. While this alternative approach allows for the representation of multiple attributes (events) individually across multiple maps, it still fails to address the issue of proportional mapping. Furthermore, tiled maps cannot effectively represent the spatial distribution variations among multiple attributes (events). Therefore, existing technical implementations still lack a mapping method for expressing multiple attributes (events) of regular grids. SUMMARY

[0005] Therefore, the present disclosure provides a map drawing method and device for realizing multi-color dyeing of a vector regular grid to solve the problem of multi-color dyeing of a vector grid in the prior art.

[0006] In a first aspect, the present disclosure provides a map drawing method for realizing multi-color dyeing of a vector regular grid, comprising: determining a binary mapping vector of target events and color index codes in a target grid layer; wherein the target events are at least two; determining a companion sub-grid layer according to the target grid layer; wherein the coordinates and the plane projection of the companion sub-grid layer are consistent with those of the target grid layer; determining a ternary vector of the companion sub-grid layer according to the binary mapping vector, and assigning color index codes to grids in the companion sub-grid layer according to the ternary vector, to obtain a dyeing sub-grid layer; and determining a target map according to the dyeing sub-grid layer and the target grid layer.

[0007] In some optional implementations of some embodiments, after determining the binary mapping vector of target events and color index codes in the target grid layer, the method further comprises: determining coordinate information of the target grid layer; and performing projection transformation on the coordinate information in a case where the coordinate information is preset coordinate information.

[0008] In some optional implementations of some embodiments, the determination of the companion sub-grid layer according to the target grid layer comprises: determining grid attributes of the companion sub-grid layer according to grid attributes of the target grid layer; determining coordinate information of the companion sub-grid layer according to coordinate information of the target grid layer; and determining size information of the companion sub-grid layer according to size information of the target grid layer.

[0009] In some optional implementations of some embodiments, the determination of the ternary vector of the companion sub-grid layer according to the binary mapping vector comprises: determining a color band height of the target grid layer according to proportion information of the target events in the target grid layer; determining unit dyeing layer number information of the companion sub-grid layer according to the color band height; and determining the ternary vector of the companion sub-grid layer according to the unit dyeing layer number information and the binary mapping vector.

[0010] In some optional implementations of some embodiments, the assignment of color index codes to grids in the companion sub-grid layer according to the ternary vector to obtain the dyeing sub-grid layer comprises: determining a position index of a dyeing unit in the companion sub-grid layer according to the layer number information; and assigning color index codes to the dyeing unit in the companion sub-grid layer according to the position index and the ternary vector.

[0011] In some optional implementations of some embodiments, after obtaining the colored sub-grid layer, the method further includes: determining native coordinate information of the target grid layer; and in a case where the native coordinate information is a preset coordinate, performing a projection transformation on coordinate information of the target grid layer and coordinate information of the associated sub-grid layer to obtain the native coordinate information.

[0012] In some optional implementations of some embodiments, determining the target map according to the colored sub-grid layer and the target grid layer includes: superimposing the colored sub-grid layer on the target grid layer to obtain the target map.

[0013] In a second aspect, the disclosure provides a map drawing device for implementing multi-color coloring of a vector regular grid, including: a binary mapping vector determination module configured to determine a binary mapping vector of a target event and a color index code in a target grid layer; wherein the target event is at least two; a sub-grid layer determination module configured to determine an associated sub-grid layer according to the target grid layer; wherein the associated sub-grid layer is consistent with the target grid layer in terms of coordinates and plane projection; a sub-grid layer coloring module configured to determine a three-element vector of the associated sub-grid layer according to the binary mapping vector, and assign a color index code to a grid in the associated sub-grid layer according to the three-element vector, to obtain a colored sub-grid layer; and a target map determination module configured to determine a target map according to the colored sub-grid layer and the target grid layer.

[0014] In some optional implementations of some embodiments, the map drawing device for implementing multi-color coloring of a vector regular grid is further configured to: determine coordinate information of the target grid layer; and in a case where the coordinate information is a preset coordinate, perform a projection transformation on the coordinate information.

[0015] In some optional implementations of some embodiments, the sub-grid layer determination module of the map drawing device for implementing multi-color coloring of a vector regular grid is further configured to: determine grid attributes of the associated sub-grid layer according to grid attributes of the target grid layer; determine coordinate information of the associated sub-grid layer according to coordinate information of the target grid layer; and determine size information of the associated sub-grid layer according to size information of the target grid layer.

[0016] In some optional implementations of some embodiments, the sub-grid layer coloring module of the vector regular grid multi-color coloring mapping device is further configured to: determine a color band height of the target grid layer according to the proportion information of the target event in the target grid layer; determine cell coloring layer number information of the associated sub-grid layer according to the color band height; and determine a ternary vector of the associated sub-grid layer according to the cell coloring layer number information and the binary mapping vector.

[0017] In some optional implementations of some embodiments, the sub-grid layer coloring module of the vector regular grid multi-color coloring mapping device is further configured to: determine a position index of a coloring cell in the associated sub-grid layer according to the cell coloring layer number information; and assign a color index code of the coloring cell in the associated sub-grid layer according to the position index and the ternary vector.

[0018] In some optional implementations of some embodiments, the vector regular grid multi-color coloring mapping device is further configured to: determine native coordinate information of the target grid layer; and perform a projection transformation on coordinate information of the target grid layer and coordinate information of the associated sub-grid layer to obtain the native coordinate information when the native coordinate information is preset coordinate information.

[0019] In some optional implementations of some embodiments, the target map determination module of the vector regular grid multi-color coloring mapping device is further configured to: superimpose the coloring sub-grid layer on the target grid layer to obtain a target map.

[0020] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of the above method when executing the computer program.

[0021] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the steps of the above method when executed by a processor.

[0022] Compared with the prior art, the beneficial effects of the embodiments of the present disclosure are as follows: first, a binary mapping vector of a target event in a target grid layer and a color index code is determined, then an associated sub-grid layer is determined according to the target grid layer, finally, a ternary vector of the associated sub-grid layer is determined according to the binary mapping vector, and the color index code of the grid in the associated sub-grid layer is assigned according to the ternary vector, so as to obtain a dyed sub-grid layer, and then a target map is determined according to the dyed sub-grid layer and the target grid layer. The method provided by the present disclosure determines a binary mapping vector of a target event in a target grid layer and a color index code of the target grid layer, determines an associated sub-grid layer according to the target grid layer, determines a ternary vector of the associated sub-grid layer according to the binary mapping vector, and assigns a color index code of a grid in the associated sub-grid layer according to the ternary vector, so as to obtain a dyed sub-grid layer, and then determines a target map according to the dyed sub-grid layer and the target grid layer. The embodiment creates an associated sub-grid and dyes the sub-grid. The color of the sub-grid can represent the target event, so that the map can express more information and expand the applicability of the map. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative effort.

[0024] Figure 1 is a schematic diagram of an application scenario of a map drawing method for implementing vector regular grid multi-color dyeing according to some embodiments of the present disclosure;

[0025] Figure 2 is a flowchart of some embodiments of a map drawing method for implementing vector regular grid multi-color dyeing according to the present disclosure;

[0026] Figure 3 is a color strip shape and height setting schematic diagram of some embodiments of a map drawing method for implementing vector regular grid multi-color dyeing according to the present disclosure;

[0027] Figure 4 is an arrangement position and index encoding schematic diagram of some embodiments of a map drawing method for implementing vector regular grid multi-color dyeing according to the present disclosure;

[0028] Figure 5 is a color index calculation and storage structure schematic diagram of some embodiments of a map drawing method for implementing vector regular grid multi-color dyeing according to the present disclosure;

[0029] Figure 6 is a schematic diagram of a processing procedure of some embodiments of a model verification procedure of a map drawing method for implementing vector regular grid multi-color shading according to the present disclosure;

[0030] Figure 7 is a structural schematic diagram of some embodiments of a map drawing device for implementing vector regular grid multi-color shading according to the present disclosure;

[0031] Figure 8 is a structural schematic diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0032] Embodiments of the present disclosure will be described in detail below with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms, and should not be interpreted as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided so as to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes, and are not intended to limit the scope of protection of the present disclosure.

[0033] In addition, it should be further noted that only parts related to the present invention are shown in the drawings for ease of description. The embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0034] It should be noted that the concepts of "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units.

[0035] It should be noted that the adjectives "one", "multiple" mentioned in the present disclosure are illustrative and not limiting, and those skilled in the art should understand that, unless otherwise explicitly stated in the context, it should be understood as "one or more".

[0036] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of these messages or information.

[0037] The present disclosure will be described in detail below with reference to the drawings and in conjunction with the embodiments.

[0038] Figure 1 is a schematic diagram of one application scenario of a map drawing method for implementing vector regular grid multi-color shading according to some embodiments of the present disclosure.

[0039] In Figure 1In the application scenario of the above, the computing device 101 can determine a binary mapping vector 102 of target events and color index codes in a target grid layer. Then, the computing device 101 can determine an accompanying sub-grid layer 103 according to the above target grid layer, determine a ternary vector 104 of the above accompanying sub-grid layer 103 according to the above binary mapping vector 102, further assign color index codes to grids in the above accompanying sub-grid layer 103 according to the above ternary vector 104, and obtain a dyed sub-grid layer 105. Finally, the computing device 101 can determine a target map 106 based on the dyed sub-grid layer 105 and the above target grid layer.

[0040] It should be noted that the above computing device 101 can be hardware or software. When the computing device 101 is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device 101 is software (for example, a machine vision program or system), it can be installed in the above-mentioned hardware devices. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made herein.

[0041] Figure 2 is a flowchart of some embodiments of a map drawing method for implementing vector regular grid multi-color dyeing according to the present disclosure. Figure 2 The map drawing method for implementing vector regular grid multi-color dyeing can be executed by Figure 1 the computing device 101. As shown in Figure 2 , the map drawing method for implementing vector regular grid multi-color dyeing includes:

[0042] Step S201, determining a binary mapping vector of target events and color index codes in a target grid layer; wherein the above target events are at least two.

[0043] In some embodiments, the execution subject (such as the computing device 101 shown in Figure 1 ) of the map drawing method for implementing vector regular grid multi-color dyeing creates a mapping relationship between attributes (events) and color index codes, recorded as a binary mapping vector table , wherein E i is an attribute (event), and i is the corresponding color index code of E i . For example, the cEventColor (industrial structure) constructed for the industrial structure in the grid is {primary industry, 1}, {secondary industry, 2}, and {tertiary industry, 3}.

[0044] In some embodiments, after determining the binary mapping vector of the target event and the color index code in the target grid layer, the coordinate information of the target grid layer is determined; and in the case that the coordinate information is a preset coordinate, the coordinate information is projected and transformed. For example, the coordinate system of the target grid data source of the drawing data is judged: if it is a spherical coordinate (geographical coordinate), the projection transformation is performed, and the Gauss-Kruger projection is generally selected.

[0045] In step S202, a companion sub-grid layer is determined according to the target grid layer; wherein the coordinate system and the plane projection of the companion sub-grid layer are consistent with those of the target grid layer.

[0046] In some embodiments, the determination of the companion sub-grid layer according to the target grid layer includes: determining the grid attribute of the companion sub-grid layer according to the grid attribute of the target grid layer; determining the coordinate information of the companion sub-grid layer according to the coordinate information of the target grid layer; and determining the size information of the companion sub-grid layer according to the size information of the target grid layer. Specifically, the requirements for creating the companion sub-grid include: the companion sub-grid and the target grid are both vector regular grids; the coordinate system and the plane projection of the companion sub-grid layer should be consistent with those of the target grid; the spatial coverage range and the area of the companion sub-grid layer should be consistent with those of the target grid layer, the spatial adjacency but no intersection between the sub-grid units; the companion sub-grid unit and the target grid are similar rectangles.

[0047] In some embodiments, the size of the companion sub-grid unit is w s With h s The formula (1) and (2) can be used to calculate.

[0048]

[0049] Wherein, w s , h s are the width and height of the sub-grid unit, respectively, W , H are the width and height of the target grid unit, respectively, d is the number of digits after the decimal point of the dyeing ratio value of the target grid, counted by the longest number of digits. For example, the target grid needs to represent the proportions of the first industry, the second industry and the third industry as 11.12%, 51.70% and 37.18%, i.e. 0.1112, 0.517 and 0.3718, and the longest number of digits after the decimal point of this group of proportions is 4, then d=4. Formulas (1) and (2) not only ensure the similarity of the sub-grid unit and the target grid, but also ensure that the colors of the sub-grids in the same row are consistent when the sub-grid is colored, forming a color strip, thereby avoiding the appearance of a "step" shape distribution (also known as "Step" distribution) when the target grid is colored.

[0050] In step S203, a ternary vector of the associated sub-grid layer is determined according to the binary mapping vector, and a color index code of the grid in the associated sub-grid layer is assigned according to the ternary vector, so as to obtain a colored sub-grid layer.

[0051] In some embodiments, the determination of the ternary vector of the associated sub-grid layer according to the binary mapping vector includes: determining the color strip height of the target grid layer according to the proportion information of the target event in the target grid layer; determining the unit coloring layer number information of the associated sub-grid layer according to the color strip height; and determining the ternary vector of the associated sub-grid layer according to the unit coloring layer number information and the binary mapping vector.

[0052] In actual application, the mapping relationship between the color strip of the target grid and the sub-grid is calculated. The proportion of the color corresponding attribute (event) in the target grid is reflected by the area of the color strip.

[0053] Specifically, the height of the color strip in the target grid is calculated by formula (3).

[0054]

[0055] Referring to Figure 3 , wherein, H i is the height of the color strip i . a i is the proportion value of the attribute (event) i in the target grid, H is the height of the target grid unit.

[0056] The position information of the color strip of the target grid is calculated and recorded as a ternary vector . Wherein, E i is the attribute (event) H . di is calculated by formula (4). P i is calculated by formula (5).

[0057]

[0058] , wherein, a iis the attribute (event) E i is the scale value in the target grid, Hd i is the number of unit dyeing layers of the sub-grid which forms the color band i . Hd i is an integer. H is the number of unit dyeing layers of the sub-grid which forms the color band h . s The parameter has the same meaning as formula (2).

[0059]

[0060] Referring to Figure 4 , wherein, P i is the position index of the left lower corner starting sub-grid of the color band i i>0 , P 0 =0。

[0061] In some embodiments, the above-mentioned dyeing sub-grid layer according to the above-mentioned three-element vector and assigning the color index code of the grid in the above-mentioned associated sub-grid layer includes: determining the position index of the dyeing unit in the above-mentioned associated sub-grid layer according to the above-mentioned unit dyeing layer information; assigning the color index code of the dyeing unit in the above-mentioned associated sub-grid layer according to the above-mentioned position index and the above-mentioned three-element vector.

[0062] Specifically, the number of layers of the sub-grid in the target grid is calculated. According to its arrangement position index in the sub-grid layer, its relative layer position in the target grid Gl j is calculated by formula (6):

[0063]

[0064] wherein, Gp j is the arrangement position index of the sub-grid, n is the number of grid columns of the target grid layer, W , H , w s , h s See formula (1), formula (2) for explanation. It is a modulo operation.

[0065] Then search the vector group band(i) , if , the sub-grid G j is classified as an attribute (event) Ei . Retrieve the vector group from step 1 , according to the attribute (event) E i exist The mapping of the subgrid G j The color index code is set to i See also Figure 5 , Figure 5 The calculation and storage structure of the sub-grid color index is shown.

[0066] Through the above implementation, all sub-grid cells in the target grid are traversed in sequence, and color index code assignment is completed. All grid cells in the target grid layer are traversed, and color index code assignment of all sub-grid cells in the target grid layer is completed.

[0067] In some embodiments, after obtaining the colored subgrid layer, the method further includes: determining the native coordinate information of the target grid layer; and if the native coordinate information is preset coordinates, performing a projection transformation on the coordinate information of the target grid layer and the coordinate information of the associated subgrid layer to obtain the native coordinate information. Specifically, if the original coordinates of the target grid layer are spherical coordinates (geographic coordinates), the target grid layer and the subgrid layer are projected and transformed to restore the original coordinate system.

[0068] Furthermore, for the vector group The color index codes in the color index code are assigned color values, such as index code 1 is assigned color value RGB (0, 0, 254), index code 2 is assigned color value RGB (0, 254, 0), and index code 3 is assigned color value RGB (254, 128, 0), so as to realize the coloring of the sub-grid coloring units one by one.

[0069] Step S204: determining a target map according to the colored sub-grid layer and the target grid layer.

[0070] In some embodiments, determining the target map based on the colored subgrid layer and the target grid layer includes overlaying the colored subgrid layer onto the target grid layer to obtain the target map. Specifically, overlaying the colored subgrid layer onto the target grid layer to complete a proportional multi-color colored cartographic representation of the target grid.

[0071] It should be noted that if color adjustment is required, the color assignment of the color index code can be adjusted to achieve color adjustment of the target grid.

[0072] Compared with the prior art, the embodiments of the present disclosure have the beneficial effects that: first, a binary mapping vector of a target event and a color index code in a target grid layer is determined, then an associated sub-grid layer is determined according to the target grid layer, finally, a ternary vector of the associated sub-grid layer is determined according to the binary mapping vector, and a color index code of a colored unit in the associated sub-grid layer is assigned according to the ternary vector, so as to obtain a colored sub-grid layer, and then a target map is drawn according to the colored sub-grid layer and the target grid layer. The method provided by the present disclosure determines a binary mapping vector of a target event and a color index code in a target grid layer, determines an associated sub-grid layer according to the target grid layer, determines a ternary vector of the associated sub-grid layer according to the binary mapping vector, and assigns a color index code of a colored unit in the associated sub-grid layer according to the ternary vector, so as to obtain a colored sub-grid layer, and then determines a target map according to the colored sub-grid layer and the target grid layer. The implementation creates an associated sub-grid and colors the sub-grid. The color of the sub-grid representing the target event can make the map express more information, and expand the applicability of the map.

[0073] Figure 6 is a process flow diagram of some embodiments of a map drawing method for implementing vector rule grid multi-color coloring according to the present disclosure.

[0074] Step 601: Create a binary mapping vector of mapping attributes and color index codes.

[0075] Step 602: Determine whether the target grid layer is a plane projection coordinate. If yes, execute step 604, and if no, execute step 603.

[0076] Step 603: Project the target grid layer into a plane projection coordinate.

[0077] Step 605: Determine the scale of the associated sub-grid set.

[0078] Step 606: Create an associated sub-grid layer.

[0079] Step 607: Calculate the mapping relationship between the target grid color strip and the sub-grid.

[0080] Step 608: Traverse all sub-grids to determine the color index of the colored unit in the sub-grid.

[0081] Step 609: Determine whether the target grid layer has undergone coordinate projection transformation. If yes, execute step 610, and if no, execute step 611.

[0082] Step 610: The target grid layer restores the original coordinate system, and the associated sub-grid layer coordinate is converted to be consistent with the target grid layer.

[0083] Step 611: color value is assigned to the color index code of the coloring unit, and the sub-grid coloring is completed.

[0084] Step 612: the sub-grid layer is overlaid with the target grid layer.

[0085] Step 613: color adjustment of the sub-grid layer.

[0086] In summary, the map drawing method for realizing multi-color coloring of the vector regular grid is implemented by using the principle that the vector data scale is infinitely divisible, creating a micro-scale associated sub-grid, and sequentially coloring the sub-grid unit in proportion. The color of the sub-grid unit represents the attribute (event), and the area of the sub-grid unit set represents the proportion. By spatially superimposing and overlaying the associated sub-grid and the target grid, visual overlap is formed, and the digital map drawing of the vector regular grid in proportion to multi-color coloring is realized.

[0087] The following is an apparatus embodiment of the present disclosure, which can be used to execute the method embodiment of the present disclosure. For details not disclosed in the apparatus embodiment of the present disclosure, please refer to the method embodiment of the present disclosure.

[0088] Figure 7 is a structural schematic diagram of some embodiments of the map drawing apparatus for realizing multi-color coloring of the vector regular grid according to the present disclosure. As shown in Figure 7 the apparatus comprises a binary mapping vector determination module 701, a sub-grid layer determination module 702, a sub-grid layer coloring module 703, and a target map determination module 704. The binary mapping vector determination module 701 is configured to determine a binary mapping vector of a target event and a color index code in a target grid layer; the target event is at least two; the sub-grid layer determination module 702 is configured to determine an associated sub-grid layer according to the target grid layer; the associated sub-grid layer is consistent with the coordinates and the plane projection of the target grid layer; the sub-grid layer coloring module 703 is configured to determine a three-element vector of the associated sub-grid layer according to the binary mapping vector, and assign a color index code to the grid in the associated sub-grid layer according to the three-element vector, to obtain a colored sub-grid layer; and the target map determination module 704 is configured to determine a target map according to the colored sub-grid layer and the target grid layer.

[0089] In some optional implementations of some embodiments, the binary mapping vector determination module 701 of the apparatus for realizing multi-color coloring of the vector regular grid is further configured to: determine coordinate information of the target grid layer; and perform projection transformation on the coordinate information in the case that the coordinate information is a preset coordinate.

[0090] In some optional implementations of some embodiments, the sub-grid layer determination module 702 of the vector regular grid multi-color shading mapping device is further configured to: determine the grid attribute of the target grid layer according to the grid attribute of the target grid layer; determine the coordinate information of the target grid layer according to the coordinate information of the target grid layer; and determine the size information of the target grid layer according to the size information of the target grid layer.

[0091] In some optional implementations of some embodiments, the sub-grid layer shading module 703 of the vector regular grid multi-color shading mapping device is further configured to: determine the color band height of the target grid layer according to the proportion information of the target event in the target grid layer; determine the unit shading layer number information of the target grid layer according to the color band height; and determine the ternary vector of the target grid layer according to the unit shading layer number information and the binary mapping vector.

[0092] In some optional implementations of some embodiments, the sub-grid layer shading module 703 of the vector regular grid multi-color shading mapping device is further configured to: determine the position index of the shading unit in the target grid layer according to the unit shading layer number information; and assign the color index code of the shading unit in the target grid layer according to the position index and the ternary vector.

[0093] In some optional implementations of some embodiments, the sub-grid layer shading module 703 of the vector regular grid multi-color shading mapping device is further configured to: determine the native coordinate information of the target grid layer; and perform projection transformation on the coordinate information of the target grid layer and the coordinate information of the target grid layer in the case that the native coordinate information is a preset coordinate, to obtain the native coordinate information.

[0094] In some optional implementations of some embodiments, the target map determination module 704 of the vector regular grid multi-color shading mapping device is further configured to: superimpose the shading sub-grid layer on the target grid layer to obtain a target map.

[0095] It can be understood that the modules described in the device correspond to the respective steps in the method described above. Therefore, the operations, features and advantages described above for the method also apply to the device and the units contained therein, which will not be described here again. Figure 2 The method described above. Therefore, the operations, features and advantages described above for the method also apply to the device and the units contained therein, which will not be described here again.

[0096] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.

[0097] Figure 8 is a schematic diagram of a computer device 8 provided by the embodiments of the present disclosure. As shown in the figure, the computer device 8 of the embodiments includes a processor 801, a memory 802, and a computer program 803 stored in the memory 802 and executable on the processor 801. The processor 801 implements the steps in each of the above method embodiments when executing the computer program 803. Alternatively, the processor 801 implements the functions of each module / unit in each of the above device embodiments when executing the computer program 803. Figure 8

[0098] Exemplarily, the computer program 803 can be divided into one or more modules / units, which are stored in the memory 802 and executed by the processor 801 to complete the present disclosure. One or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program 803 in the computer device 8.

[0099] The computer device 8 can be a desktop computer, a notebook, a palm computer, and a cloud server, etc. The computer device 8 can include but is not limited to the processor 801 and the memory 802. Those skilled in the art can understand that the computer device 8 can include more or less components, or combine certain components, or different components, for example, the computer device can also include an input / output device, a network access device, a bus, etc. Figure 8 The computer device 8 is only an example and does not constitute a limitation on the computer device 8, which can include more or less components, or combine certain components, or different components, for example, the computer device can also include an input / output device, a network access device, a bus, etc.

[0100] The processor 801 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0101] ​The memory 802 can be an internal storage unit of the computer device 8, for example, a hard disk or a memory of the computer device 8. The memory 802 can also be an external storage device of the computer device 8, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the computer device 8. Further, the memory 802 can also include both the internal storage unit and the external storage device of the computer device 8. The memory 802 is used to store computer programs and other programs and data required by the computer device. The memory 802 can also be used to temporarily store data that has been output or will be output.

[0102] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the unit and module in the above system can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0103] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0104] Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.

[0105] In the embodiments of the present disclosure, it should be understood that the disclosed apparatus / computer device and method can be implemented in other manners. For example, the described apparatus / computer device embodiments are merely schematic. For example, the division of the modules or units is merely logical function division. There can be another division manner for the actual implementation, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0106] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0107] In addition, each functional unit in the various embodiments of the present disclosure can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of a software functional unit.

[0108] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the above-mentioned embodiment methods can be completed by the computer program instructing the related hardware, and the computer program can be stored in the computer readable storage medium. When the processor executes the computer program, the steps of the above-mentioned various method embodiments can be implemented. The computer program can include computer program code, which can be in the form of source code, object code, executable file or some intermediate form. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electric carrier wave signal, telecommunication signal and software distribution medium, etc. It should be noted that the computer readable medium can include or exclude content according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to the legislation and patent practice, the computer readable medium does not include electric carrier wave signal and telecommunication signal.

[0109] The above examples are only used to illustrate the technical solutions of the present disclosure, rather than limit the same; although the present disclosure is described in detail with reference to the foregoing examples, those of ordinary skill in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features thereof can be replaced by equivalents; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure.

Claims

1. A method for map drawing by multicolor coloring of a vector regular grid, characterized in that: include: Determine a binary mapping vector between a target event and a color index code in a target grid layer; wherein there are at least two target events; Determining the companion subgrid layer according to the target grid layer includes: determining the grid attributes of the companion subgrid layer according to the grid attributes of the target grid layer; determining the coordinate information of the companion subgrid layer according to the coordinate information of the target grid layer; and determining the size information of the companion subgrid layer according to the size information of the target grid layer; wherein the coordinates and plane projection of the companion subgrid layer are consistent with those of the target grid layer. Requirements for creating the companion subgrid include: the companion subgrid and the target grid are both vector regular grids; the coordinate system and plane projection of the companion subgrid layer should be consistent with the coordinate system and plane projection of the target grid; the spatial coverage and area of ​​the companion subgrid layer should be consistent with those of the target grid layer, and the subgrid cells are spatially adjacent but not intersecting; and the companion subgrid cells and the target grid are similar rectangles. Scale of the associated subgrid cell w s and h s Calculated by formula (1) and (2): in, w s 、 h s are the width and height of the subgrid unit, W 、 H are the width and height of the target grid cell, d The number of decimal places of the target grid's coloring ratio value, counted by the longest digit; Determining the ternary vector of the associated sub-grid layer according to the binary mapping vector includes: determining the color strip height of the target grid layer according to the proportion information of the target event in the target grid layer; determining the unit coloring layer number information of the associated sub-grid layer according to the color strip height; determining the ternary vector of the associated sub-grid layer according to the unit coloring layer number information and the binary mapping vector; and assigning the color index code of the grid in the associated sub-grid layer according to the ternary vector to obtain a colored sub-grid layer, including: determining the position index of the colored unit in the associated sub-grid layer according to the unit coloring layer number information; assigning the color index code of the colored unit in the associated sub-grid layer according to the position index and the ternary vector, wherein the mapping relationship between the target grid color strip and the sub-grid is calculated, and the color strip height in the target grid is calculated by formula (3): in, H i For color strips i height, a i For attributes i The scale value in the target grid, H is the height of the target grid cell; Calculate the color strip position information of the target grid and record it as a three-element vector ,in, E i For attributes, H di Calculated by formula (4), P i Calculated by formula (5); in, a i For attributes E i The scale value in the target grid, Hd i Forming color strips for stacking i The number of unit coloring layers of the sub-grid, Hd i is an integer, H and h s The meaning of the parameters is the same as formula (2): in, P i For color strip i( i>0 ), P 0 =0; Determine the target map based on the colored sub-grid layer and the target grid layer, calculate the layer position of the sub-grid in the target grid, and calculate the relative layer position of the sub-grid in the target grid based on its arrangement position index in the sub-grid layer. Gl j Calculated by formula (6): in, Gp j is the sub-grid arrangement position index, n is the number of grid columns in the target grid layer, W 、 H 、 w s 、 h s See formula (1) and formula (2) for explanation, where % is the remainder operation.

2. The method for realizing multi-color coloring of a vector regular grid map according to claim 1, characterized in that: After determining the binary mapping vector of the target event and the color index code in the target grid layer, it also includes: Determining the coordinate information of the target grid layer; When the coordinate information is a preset coordinate, a projection transformation is performed on the coordinate information.

3. The method for achieving multi-color coloring of a vector regular grid map according to claim 1, characterized in that: After obtaining the colored sub-grid layer, the method further includes: Determine the native coordinate information of the target grid layer; In a case where the native coordinate information is a preset coordinate, a projection transformation is performed on the coordinate information of the target grid layer and the coordinate information of the associated sub-grid layer to obtain the native coordinate information.

4. The method for realizing multi-color coloring of a vector regular grid map according to claim 1, characterized in that: The determining of the target map according to the colored sub-grid layer and the target grid layer includes: The colored sub-grid layer is superimposed on the target grid layer to obtain a target map.

5. A map drawing device for realizing multi-color coloring of vector regular grid, characterized in that: include: A binary mapping vector determination module is configured to determine a binary mapping vector between a target event and a color index code in a target grid layer; wherein the number of the target events is at least two; The subgrid layer determination module is configured to determine the companion subgrid layer according to the target grid layer, including: determining the grid attributes of the companion subgrid layer according to the grid attributes of the target grid layer; determining the coordinate information of the companion subgrid layer according to the coordinate information of the target grid layer; and determining the size information of the companion subgrid layer according to the size information of the target grid layer; wherein the coordinates and plane projection of the companion subgrid layer are consistent with those of the target grid layer, and the requirements for creating the companion subgrid include: the companion subgrid and the target grid are both vector regular grids; the coordinate system and plane projection of the companion subgrid layer should be consistent with the coordinate system and plane projection of the target grid; the spatial coverage and area of ​​the companion subgrid layer should be consistent with those of the target grid layer, and the subgrid cells are spatially adjacent but not intersecting; and the companion subgrid cells and the target grid are similar rectangles; Scale of the associated subgrid cell w s and h s Calculated by formula (1) and (2): in, w s 、 h s are the width and height of the subgrid unit, W 、 H are the width and height of the target grid cell, d The number of decimal places of the target grid's coloring ratio value, counted by the longest digit; The subgrid layer coloring module is configured to determine the ternary vector of the associated subgrid layer according to the binary mapping vector, including: determining the color strip height of the target grid layer according to the proportion information of the target event in the target grid layer; determining the unit coloring layer number information of the associated subgrid layer according to the color strip height; determining the ternary vector of the associated subgrid layer according to the unit coloring layer number information and the binary mapping vector; and assigning the color index code of the grid in the associated subgrid layer according to the ternary vector to obtain a colored subgrid layer, including: determining the position index of the colored unit in the associated subgrid layer according to the unit coloring layer number information; assigning the color index code of the colored unit in the associated subgrid layer according to the position index and the ternary vector, wherein the mapping relationship between the target grid color strip and the subgrid is calculated, and the color strip height in the target grid is calculated by formula (3): in, H i For color strips i height, a i For attributes i The scale value in the target grid, H is the height of the target grid cell; Calculate the color strip position information of the target grid and record it as a three-element vector ,in, E i For attributes, H di Calculated by formula (4), P i Calculated by formula (5); in, a i For attributes E i The scale value in the target grid, Hd i Forming color strips for stacking i The number of unit coloring layers of the sub-grid, Hd i is an integer, H and h s The meaning of the parameters is the same as formula (2): in, P i For color strip i( i>0 ), P 0 =0 ; The target map determination module is configured to determine the target map according to the colored sub-grid layer and the target grid layer, calculate the layer position of the sub-grid in the target grid, and calculate the relative layer position of the sub-grid in the target grid according to its arrangement position index in the sub-grid layer. Gl j Calculated by formula (6): in, Gp j is the sub-grid arrangement position index, n is the number of grid columns in the target grid layer, W 、 H 、 w s 、 h s See formula (1) and formula (2) for explanation, where % is the remainder operation.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Alternating type online statistical map generation and releasing device and method thereof

    CN101593209A

  • Map data processing method, device and equipment and computer storage medium

    CN112035209A