Rasterizing method and device, equipment, storage medium and product

By conducting data transformation at the UTM level, the problem of low geogization processing accuracy and MGRS coordinate recognition error in the existing technologies have been solved, and accurate grid index calculations and network optimization have been achieved.

CN119364391APending Publication Date: 2025-01-24CHINA MOBILE GROUP DESIGN INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411313656.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing geographic location rasterization processing method results in low projection accuracy, and it is easy to identify incorrect raster indexes when rastering using MGRS coordinates, affecting network optimization.

Method used

Data transform at the UTM level, instead of doing data transformations at the MGRS level. By obtaining the latitude and latitude coordinates of the sampling point, convert it to MGRS coordinates, then convert it to UTM coordinates, and take it down to obtain the grid base point UTM coordinates. Finally Calculate the grid indexes back to the MGRS coordinate calculation.

Benefits of technology

This ensures the accuracy of the generated raster index, improves the quality of network optimization, and avoids the same raster being split into multiple areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119364391A_ABST
    Figure CN119364391A_ABST
Patent Text Reader

Abstract

The invention discloses a rasterization method and device, equipment, a storage medium and a product, and the method comprises the steps: converting the latitude and longitude coordinates of a sampling point into MGRS coordinates after obtaining the latitude and longitude coordinates of the sampling point; the MGRS coordinates of the sampling points are converted into UTM coordinates; rounding down the direction deviation value of the UTM coordinate of the sampling point to obtain a UTM coordinate of a first grid reference point; wherein the direction deviation value of the UTM coordinate of the first grid reference point is a multiple of preset grid precision, the amplitude of rounding down is smaller than the preset grid precision, and the first grid reference point is the grid reference point corresponding to the sampling point; converting the UTM coordinate of the first grid reference point into an MGRS coordinate; and calculating a grid index of the sampling point according to the MGRS coordinate of the first grid reference point so as to carry out network optimization according to the grid index of the sampling point. According to the embodiment of the invention, data transformation is carried out on the UTM level, so that the accuracy of the generated grid index can be ensured, and a guarantee is provided for subsequent network optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communication technology, and in particular to a rasterization method, device, equipment, storage medium and product. Background Art

[0002] With the rapid development of communication technology and Internet technology, users have higher and higher requirements for network quality and network coverage. At present, network optimization is mainly achieved by rasterizing the sampling point information. The existing geographic location rasterization processing method mainly uses Mercator Projection to map the longitude and latitude to the horizontal offset x and vertical offset y (unit: meter), and then divides it by the grid size and rounds it down to get the grid ID (Identity Document, unique code). However, this method will cause large distortion to the actual area, resulting in low projection accuracy, which is not conducive to network optimization.

[0003] In order to reduce distortion, improve projection accuracy and network optimization quality, MGRS (Military Grid Reference System) can be used for rasterization. However, when using MGRS coordinates for rasterization, sometimes the wrong grid index is identified, which is not conducive to network optimization. For example, different sampling points in the same grid are sometimes mapped to different grid indices. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a rasterization method, apparatus, device, storage medium and product, which perform data transformation at the UTM level instead of the MGRS level, thereby ensuring the accuracy of the generated raster index and providing guarantee for subsequent network optimization.

[0005] To achieve the above object, an embodiment of the present invention provides a rasterization method, comprising:

[0006] Obtain the latitude and longitude coordinates of the sampling point, and convert the latitude and longitude coordinates of the sampling point into MGRS coordinates;

[0007] Convert the MGRS coordinates of the sampling points into UTM coordinates;

[0008] The directional offset value of the UTM coordinate of the sampling point is rounded down to obtain the UTM coordinate of the first grid reference point; wherein the directional offset value of the UTM coordinate of the first grid reference point is a multiple of a preset grid precision, and the amplitude of rounding down is less than the preset grid precision, and the first grid reference point is the grid reference point corresponding to the sampling point;

[0009] Converting the UTM coordinates of the first grid reference point into MGRS coordinates;

[0010] The grid index of the sampling point is calculated according to the MGRS coordinates of the first grid reference point, so as to perform network optimization according to the grid index of the sampling point.

[0011] As an improvement of the above scheme, it also includes:

[0012] Get the raster index to be visualized;

[0013] Calculate the MGRS coordinates of a second grid reference point according to the grid index to be visualized; wherein the second grid reference point is the grid reference point corresponding to the grid index to be visualized;

[0014] Converting the MGRS coordinates of the second grid reference point into UTM coordinates;

[0015] According to the preset grid accuracy, the UTM coordinates of the second grid reference point are shifted and transformed to obtain the UTM coordinates of the grid target point;

[0016] Convert the UTM coordinates of the grid target point into MGRS coordinates;

[0017] The MGRS coordinates of the grid target point are converted to obtain the latitude and longitude coordinates of the grid target point.

[0018] As an improvement of the above solution, the grid reference point is the grid lower left corner vertex, and the grid target point is the grid center point, the grid upper left corner vertex, the grid lower right corner vertex or the grid upper right corner vertex.

[0019] As an improvement of the above solution, the directional offset value of the UTM coordinate of the sampling point is rounded down to obtain the UTM coordinate of the first grid reference point, including:

[0020] The to-be-processed directional offset value of the UTM coordinate of the sampling point is rounded down to obtain the UTM coordinate of the first grid reference point; wherein the directional offset value of the UTM coordinate of the sampling point includes two directional offset values, and the to-be-processed directional offset value is a directional offset value whose value is not equal to a multiple of the preset grid precision;

[0021] When the two-directional offset values ​​of the UTM coordinates of the sampling point are both multiples of the preset grid accuracy, the UTM coordinates of the sampling point are used as the UTM coordinates of the first grid reference point.

[0022] As an improvement of the above solution, the grid reference point is the vertex of the lower left corner of the grid, and the direction offset value includes an east offset value and a north offset value;

[0023] When the grid target point is a grid center point, the shifting transformation of the UTM coordinates of the second grid reference point according to the preset grid accuracy to obtain the UTM coordinates of the grid target point includes:

[0024] The easting offset value and the northing offset value of the UTM coordinates of the lower left corner vertex of the target grid are respectively added with half of the preset grid precision to obtain the UTM coordinates of the center point of the grid; wherein the lower left corner vertex of the target grid is the lower left corner vertex of the grid corresponding to the grid index to be visualized.

[0025] As an improvement of the above solution, the grid reference point is the vertex of the lower left corner of the grid, and the direction offset value includes an east offset value and a north offset value;

[0026] When the grid target point is the upper left corner vertex of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid precision to obtain the UTM coordinates of the grid target point, including: adding the north offset value of the UTM coordinates of the lower left corner vertex of the target grid to the preset grid precision to obtain the UTM coordinates of the upper left corner vertex of the grid; wherein the lower left corner vertex of the target grid is the lower left corner vertex of the grid corresponding to the grid index to be visualized;

[0027] When the grid target point is the vertex at the lower right corner of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid precision to obtain the UTM coordinates of the grid target point, including: adding the preset grid precision to the easting offset value of the UTM coordinates of the vertex at the lower left corner of the target grid to obtain the UTM coordinates of the vertex at the lower right corner of the grid;

[0028] When the grid target point is the upper right corner vertex of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid accuracy to obtain the UTM coordinates of the grid target point, including: adding the preset grid accuracy to the easting offset value and the northing offset value of the UTM coordinates of the lower left corner vertex of the target grid to obtain the UTM coordinates of the upper right corner vertex of the grid.

[0029] To achieve the above object, an embodiment of the present invention further provides a rasterization device, comprising:

[0030] The first coordinate conversion module is used to obtain the longitude and latitude coordinates of the sampling point and convert the longitude and latitude coordinates of the sampling point into MGRS coordinates;

[0031] A second coordinate conversion module, used to convert the MGRS coordinates of the sampling point into UTM coordinates;

[0032] A rounding module, used for rounding down the directional offset value of the UTM coordinate of the sampling point to obtain the UTM coordinate of the first grid reference point; wherein the directional offset value of the UTM coordinate of the first grid reference point is a multiple of a preset grid precision, the amplitude of rounding down is less than the preset grid precision, and the first grid reference point is the grid reference point corresponding to the sampling point;

[0033] A third coordinate conversion module, used to convert the UTM coordinates of the first grid reference point into MGRS coordinates;

[0034] The grid index calculation module is used to calculate the grid index of the sampling point according to the MGRS coordinates of the first grid reference point, so as to perform network optimization according to the grid index of the sampling point.

[0035] To achieve the above objectives, an embodiment of the present invention further provides a rasterization device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the rasterization method as described in any of the above embodiments when executing the computer program.

[0036] To achieve the above-mentioned purpose, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the rasterization method as described in any of the above-mentioned embodiments.

[0037] To achieve the above objectives, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the rasterization method as described in any of the above embodiments when executed by a processor.

[0038] Compared with the prior art, the rasterization method, device, equipment, storage medium and product provided by the embodiments of the present invention obtain the longitude and latitude coordinates of the sampling point, and convert the longitude and latitude coordinates of the sampling point into MGRS coordinates; convert the MGRS coordinates of the sampling point into UTM coordinates; round down the direction offset value of the UTM coordinates of the sampling point to obtain the UTM coordinates of the first grid reference point; wherein the direction offset value of the UTM coordinates of the first grid reference point is a multiple of the preset grid precision, and the rounding amplitude is less than the preset grid precision; convert the UTM coordinates of the first grid reference point into MGRS coordinates; calculate the grid index of the sampling point according to the MGRS coordinates of the first grid reference point, so as to optimize the network according to the grid index of the sampling point. The embodiments of the present invention use UTM coordinates as a bridge for coordinate conversion, perform data transformation at the UTM level, and do not perform data transformation at the MGRS level, so as to avoid the same grid from being split into multiple areas, ensure the accuracy of the generated grid index, and provide guarantee for subsequent network optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a flow chart of the prior art for mapping longitude and latitude coordinates to raster index;

[0040] Figure 2 is a schematic diagram of a grid that crosses a grid boundary provided by an embodiment of the present invention;

[0041] Figure 3 is a schematic diagram of sampling points and the grids where they are provided by another example of the present invention;

[0042] Figure 4 is a flow chart of a rasterization method provided by an embodiment of the present invention;

[0043] Figure 5 is a flow chart of mapping longitude and latitude coordinates to a grid index provided by an embodiment of the present invention;

[0044] Figure 6 It is a flow chart of the prior art for calculating the longitude and latitude coordinates of the center point of a grid according to the grid index;

[0045] Figure 7 It is a flow chart of the prior art for calculating the longitude and latitude coordinates of four vertices of a grid according to the grid index;

[0046] Figure 8 A flowchart of calculating the longitude and latitude coordinates of a grid center point according to a grid index provided by an embodiment of the present invention;

[0047] Fig. 9 A flowchart of calculating the longitude and latitude coordinates of four vertices of a grid according to a grid index provided by an embodiment of the present invention;

[0048] Fig.10 is a structural schematic diagram of a rasterization device provided by an embodiment of the present invention;

[0049] Fig.11 It is a structural schematic diagram of a rasterization device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0052] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0053] It is worth noting that, in addition to the Mercator projection mentioned in the background technology, there are other rasterization technologies in the prior art. For example, for a specific area only, after obtaining the map of the area, a vertex (such as the upper left corner) is used as the coordinate origin, the grid size is given, and then the grid number of a point in the area is determined according to the position of the coordinates of the point relative to the coordinate origin. However, this method is only suitable for analyzing a small area, and cannot maintain consistent raster coding when applied to multiple regions across the country, so it has poor portability.

[0054] Furthermore, in order to rasterize a large area of ​​the world, the existing technology also uses Geohash (geographic hashing) to encode longitude and latitude. Its idea is to divide the earth into smaller sub-blocks, encode them into binary, and then use its own Base32 encoding to convert the binary into text that is easy to identify. Geohash is based on longitude and latitude. It can reflect the distance between two points on longitude and latitude, but it cannot reflect the actual distance; and at different latitudes, the distance represented by a unit longitude is different. Therefore, at different latitudes, the size of the rectangular area represented by a Geohash of a specified length is also different.

[0055] In summary, the existing technology has many deficiencies in rasterizing geographic locations. Using MGRS (Military Grid Reference System) for rasterization can avoid the above defects. In order to facilitate the understanding of this solution, the MGRS coordinates are first introduced below.

[0056] A latitude and longitude point (21.4097967°, -157.9160812°) can be mapped to an MGRS coordinate 4QFJ1234567890, which can represent a point or a grid with a grid accuracy of 1 meter with the point as the lower left corner, such as:

[0057] 4Q FJ, represents 100km*100km, that is, the grid accuracy is 100km;

[0058] 4Q FJ 1 6, represents a grid with a grid accuracy of 10 km;

[0059] 4Q FJ 12 67, representing a grid with a grid accuracy of 1 km;

[0060] 4Q FJ 123 678, representing a grid with a grid accuracy of 100 m;

[0061] 4Q FJ 1234 6789, representing a grid with a grid accuracy of 10 m;

[0062] 4Q FJ 12345 67890, represents a grid with a grid accuracy of 1m.

[0063] Furthermore, the first part of the MGRS coordinates is the grid zone name. The 6° wide UTM (Universal Transverse Mercator) zones (numbered 1-60) intersect with the latitude bands, which are usually 8° high and have the letters CX (I and O omitted), to create a grid zone. The intersection of a UTM zone and a latitude band is (usually) a 6°×8° polygon called a grid zone, which is named in MGRS by the zone number (one or two digits) followed by the latitude band letter.

[0064] The second part of the MGRS coordinate is the identifier of the 100,000-meter square. Each UTM zone is divided into a number of 100,000-meter squares, so the UTM coordinates of their corners are multiples of 100,000 meters. The identifier consists of a column letter (A–Z, omitting I and O) and a row letter (A–V, omitting I and O).

[0065] The third part of the MGRS coordinates represents the easting and northing offsets in a 100,000-meter grid.

[0066] For example, taking the MGRS coordinate 49RDQ3768757138 as an example, "49R" represents the grid area name, and "49" is the UTM area number, and "R" is the latitude band number; "DQ" represents the grid mark, and "D" is the column letter and "Q" is the row letter; "37687" represents the easting offset value, and "57138" represents the northing offset value.

[0067] Furthermore, without loss of generality, the grid size is expanded. The usual practice is to define a new grid index format based on the military grid: MGRS region number-MGRS easting number-MGRS northing number-grid accuracy, where:

[0068] MGRS easting deviation number = MGRS easting deviation value (m) / / grid accuracy (m);

[0069] MGRS north label = MGRS north offset value (m) / / grid accuracy (m);

[0070] Among them, the grid accuracy is generally 20, 50, 100, and 200, representing square areas with side lengths of 20 meters, 50 meters, 100 meters, and 200 meters in the military grid coordinate system, respectively; and / / means floor division, that is, division is performed first and then rounded down.

[0071] Compared with other existing technologies, the use of MGRS has obvious advantages: (1) MGRS uses a transverse Mercator projection for every 6-degree longitude zone and reduces the scale factor on the central meridian to 0.9996. The distortion is maintained below 1 / 1000 in each area, the overall distortion is minimized, and the projection accuracy is high; (2) There is no need to obtain a map in advance, nor is there any need to generate all the grids for the entire map in advance. It is only necessary to directly map the longitude and latitude coordinates to MGRS coordinates, and then map them to the MGRS raster index; (3) It can rasterize large data sample points and large areas, and maintain a consistent raster index for easy migration and sharing; (4) The grid granularity can be flexibly set, such as n*n or n*m squares, and presented as equal-area squares on a GIS (Geographic information system), facilitating analysis, positioning, and visualization of various granularities.

[0072] Furthermore, in order to explain the problems existing in the prior art when using MGRS for rasterization and to analyze the causes of the problems, the prior art method of using MGRS for rasterization is introduced below.

[0073] It is understood that rasterization can be understood as mapping longitude and latitude coordinates to raster indices, see Figure 1 , is a flowchart of the prior art for mapping longitude and latitude coordinates to raster indexes. Figure 1 It can be seen that the prior art first converts the latitude and longitude coordinates of the sampling point into MGRS coordinates, and then divides the easting offset value and the northing offset value of the MGRS coordinate of the sampling point by the grid precision and rounds them to obtain a grid index.

[0074] Exemplarily, assuming that the grid accuracy is 50 meters, taking the sampling point Q with longitude and latitude coordinates (110.3456, 31.2468) as an example (the same below), the military grid coordinates (MGRS coordinates) of the sampling point Q after coordinate conversion are 49RDQ3768757138.

[0075] Then, according to Figure 1 The method shown maps the latitude and longitude coordinates of the sample point Q to a raster index:

[0076] 37687 / / 50=753, 57138 / / 50=1142;

[0077] The grid index can be obtained as 49RDQ-753-1142-50.

[0078] Although the prior art can correctly map the grid index of the sampling point in most cases, it is found in actual application that this method sometimes leads to erroneous results, for example, different sampling points falling on the same grid are mapped to different grid indexes.

[0079] After research, it is found that the existing technology is prone to errors in rasterization in the following two situations: (1) the grid area crosses the right boundary and upper boundary of the 100,000m*100,000m grid; (2) the grid area crosses the latitude zone boundary. This is because in the above two situations, the first, second or third letter of the MGRS coordinate will change, and the existing technology only performs data transformation on the easting offset value and / or the northing offset value during rasterization, thus causing rasterization errors.

[0080] See also Figure 2 , is a schematic diagram of a grid that crosses a grid boundary provided by an embodiment of the present invention. Figure 2 It can be seen that compared with the vertex at the lower left corner of the grid, the second or / and third letters of the MGRS coordinates of the other three vertices have changed. Specifically, the grid index of the grid is 5QMA-1999-1999-50, which also means that the MGRS coordinates of the vertex at the lower left corner of the grid are 5QMA9995099950; and because the upper boundary of the grid is located at the boundary of the 100,000m*100,000m square, the third letter of the MGRS coordinates of the upper left corner vertex and the upper right corner vertex of the grid changes from A to B; because the right boundary of the grid is located at the boundary of the 100,000m*100,000m square, the second letter of the MGRS coordinates of the upper right corner vertex and the lower right corner vertex of the grid changes from M to N. The problem caused by this is that it is difficult to determine the second and third letters of the MGRS coordinates, and the wrong MGRS coordinates cannot be correctly converted into longitude and latitude coordinates.

[0081] Furthermore, the first letter of the MGRS coordinate identifies the latitude band, and the border of the latitude band is a parallel circle, which is not consistent with the 100,000m*100,000m grid border. Therefore, if the grid crosses the latitude band boundary, the longitude and latitude points to be rasterized are located on one side of the latitude band, and the lower left corner vertex of the grid happens to be on the other side of the latitude band, then the first letter of the MGRS coordinate of the lower left corner vertex of the grid will change.

[0082] In the above case, using the existing method for rasterization can easily split a raster area into two raster identifiers by mistake, thereby mapping an incorrect raster index. To illustrate the above problems of the existing method, an example is given below. Figure 3 , is a schematic diagram of sampling points and their grids provided by another example of the present invention, wherein point 1, point 2 and point 3 are sampling points falling in the same grid, the grid is passed by the latitude band boundary N40°, and point 1 and point 2 are located north of 40° north latitude (N40°), and point 3 is located south of 40° north latitude. The latitude and longitude coordinates and MGRS coordinates of the three sampling points are as follows:

[0083] Point 1, (40.00015173005544, 114.4129793531932), 50TKK7916030980;

[0084] Point 2, (40.00015695793115, 114.4132134169971), 50TKK7918030980;

[0085] Point 3, (39.9999769459187, 114.41322021429848), 50SKK7918030960;

[0086] According to the existing method for rasterization, point 1 and point 2 will be mapped to the grid index 50TKK-1583-619-50, and point 3 will be mapped to the grid index 50SKK-1583-619-50, which will cause the points falling in one grid to be attributed to two grid indexes; and the grid coordinates 50TKK7915030950 of the lower left corner vertex of the grid represented by the grid index 50TKK-1583-619-50 are not standardized military grid coordinates, and the program will report an error when converting them into longitude and latitude coordinates.

[0087] Based on the above-mentioned method of directly using MGRS for rasterization, there is a problem that the same raster is mistakenly identified as two rasters, resulting in incorrect raster index and rasterization errors. Figure 4 , an embodiment of the present invention provides a rasterization method, comprising steps S1 to S5:

[0088] S1, obtain the latitude and longitude coordinates of the sampling point, and convert the latitude and longitude coordinates of the sampling point into MGRS coordinates;

[0089] S2, converting the MGRS coordinates of the sampling points into UTM coordinates;

[0090] S3, rounding down the directional offset value of the UTM coordinates of the sampling point to obtain the UTM coordinates of the first grid reference point; wherein the directional offset value of the UTM coordinates of the first grid reference point is a multiple of a preset grid precision, and the amplitude of rounding down is less than the preset grid precision, and the first grid reference point is the grid reference point corresponding to the sampling point;

[0091] S4, converting the UTM coordinates of the first grid reference point into MGRS coordinates;

[0092] S5. Calculate the grid index of the sampling point according to the MGRS coordinates of the first grid reference point, so as to perform network optimization according to the grid index of the sampling point.

[0093] It is worth noting that the mgrs package of the programming language Python provides the conversion functions toMGRS and toLatLon for MGRS coordinates and longitude and latitude coordinates, which can be used for the conversion between MGRS coordinates and longitude and latitude coordinates; and the mgrs package also provides the conversion functions between MGRS coordinates and UTM coordinates, MGRSToUTM and UTMToMGRS, which can be used for the conversion between MGRS coordinates and UTM coordinates. Exemplarily, in step S1, toMGRS can be used for coordinate conversion; in step S2, MGRSToUTM can be used for coordinate conversion; in step S4, UTMToMGRS can be used for coordinate conversion.

[0094] It is worth mentioning that there are two ways to express UTM coordinates, UTM with Latitude Bands and UTM with Hemisphere Designation. The main difference between the two methods is that the first method uses latitude bands (a letter represents a specific latitude range, the letter is CX, omitting I and O), while the second method uses a hemisphere designator (N for the northern hemisphere and S for the southern hemisphere) to specify the location. For example, convert the point with latitude = 35 and longitude = 121 into UTM coordinates:

[0095] The UTM latitude zone representation is (51, 'S', 317483.0, 3874870.0);

[0096] The UTM hemisphere notation is (51, 'N', 317483.0, 3874870.0).

[0097] The latitude band representation is more detailed and provides more precise positioning, while the hemisphere representation is simpler and more direct, and is usually used in situations where the latitude band representation is not necessary or appropriate. In Python's mgrs package, the UTM coordinates provided are expressed in hemisphere representation.

[0098] It is worth noting that the first grid reference point can be understood as the reference point of the grid where the sampling point falls, and has a corresponding relationship with the grid index. From the above introduction to MGRS coordinates, it can be known that in the prior art, the grid index corresponds to the MGRS coordinates of the lower left corner vertex of the grid. Therefore, in this case, the first grid reference point in step S3 can be understood as the lower left corner vertex of the grid, and the direction offset value of the UTM coordinate includes the east offset value and the north offset value. Optionally, other points of the grid can also be used as reference points, such as the lower right corner vertex of the grid or the upper left corner vertex of the grid, and the direction offset value can also be the west offset value and the south offset value, or the east offset value and the south offset value, or the west offset value and the north offset value, etc.

[0099] Further, in order to illustrate step S3 and step S4, the rasterization method provided by the embodiment of the present invention is explained by taking point 1, point 2 and point 3 in the above example as an example. Figure 5 , is a flowchart of mapping longitude and latitude coordinates to grid indexes provided by an embodiment of the present invention, Figure 5 It can be seen that after obtaining the UTM coordinates of the sampling point, the easting offset value and the northing offset value of the UTM coordinates of the sampling point are rounded down to multiples of the grid precision (50) to obtain the UTM coordinates of the lower left corner vertex of the grid; then converted to MGRS coordinates, and then the easting offset value and the northing offset value of the MGRS coordinates of the lower left corner vertex of the grid are divided by the grid precision and rounded to obtain the grid index. The rounded UTM coordinates, MGRS coordinates, and grid index of points 1 to 3 are as follows:

[0100] Point 1, (50, 'N', 279150.0, 4430950.0), 50SKK7915030950, 50SKK-1583-619-50;

[0101] Point 2, (50, 'N', 279150.0, 4430950.0), 50SKK7915030950, 50SKK-1583-619-50;

[0102] Point 3, (50, 'N', 279150.0, 4430950.0), 50SKK7915030950, 50SKK-1583-619-50.

[0103] It can be seen from the above conversion results that the embodiment of the present invention uses the UTM coordinates as an intermediate bridge to map point 1, point 2 and point 3 to the same grid index, thereby solving the problem of a grid area being mistakenly identified as two grid identifiers when crossed by a latitude band boundary.

[0104] Compared with the prior art, the embodiment of the present invention performs data transformation at the UTM level instead of at the MGRS level, thereby ensuring the accuracy of the generated grid index and guaranteeing the quality of network optimization.

[0105] As an optional implementation manner, rounding down the direction offset value of the UTM coordinate of the sampling point to obtain the UTM coordinate of the first grid reference point includes:

[0106] The to-be-processed directional offset value of the UTM coordinate of the sampling point is rounded down to obtain the UTM coordinate of the first grid reference point; wherein the directional offset value of the UTM coordinate of the sampling point includes two directional offset values, and the to-be-processed directional offset value is a directional offset value whose value is not equal to a multiple of the preset grid precision;

[0107] When the two-directional offset values ​​of the UTM coordinates of the sampling point are both multiples of the preset grid accuracy, the UTM coordinates of the sampling point are used as the UTM coordinates of the first grid reference point.

[0108] It can be understood that the directional offset value of the UTM coordinates of the sampling point is rounded down, which can be understood as rounding it down to a multiple of the preset grid precision, and the rounding amplitude is less than the preset grid precision; if the directional offset value is a multiple of the preset grid precision, it is not necessary to round it down. It can be understood that because the directional offset value is rounded to a multiple of the preset grid precision, the point represented by the rounded UTM coordinates is a vertex of the grid. In the embodiment of the present invention, this point is also the reference point of the grid, that is, the vertex corresponding to the grid index.

[0109] Furthermore, in practical applications, in addition to rasterization, raster visualization is often required, wherein raster visualization can be understood as calculating the longitude and latitude coordinates of the center point of the raster and the four vertices of the raster according to the raster index. Compared with the prior art, the embodiments of the present invention can further ensure the correctness of subsequent raster visualization by correctly implementing rasterization, that is, calculating the correct raster index.

[0110] See also Figure 6 , is a flow chart of the prior art for calculating the longitude and latitude coordinates of the center point of a grid based on the grid index. Figure 6 It can be seen that the prior art first calculates the MGRS coordinates of the lower left corner vertex of the grid according to the grid index, and then adds the easting offset value and the northing offset value of the MGRS coordinates of the lower left corner vertex of the grid by half of the grid precision (grid side length) to obtain the MGRS coordinates of the center point of the grid. Finally, the MGRS coordinates of the center point of the grid are converted to obtain the longitude and latitude coordinates of the center point of the grid.

[0111] Then, according to Figure 6The method shown calculates the latitude and longitude coordinates of the center point of the grid where the sampling point Q is located:

[0112] According to the grid index 49RDQ-753-1142-50, the MGRS coordinates of the lower left corner of the grid can be calculated as 49RDQ3765057100; further, the easting offset value and the northing offset value of the MGRS coordinates of the lower left corner of the grid are added with half of the grid precision, that is, 25, respectively, and the MGRS coordinates of the center point of the grid are 49RDQ3767557125, which is converted to longitude and latitude coordinates (110.3454659, 31.2466758).

[0113] Further, see Figure 7 , is a flow chart of the prior art for calculating the longitude and latitude coordinates of the four vertices of a grid based on the grid index. Figure 7 It can be seen that the prior art first calculates the MGRS coordinates of the lower left vertex of the grid according to the grid index, and further converts them into longitude and latitude coordinates; then, the north offset value of the MGRS coordinates of the lower left vertex of the grid is added to the grid precision to obtain the MGRS coordinates of the upper left vertex of the grid, and further converts them into longitude and latitude coordinates; the east offset value of the MGRS coordinates of the lower left vertex of the grid is added to the grid precision to obtain the MGRS coordinates of the lower right vertex of the grid, and further converts them into longitude and latitude coordinates. The east offset value and the north offset value of the MGRS coordinates of the lower left vertex of the grid are respectively added to the grid precision to obtain the MGRS coordinates of the upper right vertex of the grid, and further convert them into longitude and latitude coordinates.

[0114] Then, according to Figure 7 The method shown calculates the latitude and longitude coordinates of the four vertices of the grid where the sampling point Q is located:

[0115] The military grid coordinates of the four vertices of the grid with grid index 49RDQ-753-1142-50 are:

[0116] lower left vertex, 49RDQ3765057100;

[0117] lower right vertex, 49RDQ3770057100;

[0118] top right vertex, 49RDQ3770057150;

[0119] top left vertex, 49RDQ3765057150;

[0120] Converted to longitude and latitude coordinates respectively:

[0121] The lower left vertex, (110.3452049, 31.2464489);

[0122] The lower right vertex, (110.3457300, 31.2464516);

[0123] The upper right vertex, (110.3457268, 31.2469027);

[0124] The upper left vertex is (110.3452018, 31.2469000).

[0125] Although the existing technology can realize grid visualization normally in most cases, it is found in the actual application process that when the existing method is used for calculation, sometimes wrong MGRS coordinates are obtained, and thus the correct latitude and longitude coordinates cannot be obtained, and grid visualization cannot be realized.

[0126] After research, it was found that this is because when performing coordinate transformation, it is difficult to determine whether the letters in the MGRS coordinates have changed, which may cause the calculated MGRS coordinates to be wrong.

[0127] Since the existing method cannot guarantee the correctness of grid visualization, this embodiment provides a solution, including the following steps:

[0128] Get the raster index to be visualized;

[0129] Calculate the MGRS coordinates of a second grid reference point according to the grid index to be visualized; wherein the second grid reference point is the grid reference point corresponding to the grid index to be visualized;

[0130] Converting the MGRS coordinates of the second grid reference point into UTM coordinates;

[0131] According to the preset grid accuracy, the UTM coordinates of the second grid reference point are shifted and transformed to obtain the UTM coordinates of the grid target point;

[0132] Convert the UTM coordinates of the grid target point into MGRS coordinates;

[0133] The MGRS coordinates of the grid target point are converted to obtain the latitude and longitude coordinates of the grid target point.

[0134] It can be understood that the raster index to be visualized can be a raster index calculated using the rasterization method provided in the embodiment of the present invention, such as the raster index calculated in step S5 in the above embodiment. The raster index to be visualized can also be other raster indexes that need to be visualized, which is not limited here.

[0135] As an optional implementation manner, the grid reference point is the lower left corner vertex of the grid, and the grid target point is the grid center point, the upper left corner vertex of the grid, the lower right corner vertex of the grid, or the upper right corner vertex of the grid.

[0136] As one optional implementation, the grid reference point is the lower left corner vertex of the grid, and the direction offset value includes an east offset value and a north offset value;

[0137] When the grid target point is a grid center point, the shifting transformation of the UTM coordinates of the second grid reference point according to the preset grid accuracy to obtain the UTM coordinates of the grid target point includes:

[0138] The easting offset value and the northing offset value of the UTM coordinates of the lower left corner vertex of the target grid are respectively added with half of the preset grid precision to obtain the UTM coordinates of the center point of the grid; wherein the lower left corner vertex of the target grid is the lower left corner vertex of the grid corresponding to the grid index to be visualized.

[0139] From the above content, it can be known that the method of the embodiment of the present invention can map point 1, point 2 and point 3 to the same grid index 50SKK-1583-619-50, and the grid index also represents the MGRS coordinates of the lower left corner vertex of the grid as 50SKK7915030950. If the MGRS coordinates of the center point of the grid are calculated according to the existing method, the east offset value and the north offset value need to be added with half of the grid precision, so that the MGRS coordinates of the center point of the grid are 50SKK7917530975. However, when converting the MGRS coordinates to longitude and latitude coordinates, the program will report an error. In addition, the actual MGRS coordinates of the center point of the grid should be 50TKK7917530975, because it is already located north of 40 degrees north latitude, so 50S becomes 50T. Therefore, the calculation of the center point of the grid using the existing method will be wrong.

[0140] See also Figure 8 , is a flow chart of calculating the longitude and latitude coordinates of the center point of a grid according to a grid index provided by an embodiment of the present invention. Figure 8It can be seen that the embodiment of the present invention first calculates the MGRS coordinates of the lower left corner vertex of the grid according to the grid index; then, the MGRS coordinates of the lower left corner vertex of the grid are converted into UTM coordinates; then, the easting offset value and the northing offset value of the UTM coordinates of the lower left corner vertex of the grid are respectively added with half of the grid precision (grid side length) to obtain the UTM coordinates of the center point of the grid; then, the UTM coordinates of the center point of the grid are converted into MGRS coordinates; finally, the MGRS coordinates of the center point of the grid are converted to obtain the longitude and latitude coordinates of the center point of the grid. That is, the idea of ​​calculating the center point of the grid in the embodiment of the present invention can be expressed as follows: grid index → ​​lower left corner MGRS → lower left corner UTM → grid center point UTM → grid center point MGRS → grid center point latitude and longitude coordinates; where "lower left corner MGRS" represents the MGRS coordinates of the lower left corner vertex of the grid; "lower left corner UTM" represents the UTM coordinates of the lower left corner vertex of the grid; "grid center point UTM" represents the UTM coordinates of the grid center point; "grid center point MGRS" represents the MGRS coordinates of the grid center point. It can be seen from this that compared with the prior art, the embodiment of the present invention performs data conversion at the UTM level, which can ensure the accuracy of the generated MGRS coordinates, and thus correctly realize grid visualization.

[0141] Exemplarily, the method provided in the embodiment of the present invention is used to calculate the coordinates of the center point of the grid with a grid index of 50SKK-1583-619-50. Specifically, the MGRS coordinates of the vertex of the lower left corner of the grid are 50SKK7915030950, and the UTM coordinates of the vertex of the lower left corner of the grid are (50, 'N', 279150.0, 4430950.0). The easting offset value and the northing offset value of the UTM coordinates are respectively added with half of the grid precision, and the UTM coordinates of the center point of the grid are obtained as (50, 'N', 279175.0, 4430975.0), which are converted into MGRS coordinates of 50TKK7917530975, and converted into longitude and latitude coordinates of (40.00011064800605, 114.41315660040982). It can be seen from this that the method provided by the embodiment of the present invention can accurately calculate the MGRS coordinates of the center point of the grid, avoiding errors when converting to longitude and latitude coordinates.

[0142] As one optional implementation, the grid reference point is the lower left corner vertex of the grid, and the direction offset value includes an east offset value and a north offset value;

[0143] When the grid target point is the upper left corner vertex of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid precision to obtain the UTM coordinates of the grid target point, including: adding the north offset value of the UTM coordinates of the lower left corner vertex of the target grid to the preset grid precision to obtain the UTM coordinates of the upper left corner vertex of the grid; wherein the lower left corner vertex of the target grid is the lower left corner vertex of the grid corresponding to the grid index to be visualized;

[0144] When the grid target point is the vertex at the lower right corner of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid precision to obtain the UTM coordinates of the grid target point, including: adding the preset grid precision to the easting offset value of the UTM coordinates of the vertex at the lower left corner of the target grid to obtain the UTM coordinates of the vertex at the lower right corner of the grid;

[0145] When the grid target point is the upper right corner vertex of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid accuracy to obtain the UTM coordinates of the grid target point, including: adding the preset grid accuracy to the easting offset value and the northing offset value of the UTM coordinates of the lower left corner vertex of the target grid to obtain the UTM coordinates of the upper right corner vertex of the grid.

[0146] It is worth noting that, taking the grid index 50SKK-1583-619-50 as an example, if the coordinates of the upper right corner vertex of the grid are calculated according to the existing method, the MGRS coordinates of the lower left corner vertex of the grid need to be calculated according to the grid index, and 50SKK7915030950 is obtained. Then, the easting offset value and the northing offset value of the MGRS coordinates of the lower left corner vertex of the grid are added to the grid precision, and the MGRS coordinates of the upper right corner vertex of the grid are obtained as 50SKK7920031000. However, the program will report an error when converting the MGRS coordinates to longitude and latitude coordinates. In addition, the actual MGRS coordinates of the upper right corner vertex of the grid should be 50TKK7920031000, because it is already located north of 40 degrees north latitude, so 50S becomes 50T. Therefore, the existing method will be wrong to calculate the upper right corner vertex of the grid.

[0147] Specifically, the idea of ​​calculating the upper right corner vertex of the grid in the embodiment of the present invention can be expressed as follows: grid index → ​​lower left corner MGRS → lower left corner UTM → upper right corner UTM → upper right corner MGRS → latitude and longitude coordinates of the upper right corner vertex of the grid; where "lower left corner MGRS" represents the MGRS coordinates of the lower left corner vertex of the grid; "lower left corner UTM" represents the UTM coordinates of the lower left corner vertex of the grid; "upper right corner UTM" represents the UTM coordinates of the upper right corner vertex of the grid; "upper right corner MGRS" represents the MGRS coordinates of the upper right corner vertex of the grid. It can be seen from this that compared with the prior art, the embodiment of the present invention performs data conversion at the UTM level, which can ensure the accuracy of the generated MGRS coordinates, and thus correctly realize grid visualization.

[0148] Further, see Fig. 9 , is a flow chart of calculating the longitude and latitude coordinates of four vertices of a grid according to a grid index provided by an embodiment of the present invention. Fig. 9 It can be seen that the embodiment of the present invention first calculates the MGRS coordinates of the lower left corner vertex of the grid according to the grid index, thereby calculating the longitude and latitude coordinates of the lower left corner vertex of the grid; then, the MGRS coordinates of the lower left corner vertex of the grid are converted into UTM coordinates; the northing offset value of the UTM coordinates is added to the grid precision to obtain the UTM coordinates of the upper left corner vertex of the grid, and further converted into MGRS coordinates and longitude and latitude coordinates; the easting offset value of the UTM coordinates of the lower left corner vertex of the grid is added to the grid precision to obtain the UTM coordinates of the lower right corner vertex of the grid, and further converted into MGRS coordinates and longitude and latitude coordinates; the easting offset value and the northing offset value of the UTM coordinates of the lower left corner vertex of the grid are respectively added to the grid precision to obtain the UTM coordinates of the upper right corner vertex of the grid, and further converted into MGRS coordinates and longitude and latitude coordinates.

[0149] Compared with the prior art, the embodiment of the present invention first converts the grid index into the MGRS coordinates and UTM coordinates of the lower left vertex of the grid when performing raster visualization, then performs data conversion at the UTM level to obtain the UTM coordinates of the target point, and then converts the UTM coordinates of the target point into MGRS coordinates and longitude and latitude coordinates. By performing data conversion at the UTM level, the correctness of the generated MGRS coordinates is guaranteed, ensuring that the grid index can be correctly converted into longitude and latitude coordinates, so that visualization can be correctly achieved.

[0150] Compared with the prior art, the rasterization method provided by the embodiment of the present invention obtains the longitude and latitude coordinates of the sampling point, and converts the longitude and latitude coordinates of the sampling point into MGRS coordinates; converts the MGRS coordinates of the sampling point into UTM coordinates; rounds down the direction offset value of the UTM coordinates of the sampling point to obtain the UTM coordinates of the first grid reference point; wherein the direction offset value of the UTM coordinates of the first grid reference point is a multiple of the preset grid precision, and the rounding amplitude is less than the preset grid precision; converts the UTM coordinates of the first grid reference point into MGRS coordinates; calculates the grid index of the sampling point according to the MGRS coordinates of the first grid reference point, so as to perform network optimization according to the grid index of the sampling point. The embodiment of the present invention uses the UTM coordinates as a bridge for coordinate conversion, performs data transformation at the UTM level, and does not perform data transformation at the MGRS level, so as to avoid the same grid from being split into multiple areas, ensure the accuracy of the generated grid index, and provide guarantee for subsequent network optimization.

[0151] See also Fig.10 The embodiment of the present invention further provides a rasterization device 10, comprising:

[0152] A first coordinate conversion module 11 is used to obtain the longitude and latitude coordinates of the sampling point and convert the longitude and latitude coordinates of the sampling point into MGRS coordinates;

[0153] A second coordinate conversion module 12, used to convert the MGRS coordinates of the sampling point into UTM coordinates;

[0154] The rounding module 13 is used to round down the directional offset value of the UTM coordinate of the sampling point to obtain the UTM coordinate of the first grid reference point; wherein the directional offset value of the UTM coordinate of the first grid reference point is a multiple of a preset grid precision, and the amplitude of rounding down is less than the preset grid precision, and the first grid reference point is the grid reference point corresponding to the sampling point;

[0155] A third coordinate conversion module 14, configured to convert the UTM coordinates of the first grid reference point into MGRS coordinates;

[0156] The grid index calculation module 15 is used to calculate the grid index of the sampling point according to the MGRS coordinates of the first grid reference point, so as to perform network optimization according to the grid index of the sampling point.

[0157] As an optional implementation manner, the rasterization device 10 further includes a target point coordinate calculation module, which is used to:

[0158] Get the raster index to be visualized;

[0159] Calculate the MGRS coordinates of a second grid reference point according to the grid index to be visualized; wherein the second grid reference point is the grid reference point corresponding to the grid index to be visualized;

[0160] Converting the MGRS coordinates of the second grid reference point into UTM coordinates;

[0161] According to the preset grid accuracy, the UTM coordinates of the second grid reference point are shifted and transformed to obtain the UTM coordinates of the grid target point;

[0162] Convert the UTM coordinates of the grid target point into MGRS coordinates;

[0163] The MGRS coordinates of the grid target point are converted to obtain the latitude and longitude coordinates of the grid target point.

[0164] As an optional implementation manner, the grid reference point is the lower left corner vertex of the grid, and the grid target point is the grid center point, the upper left corner vertex of the grid, the lower right corner vertex of the grid, or the upper right corner vertex of the grid.

[0165] As an optional implementation manner, the rounding module 13 is specifically used for:

[0166] The to-be-processed directional offset value of the UTM coordinate of the sampling point is rounded down to obtain the UTM coordinate of the first grid reference point; wherein the directional offset value of the UTM coordinate of the sampling point includes two directional offset values, and the to-be-processed directional offset value is a directional offset value whose value is not equal to a multiple of the preset grid precision;

[0167] When the two-directional offset values ​​of the UTM coordinates of the sampling point are both multiples of the preset grid accuracy, the UTM coordinates of the sampling point are used as the UTM coordinates of the first grid reference point.

[0168] As an optional implementation manner, the second grid reference point is the lower left corner vertex of the grid, and the direction offset value includes an east offset value and a north offset value; then, the target point coordinate calculation module is specifically used to:

[0169] When the grid target point is a grid center point, the shifting transformation of the UTM coordinates of the second grid reference point according to the preset grid accuracy to obtain the UTM coordinates of the grid target point includes:

[0170] The easting offset value and the northing offset value of the UTM coordinates of the lower left corner vertex of the target grid are respectively added with half of the preset grid precision to obtain the UTM coordinates of the center point of the grid; wherein the lower left corner vertex of the target grid is the lower left corner vertex of the grid corresponding to the grid index to be visualized.

[0171] As one optional implementation, the grid reference point is the lower left corner vertex of the grid, and the direction offset value includes an east offset value and a north offset value; then, the target point coordinate calculation module is specifically used to:

[0172] When the grid target point is the upper left corner vertex of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid precision to obtain the UTM coordinates of the grid target point, including: adding the north offset value of the UTM coordinates of the lower left corner vertex of the target grid to the preset grid precision to obtain the UTM coordinates of the upper left corner vertex of the grid; wherein the lower left corner vertex of the target grid is the lower left corner vertex of the grid corresponding to the grid index to be visualized;

[0173] When the grid target point is the vertex at the lower right corner of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid precision to obtain the UTM coordinates of the grid target point, including: adding the preset grid precision to the easting offset value of the UTM coordinates of the vertex at the lower left corner of the target grid to obtain the UTM coordinates of the vertex at the lower right corner of the grid;

[0174] When the grid target point is the upper right corner vertex of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid accuracy to obtain the UTM coordinates of the grid target point, including: adding the preset grid accuracy to the easting offset value and the northing offset value of the UTM coordinates of the lower left corner vertex of the target grid to obtain the UTM coordinates of the upper right corner vertex of the grid.

[0175] The rasterization device provided in the embodiment of the present invention can implement all the process steps of the rasterization method described in the above embodiment. The functions of each module and unit in the device and the technical effects achieved are respectively the same as the functions and technical effects achieved by the rasterization method described in the above embodiment, and the specific implementation method will not be repeated here.

[0176] See also Fig.11 The embodiment of the present invention further provides a rasterization device 20, comprising a processor 21, a memory 22, and a computer program stored in the memory and configured to be executed by the processor 21. When the processor 21 executes the computer program, the steps in the above rasterization method embodiment are implemented, for example Figure 6 or, the processor implements the functions of each module in the above-mentioned device embodiments when executing the computer program.

[0177] Exemplarily, the computer program may be divided into one or more modules, which are stored in the memory 22 and executed by the processor 21 to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the rasterization device. For example, the computer program may be divided into multiple modules, and the specific functions of each module are as follows:

[0178] A first coordinate conversion module 11 is used to obtain the longitude and latitude coordinates of the sampling point and convert the longitude and latitude coordinates of the sampling point into MGRS coordinates;

[0179] A second coordinate conversion module 12, used to convert the MGRS coordinates of the sampling point into UTM coordinates;

[0180] The rounding module 13 is used to round down the directional offset value of the UTM coordinate of the sampling point to obtain the UTM coordinate of the first grid reference point; wherein the directional offset value of the UTM coordinate of the first grid reference point is a multiple of a preset grid precision, and the amplitude of rounding down is less than the preset grid precision, and the first grid reference point is the grid reference point corresponding to the sampling point;

[0181] A third coordinate conversion module 14, configured to convert the UTM coordinates of the first grid reference point into MGRS coordinates;

[0182] The grid index calculation module 15 is used to calculate the grid index of the sampling point according to the MGRS coordinates of the first grid reference point, so as to perform network optimization according to the grid index of the sampling point.

[0183] The specific working process of each module can refer to the working process of the gridding device described in the above embodiment, which will not be repeated here.

[0184] The rasterization device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The rasterization device may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art may understand that the rasterization device may also include an input / output device, a network access device, a bus, etc.

[0185] The processor 21 may be a central processing unit (CPU), or 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. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 21 is the control center of the gridding device, and uses various interfaces and lines to connect various parts of the entire gridding device.

[0186] The memory 22 can be used to store the computer program and / or module. The processor 21 realizes various functions of the rasterization device by running or executing the computer program and / or module stored in the memory 22 and calling the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0187] Wherein, if the module integrated in the rasterization device 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 an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 21, the steps of the above-mentioned method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code 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, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0188] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the rasterization method as described in any one of the above-mentioned embodiments is implemented.

[0189] Compared with the prior art, the gridding device, equipment, storage medium and product provided by the embodiment of the present invention obtain the longitude and latitude coordinates of the sampling point, and convert the longitude and latitude coordinates of the sampling point into MGRS coordinates; convert the MGRS coordinates of the sampling point into UTM coordinates; round down the direction offset value of the UTM coordinates of the sampling point to obtain the UTM coordinates of the first grid reference point; wherein the direction offset value of the UTM coordinates of the first grid reference point is a multiple of the preset grid precision, and the rounding amplitude is less than the preset grid precision; convert the UTM coordinates of the first grid reference point into MGRS coordinates; calculate the grid index of the sampling point according to the MGRS coordinates of the first grid reference point, so as to optimize the network according to the grid index of the sampling point. The embodiment of the present invention uses the UTM coordinates as a bridge for coordinate conversion, performs data transformation at the UTM level, and does not perform data transformation at the MGRS level, so as to avoid the same grid from being split into multiple areas, ensure the accuracy of the generated grid index, and provide guarantee for subsequent network optimization.

[0190] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A rasterization method, characterized in that: include: Obtain the latitude and longitude coordinates of the sampling point, and convert the latitude and longitude coordinates of the sampling point into MGRS coordinates; Convert the MGRS coordinates of the sampling points into UTM coordinates; The directional offset value of the UTM coordinate of the sampling point is rounded down to obtain the UTM coordinate of the first grid reference point; wherein the directional offset value of the UTM coordinate of the first grid reference point is a multiple of a preset grid precision, and the amplitude of rounding down is less than the preset grid precision, and the first grid reference point is the grid reference point corresponding to the sampling point; Converting the UTM coordinates of the first grid reference point into MGRS coordinates; The grid index of the sampling point is calculated according to the MGRS coordinates of the first grid reference point, so as to perform network optimization according to the grid index of the sampling point.

2. The rasterization method according to claim 1, characterized in that: Also includes: Get the raster index to be visualized; Calculate the MGRS coordinates of a second grid reference point according to the grid index to be visualized; wherein the second grid reference point is the grid reference point corresponding to the grid index to be visualized; Converting the MGRS coordinates of the second grid reference point into UTM coordinates; According to the preset grid accuracy, the UTM coordinates of the second grid reference point are shifted and transformed to obtain the UTM coordinates of the grid target point; Convert the UTM coordinates of the grid target point into MGRS coordinates; The MGRS coordinates of the grid target point are converted to obtain the latitude and longitude coordinates of the grid target point.

3. The rasterization method according to claim 2, characterized in that: The grid reference point is the grid lower left corner vertex, and the grid target point is the grid center point, the grid upper left corner vertex, the grid lower right corner vertex or the grid upper right corner vertex.

4. The rasterization method according to claim 1, characterized in that: The step of rounding down the directional offset value of the UTM coordinate of the sampling point to obtain the UTM coordinate of the first grid reference point includes: The to-be-processed directional offset value of the UTM coordinate of the sampling point is rounded down to obtain the UTM coordinate of the first grid reference point; wherein the directional offset value of the UTM coordinate of the sampling point includes two directional offset values, and the to-be-processed directional offset value is a directional offset value whose value is not equal to a multiple of the preset grid precision; When the two-directional offset values ​​of the UTM coordinates of the sampling point are both multiples of the preset grid accuracy, the UTM coordinates of the sampling point are used as the UTM coordinates of the first grid reference point.

5. The rasterization method according to claim 2, characterized in that: The grid reference point is the lower left corner vertex of the grid, and the direction offset value includes an east offset value and a north offset value; When the grid target point is a grid center point, the shifting transformation of the UTM coordinates of the second grid reference point according to the preset grid accuracy to obtain the UTM coordinates of the grid target point includes: The easting offset value and the northing offset value of the UTM coordinates of the lower left corner vertex of the target grid are respectively added with half of the preset grid precision to obtain the UTM coordinates of the center point of the grid; wherein the lower left corner vertex of the target grid is the lower left corner vertex of the grid corresponding to the grid index to be visualized.

6. The rasterization method according to claim 2, characterized in that: The grid reference point is the lower left corner vertex of the grid, and the direction offset value includes an east offset value and a north offset value; When the grid target point is the upper left corner vertex of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid precision to obtain the UTM coordinates of the grid target point, including: adding the north offset value of the UTM coordinates of the lower left corner vertex of the target grid to the preset grid precision to obtain the UTM coordinates of the upper left corner vertex of the grid; wherein the lower left corner vertex of the target grid is the lower left corner vertex of the grid corresponding to the grid index to be visualized; When the grid target point is the vertex at the lower right corner of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid precision to obtain the UTM coordinates of the grid target point, including: adding the preset grid precision to the easting offset value of the UTM coordinates of the vertex at the lower left corner of the target grid to obtain the UTM coordinates of the vertex at the lower right corner of the grid; When the grid target point is the upper right corner vertex of the grid, the UTM coordinates of the second grid reference point are shifted and transformed according to the preset grid accuracy to obtain the UTM coordinates of the grid target point, including: adding the preset grid accuracy to the easting offset value and the northing offset value of the UTM coordinates of the lower left corner vertex of the target grid to obtain the UTM coordinates of the upper right corner vertex of the grid.

7. A rasterization device, characterized in that: include: The first coordinate conversion module is used to obtain the longitude and latitude coordinates of the sampling point and convert the longitude and latitude coordinates of the sampling point into MGRS coordinates; A second coordinate conversion module, used to convert the MGRS coordinates of the sampling point into UTM coordinates; A rounding module, used for rounding down the directional offset value of the UTM coordinate of the sampling point to obtain the UTM coordinate of the first grid reference point; wherein the directional offset value of the UTM coordinate of the first grid reference point is a multiple of a preset grid precision, the amplitude of rounding down is less than the preset grid precision, and the first grid reference point is the grid reference point corresponding to the sampling point; A third coordinate conversion module, used to convert the UTM coordinates of the first grid reference point into MGRS coordinates; The grid index calculation module is used to calculate the grid index of the sampling point according to the MGRS coordinates of the first grid reference point, so as to perform network optimization according to the grid index of the sampling point.

8. A rasterization device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the rasterization method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the rasterization method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the rasterization method according to any one of claims 1 to 6 is implemented.