RGB terrain loading method and device for Cesium and electronic equipment

By converting RGB tile data into height data, generating a geometric error map, and filtering control points, the Delaunay algorithm is used to generate an accurate terrain triangulation network, which solves the problems of terrain data distortion and poor sharp transitions in Cesium software and improves the quality of terrain rendering.

CN121901348APending Publication Date: 2026-04-21HANGZHOU JINGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In Cesium software, the elevation of .terrain format tile data in terrain files cannot be easily obtained, and data distortion and issues with sharp triangulation and poor transition occur when loading at higher levels.

Method used

RGB tile data is converted into height data to generate a geometric error map. Control points are selected, and an irregular triangular mesh is generated using the Delaunay algorithm. Sample control points are then inserted according to the empty circumcircle criterion to generate an accurate terrain triangular mesh.

Benefits of technology

It solves the problem of data distortion, increases the coverage density of terrain triangulation, reduces the tilt angle between triangulations, and improves the transition effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901348A_ABST
    Figure CN121901348A_ABST
Patent Text Reader

Abstract

The invention relates to an RGB terrain loading method and device for Cesium and electronic equipment. The method comprises the steps of converting RGB tile data into height data, generating a geometric error graph based on the height data, screening out control points from the geometric error graph, generating a terrain triangulation network based on the control points, and performing terrain drawing according to the terrain triangulation network. The control points are screened out from the generated geometric error graph, and the more accurate terrain triangulation network is generated based on the screened control points, so that the defect of data distortion in the prior art is overcome, in addition, the coverage density is improved by increasing the number of the terrain triangulation networks, the inclination angle between the terrain triangulation networks is reduced, and the accuracy of the terrain triangulation network is improved. Therefore, the problems of sharpness and unsmooth transition of the existing triangulation network are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of three-dimensional imaging, and in particular to an RGB terrain loading method, apparatus, and electronic device for Cesium. Background Technology

[0002] Currently, the terrain files in Cesium software are tile data in the .terrain format. This data is pre-processed grid data, which cannot be used to easily obtain the elevation of a certain coordinate. At the same time, the Cesium terrain data format is not well supported by other map engines, resulting in data inconsistency.

[0003] Currently, loading RGB format terrain in Cesium requires data parsing and triangulation generation using the RTIN algorithm. In Cesium, the RTIN algorithm causes data distortion when the terrain tile level is greater than 11. In addition, the generated triangulation also has problems such as sharpness and poor transition. Summary of the Invention

[0004] This application provides an RGB terrain loading method, apparatus, and electronic device for Cesium, which at least solves the problem of sharpness and poor transition in triangular meshes in related technologies.

[0005] In a first aspect, embodiments of this application provide an RGB terrain loading method for Cesium, including: Convert RGB tile data into height data; A geometric error map is generated based on the height data, control points are selected from the geometric error map, and a terrain triangulation network is generated based on the control points. Terrain is drawn based on the terrain triangulation network.

[0006] In one embodiment, converting RGB tile data into height data includes: Get the current level, and get the RGB tile data corresponding to the current level; The corresponding height data is obtained by parsing the RGB tile data.

[0007] In one embodiment, parsing the RGB tile data to obtain the corresponding height data includes: Obtain the pixel buffer of the RGB tile data through the created canvas; Extract the pixel data from the pixel buffer, and substitute the pixel data into Formula 1 to obtain the height data.

[0008] Formula 1, In the formula, , , These are the values ​​corresponding to red, green, and blue in the pixel data.

[0009] In one embodiment, the step of generating a geometric error map based on the altitude data, selecting control points from the geometric error map, and generating a terrain triangulation network based on the control points includes: Calculate the geometric error data for each of the height data, and generate the geometric error map based on the geometric error data; The control points are obtained by filtering the geometric error map using an error threshold. Execute the Delaunay algorithm to generate an irregular triangular mesh; Select sample control points independent of the irregular triangular network, determine sample triangles containing the sample control points, determine the primary triangles of the sample triangles based on the empty circumcircle criterion, and insert the sample control points into the irregular triangular network according to the determination results to generate the terrain triangular network.

[0010] In one embodiment, the step of filtering the geometric error map using an error threshold to obtain the control points includes: Step 1: Divide the geometric error map into a preset number of regions, and calculate the maximum error value of the geometric error data in each region; Step 2: If the maximum error value is greater than the error threshold, the region corresponding to the maximum error value will be split; otherwise, the region will remain unchanged. Step 3: Repeat step 2. When all regions remain unchanged, take the point corresponding to the maximum error value in each region as the control point.

[0011] In one embodiment, the step of selecting sample control points independent of the irregular triangular network, determining sample triangles containing the sample control points, judging the primary triangles of the sample triangles based on the empty circumcircle criterion, and inserting the sample control points into the irregular triangular network to generate the terrain triangular network according to the judgment result includes: Select sample control points that are independent of the irregular triangular network from the control points, and determine the sample triangle that contains the sample control points according to the triangle inclusion rule; Connect the sample control point to the three vertices of the sample triangle to obtain four adjacent primary triangles. Determine the secondary triangles adjacent to each primary triangle and determine whether the quadrilateral formed by the primary triangle and the adjacent secondary triangle satisfies the empty circumcircle criterion. If the conditions are not met, the diagonal of the quadrilateral is flipped to complete the operation of inserting the sample control point into the irregular triangular mesh.

[0012] In one embodiment, it further includes: Calculate the angle value of the secondary triangle. If the angle value is greater than the angle threshold, perform a control point re-insertion operation.

[0013] Secondly, embodiments of this application provide an RGB terrain loading device for Cesium, comprising: The data conversion module is used to convert RGB tile data into height data; The triangulation generation module is used to generate a geometric error map based on the height data, select control points from the geometric error map, and generate a terrain triangulation based on the control points. The terrain drawing module is used to draw terrain based on the terrain triangulation network.

[0014] Thirdly, embodiments of this application provide a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the RGB terrain loading method for Cesium as described in the first aspect above.

[0015] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the RGB terrain loading method for Cesium as described in the first aspect above.

[0016] The RGB terrain loading method, apparatus, and electronic device for Cesium provided in this application embodiment have at least the following technical effects: Control points are selected from the generated geometric error map, and a more accurate terrain triangulation network is generated based on the selected control points, thereby solving the defects of data distortion in the existing technology. In addition, the coverage density is increased by increasing the number of terrain triangulation networks, and the tilt angle between terrain triangulation networks is reduced, thereby solving the problems of sharpness and poor transition in the existing triangulation networks.

[0017] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart illustrating an RGB terrain loading method for Cesium provided in an embodiment of this application; Figure 2 This is a flowchart illustrating step S10 provided in an embodiment of this application; Figure 3 This is a flowchart illustrating step S20 provided in an embodiment of this application; Figure 4 This is a geometric error diagram provided in the embodiments of this application; Figure 5 This is a schematic diagram of the re-insertion control point provided in an embodiment of this application; Figure 6 This is a structural block diagram of an RGB terrain loading device for Cesium provided in an embodiment of this application; Figure 7 This is a structural diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0020] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0021] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0022] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0023] Firstly, embodiments of this application provide an RGB terrain loading method for Cesium. Figure 1 This is a flowchart of the method, such as... Figure 1 As shown, the RGB terrain loading method used in Cesium specifically includes: Step S10: Convert the RGB tile data into height data.

[0024] Step S20: Generate a geometric error map based on the elevation data, select control points from the geometric error map, and generate a terrain triangulation network based on the control points.

[0025] Step S30: Draw the terrain based on the terrain triangulation network.

[0026] By performing the above steps, control points are selected from the generated geometric error map. Based on the selected control points, a more accurate terrain triangulation network is generated, thereby solving the problem of data distortion in the existing technology. In addition, by increasing the number of terrain triangulation networks, the coverage density is increased, and the tilt angle between terrain triangulation networks is reduced, thereby solving the problems of sharpness and poor transition in the existing triangulation networks.

[0027] In one embodiment, such as Figure 2 As shown, step S10 includes: Step S101: Obtain the current level and the RGB tile data corresponding to the current level.

[0028] Among them, RGB tiles are usually geographic image tiles (such as TMS and WMTS formats), which are essentially PNG / JPG format images (JPG has no alpha channel, while PNG may have one). Pixel data is stored in the order of R (red), G (green), B (blue), and A (transparent) (each channel takes a value of 0-255).

[0029] Pixel Buffer: This is a Uint8ClampedArray type array with a length equal to the tile width × tile height × 4 (RGBA). It is a pixel data format natively supported by Canvas and can be directly used for subsequent processing (such as analysis, transfer, and GPU computation).

[0030] In implementation, in response to requests from the map drawing process, the system retrieves the RGB tile data corresponding to the current layer. Each set of RGB tile data corresponds to one RGB terrain tile, and each RGB terrain tile is an image containing 256*256 pixels. The pixel value corresponding to each pixel needs to be converted into height data.

[0031] Step S102: Parse the RGB tile data to obtain the corresponding height data.

[0032] In practice, the parsing process is as follows: (1) Obtain the pixel buffer of RGB tile data through the created canvas.

[0033] The process of obtaining the pixel buffer of the RGB tile through the canvas (essentially reading a pixel array in Uint8ClampedArray format, containing RGBA channel data) is "loading the tile → drawing to the canvas → reading pixel data → extracting the RGB channels".

[0034] (2) Extract the pixel data from the pixel buffer and substitute the pixel data into Formula 1 to obtain the height data.

[0035] Formula 1, In the formula, , , These are the values ​​for red, green, and blue in the pixel data, respectively.

[0036] In one embodiment, such as Figure 3 As shown, step S20 includes: Step S201: Calculate the geometric error data for each height data, and generate a geometric error map based on the geometric error data.

[0037] In implementation, the wasm code is imported and a worker thread is started. The worker thread obtains the height data generated in step S10, calculates the geometric error of all height data, and generates a geometric error map, as shown in the figure. Figure 4 As shown.

[0038] The core logic of generating geometric error maps based on height data is as follows: first, calculate the deviation (geometric error) between the "actual height" and the "reference height" of each pixel; then, map the error values ​​to visual colors (such as heatmaps); and finally, generate an image using Canvas. Geometric error maps are commonly used in scenarios such as terrain simplification quality assessment and 3D model accuracy verification. The core process is "error quantification → color encoding → visual presentation." The specific steps for generating geometric error maps include: (1) Calculate the geometric error pixel by pixel.

[0039] (2) Normalize the geometric error.

[0040] (3) Perform color mapping operation on the processed geometric error data.

[0041] (4) In the canvas, call putImageData to draw the geometric error map based on the color data stored in ImageData.

[0042] Step S202: The geometric error map is filtered by an error threshold to obtain control points.

[0043] In practice, the process of selecting control points is as follows: Step 1: Divide the geometric error map into a preset number of regions and calculate the maximum error value of the geometric error data in each region.

[0044] Step 2: If the maximum error value is greater than the error threshold, the region corresponding to the maximum error value will be split; otherwise, the region will remain unchanged.

[0045] Step 3: Repeat step 2. When all regions remain unchanged, take the point corresponding to the maximum error value in each region as the control point.

[0046] For example, the entire geometric error map is used as the root node, and each region is recursively divided into four sub-regions. For each sub-region, the maximum value of its internal error is calculated. If the maximum error value is greater than the error threshold, the division continues; otherwise, it is considered flat. Finally, for each sub-region, the point with the largest error is selected as the control point.

[0047] It's important to note that the points in the geometric error map are essentially the pixels of the geometric error map itself. For example, if the image is 256*256 pixels, the geometric error map is considered to have 256*256 points. The point with the largest error in each sub-region is selected as the control point using an error threshold. This error threshold can be adjusted arbitrarily; a smaller threshold results in a more accurate triangulation.

[0048] Step S203: Execute the Delaunay algorithm to generate an irregular triangular network.

[0049] In practice, a Delaunay triangulation is a set of connected but non-overlapping triangles, characterized in that the circumcircle of each triangle does not contain any other points. Delaunay triangulations possess two important properties: the empty circumcircle property and the maximum and minimum angle property.

[0050] The algorithm steps are as follows: (1) Select the two closest points from the point set as the initial side, and then find the third point of the triangle formed by this side. This point should satisfy the condition that the circumcircle does not contain other points, and make the minimum angle of the triangle the largest.

[0051] (2) Take an edge from the edge table and find the third point that forms a triangle with this edge. This point should satisfy the condition that the circumcircle of the edge does not contain any other points and maximizes the minimum angle of the triangle.

[0052] (3) Integrate the above steps to construct a complete Delaunay triangulation.

[0053] By following the steps above, a triangulation network that meets the Delaunay condition can be generated, ensuring that the circumcircle of each triangle does not contain other points and maximizing the minimum angle.

[0054] Step S204: Select sample control points independent of the irregular triangular network, determine the sample triangles containing the sample control points, determine the primary triangles of the sample triangles based on the empty circumcircle criterion, and insert the sample control points into the irregular triangular network to generate the terrain triangular network according to the determination results.

[0055] In implementation, the generated terrain triangulation network includes: (1) Select sample control points that are independent of the irregular triangular network from the control points, and determine the sample triangle containing the sample control points according to the triangle inclusion rule; (2) Connect the sample control point to the three vertices of the sample triangle to obtain four adjacent primary triangles, determine the secondary triangles adjacent to each primary triangle, and determine whether the quadrilateral formed by the primary triangle and the adjacent secondary triangle satisfies the empty circumcircle criterion. (3) If the condition is not met, the diagonal of the quadrilateral is flipped to complete the operation of inserting the sample control point into the irregular triangular mesh.

[0056] For example, take a point p from the control points that has not yet been added to the triangulation, find the triangle in the current triangulation that contains point p, connect point p to the three vertices of the triangle containing it, thereby dividing the triangle into three new small triangles. Then check whether the newly generated triangle and its adjacent triangles satisfy the empty circumcircle criterion. If not, "flip" the diagonal of this quadrilateral. Repeat step 3 until all control points are inserted into the triangulation.

[0057] In one embodiment, it further includes: Calculate the angle value of the secondary triangle. If the angle value is greater than the angle threshold, perform a control point re-insertion operation.

[0058] like Figure 5 As shown in the attached diagram, the method for calculating the re-insertion control points is as follows. Figure 3 There are four points in space: p1, p2, p3, and p4. These four points form two triangulations, and p2-p3 are collinear edges of the two triangulations. The newly inserted p' is the midpoint of the collinear edge, and its height is the average height of the four points.

[0059] After re-inserting control points, the original two triangulations consisting of four control points (p1-p4) become four triangulations. Since the height of point p' is the average height of the other four points, neither of these four triangulations will be coplanar. Because the height of point p' is the average height, it must be higher than the two points with the lower height among the four points. At this point, the slope of the terrain formed by the four triangulations is lower than that formed by the two triangulations, and the triangulation density is also greater.

[0060] Secondly, embodiments of this application provide an RGB terrain loading device 600 for Cesium. Figure 6 This is a block diagram showing an RGB terrain loading device for Cesium. (See diagram for example.) Figure 6 As shown, the device includes: Data conversion module 610 is used to convert RGB tile data into height data; The triangulation generation module 620 is used to generate a geometric error map based on elevation data, select control points from the geometric error map, and generate a terrain triangulation based on the control points. The terrain drawing module 630 is used to draw terrain based on the terrain triangulation network.

[0061] The RGB terrain loading device for Cesium provided in this application, by performing the above steps, selects control points in the generated geometric error map, and generates a more accurate terrain triangulation based on the selected control points, thereby solving the defect of data distortion in the prior art. In addition, by increasing the number of terrain triangulations, the coverage density is increased, and the tilt angle between terrain triangulations is reduced, thereby solving the problem of sharpness and poor transition in the existing triangulations.

[0062] It should be noted that the RGB terrain loading device for Cesium provided in this embodiment is used to implement the above-described embodiments, and details already described will not be repeated. As used above, terms such as "module," "unit," and "subunit" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the above embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0063] Thirdly, embodiments of this application provide an electronic device, Figure 7 This is a block diagram illustrating an electronic device according to an exemplary embodiment. (e.g.) Figure 7 As shown, the electronic device may include a processor 71 and a memory 72 storing computer program instructions.

[0064] Specifically, the processor 71 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0065] The memory 72 may include a mass storage device for data or instructions. For example, and not limitingly, the memory 72 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 72 may include removable or non-removable (or fixed) media. Where appropriate, the memory 72 may be internal or external to a data processing device. In a particular embodiment, the memory 72 is non-volatile memory. In a particular embodiment, the memory 72 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.

[0066] The memory 72 can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 71.

[0067] The processor 71 implements any of the RGB terrain loading methods for Cesium described above by reading and executing computer program instructions stored in the memory 72.

[0068] In one embodiment, the electronic device may further include a communication interface 73 and a bus 70. Wherein, as... Figure 7 As shown, the processor 71, memory 72, and communication interface 73 are connected through bus 70 and complete communication with each other.

[0069] The communication interface 73 is used to enable communication between the various modules, devices, units, and / or equipment in the embodiments of this application. The communication port 73 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.

[0070] Bus 70 includes hardware, software, or both, that couples the components of the electronic device together. Bus 70 includes, but is not limited to, at least one of the following: data bus, address bus, control bus, expansion bus, and local bus. For example, and not as a limitation, bus 70 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 70 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.

[0071] Fourthly, embodiments of this application provide a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the RGB terrain loading method for Cesium provided in the first aspect.

[0072] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0073] In a possible implementation, the invention can also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform steps implementing the RGB terrain loading method for Cesium provided in the first aspect.

[0074] The program code for executing the present invention can be written in any combination of one or more programming languages. The program code can be executed entirely on the user device, partially on the user device, as a standalone software package, partially on the user device and partially on a remote device, or entirely on a remote device.

[0075] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0076] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for loading RGB terrain for Cesium, characterized in that, include: Convert RGB tile data into height data; A geometric error map is generated based on the height data, control points are selected from the geometric error map, and a terrain triangulation network is generated based on the control points. Terrain is drawn based on the terrain triangulation network.

2. The RGB terrain loading method for Cesium according to claim 1, characterized in that, The process of converting RGB tile data into height data includes: Get the current level, and get the RGB tile data corresponding to the current level; The corresponding height data is obtained by parsing the RGB tile data.

3. The RGB terrain loading method for Cesium according to claim 2, characterized in that, The step of parsing the RGB tile data to obtain the corresponding height data includes: Obtain the pixel buffer of the RGB tile data through the created canvas; Extract the pixel data from the pixel buffer, and substitute the pixel data into Formula 1 to obtain the height data. Formula 1, In the formula, , , These are the values ​​corresponding to red, green, and blue in the pixel data.

4. The RGB terrain loading method for Cesium according to claim 1, characterized in that, The process of generating a geometric error map based on the altitude data, selecting control points from the geometric error map, and generating a terrain triangulation network based on the control points includes: Calculate the geometric error data for each of the height data, and generate the geometric error map based on the geometric error data; The control points are obtained by filtering the geometric error map using an error threshold. Execute the Delaunay algorithm to generate an irregular triangular mesh; Select sample control points independent of the irregular triangular network, determine sample triangles containing the sample control points, determine the primary triangles of the sample triangles based on the empty circumcircle criterion, and insert the sample control points into the irregular triangular network according to the determination results to generate the terrain triangular network.

5. The RGB terrain loading method for Cesium according to claim 4, characterized in that, The step of filtering the geometric error map using an error threshold to obtain the control points includes: Step 1: Divide the geometric error map into a preset number of regions, and calculate the maximum error value of the geometric error data in each region; Step 2: If the maximum error value is greater than the error threshold, the region corresponding to the maximum error value will be split; otherwise, the region will remain unchanged. Step 3: Repeat step 2. When all regions remain unchanged, take the point corresponding to the maximum error value in each region as the control point.

6. The RGB terrain loading method for Cesium according to claim 4, characterized in that, The steps include selecting sample control points independent of the irregular triangular network, determining sample triangles containing the sample control points, judging the primary triangles of the sample triangles based on the empty circumcircle criterion, and inserting the sample control points into the irregular triangular network to generate the terrain triangular network according to the judgment result. Select sample control points that are independent of the irregular triangular network from the control points, and determine the sample triangle that contains the sample control points according to the triangle inclusion rule; Connect the sample control point to the three vertices of the sample triangle to obtain four adjacent primary triangles. Determine the secondary triangles adjacent to each primary triangle and determine whether the quadrilateral formed by the primary triangle and the adjacent secondary triangle satisfies the empty circumcircle criterion. If the conditions are not met, the diagonal of the quadrilateral is flipped to complete the operation of inserting the sample control point into the irregular triangular mesh.

7. The RGB terrain loading method for Cesium according to claim 6, characterized in that, Also includes: Calculate the angle value of the secondary triangle. If the angle value is greater than the angle threshold, perform a control point re-insertion operation.

8. An RGB terrain loading device for Cesium, characterized in that, include: The data conversion module is used to convert RGB tile data into height data; The triangulation generation module is used to generate a geometric error map based on the height data, select control points from the geometric error map, and generate a terrain triangulation based on the control points. The terrain drawing module is used to draw terrain based on the terrain triangulation network.

9. An electronic device, characterized in that, include: memory, processor, and A computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, implements the RGB terrain loading method for Cesium as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the RGB terrain loading method for Cesium as described in any one of claims 1 to 7.