Multi-source raster data merging method and device, storage medium and electronic equipment

By automating the processing of raster data of varying precision, the problem of low processing efficiency when raster data fails to fully cover the field of view is solved, achieving efficient merging and consistency of datasets and reducing reliance on manual operations.

CN121120969APending Publication Date: 2025-12-12JIULING (SHANGHAI) INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511219302.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

In existing technologies, when raster data fails to fully cover the required field of view, it is necessary to supplement other data sources manually, resulting in low processing efficiency and difficulty in ensuring the uniformity and reliability of the dataset.

Method used

By acquiring raster data of varying precision, the processing range is automatically determined, and resampling and data merging are performed to generate target raster data covering the entire field of view, reducing manual operations and improving the accuracy and efficiency of data processing.

Benefits of technology

It enables automated merging of raster data, reduces errors caused by manual operation, improves the accuracy and efficiency of data processing, and ensures the continuity and consistency of the dataset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121120969A_ABST
    Figure CN121120969A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-source raster data merging method and device, a storage medium and electronic equipment. Relates to the technical field of data processing, and the method comprises the following steps: obtaining first raster data with a first precision and second raster data with a second precision, the first precision being not lower than the second precision; processing according to a boundary range corresponding to the first raster data to obtain a first space range; acquiring third raster data corresponding to the first spatial range from the second raster data; and according to the third raster data and the first raster data, performing raster data processing and merging to obtain target raster data corresponding to the first spatial range. By means of the raster data processing method and device, the problem that in the related technology, when the raster data does not completely cover the needed vision field range, other data source data needs to be supplemented to the missing area in a manual mode, and consequently the processing efficiency of the raster data is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a multi-source raster data merging method and device, a storage medium and an electronic device. BACKGROUND

[0002] In the field of digital twin platforms and geographic information systems, it is crucial to ensure that the terrain base in the three-dimensional scene visualization seamlessly covers the user's field of view range. However, current technical bottlenecks limit the efficiency and quality of this process.

[0003] Specifically, when the Digital Elevation Model (DEM) and Digital Orthophoto Map (DOM) provided by the user fail to completely cover the required field of view, existing technologies rely on manual operations to supplement public data sources to the missing areas. This manual filling method not only consumes a lot of time, but also often causes height discontinuity at the edge when matching different data source accuracies, seriously affecting the visual continuity and realism of the three-dimensional terrain model. The complexity of manual processing lies in the need for multi-step operations using specialized software, including data cropping, coordinate conversion, and boundary smoothing, each step requiring precise settings and lacking automated connection between steps, often resulting in time waste and low efficiency.

[0004] In addition, manual boundary smoothing processing not only tests the operator's skills and patience, but also is difficult to ensure consistency and repeatability, and is easily affected by individual differences, affecting the uniformity of the final data set and the reliability of data quality.

[0005] To address the problem of low processing efficiency of raster data in related technologies when the raster data does not completely cover the required field of view range, an effective solution has not yet been proposed. SUMMARY

[0006] The main purpose of the present application is to provide a multi-source raster data merging method and device, a storage medium and an electronic device to solve the problem of low processing efficiency of raster data in related technologies when the raster data does not completely cover the required field of view range, which requires manual supplementation of other data source data to the missing areas.

[0007] In order to achieve the above object, according to one aspect of the present application, a method for merging multi-source raster data is provided. The method comprises: obtaining first raster data of a first precision and obtaining second raster data of a second precision, wherein the first precision is not lower than the second precision; processing a boundary range corresponding to the first raster data to obtain a first spatial range; obtaining third raster data corresponding to the first spatial range from the second raster data; and performing raster data processing and merging according to the third raster data and the first raster data to obtain target raster data corresponding to the first spatial range.

[0008] Further, the processing of the boundary range corresponding to the first raster data to obtain the first spatial range comprises: obtaining a maximum coordinate point and a minimum coordinate point in the first raster data; obtaining a minimum circumscribed rectangle range corresponding to the first raster data according to the maximum coordinate point and the minimum coordinate point; and performing outer expansion on the minimum circumscribed rectangle range according to a preset outer expansion range to obtain the first spatial range.

[0009] Further, the performing of raster data processing and merging according to the third raster data and the first raster data to obtain the target raster data corresponding to the first spatial range comprises: judging whether a preset target resampling precision exists; if the target resampling precision exists, performing resampling on the third raster data according to the target resampling precision to obtain resampled third raster data; performing resampling on the first raster data according to the target resampling precision to obtain resampled first raster data; and performing raster data processing and merging according to the resampled third raster data and the resampled first raster data to obtain the target raster data corresponding to the first spatial range.

[0010] Further, after judging whether the target resampling precision exists, the method further comprises: if the target resampling precision does not exist and the first precision is higher than the second precision, performing resampling on the third raster data according to the first precision to obtain resampled third raster data; and performing raster data processing and merging according to the resampled third raster data and the first raster data to obtain the target raster data corresponding to the first spatial range.

[0011] Further, the target grid data corresponding to the first spatial range is obtained by performing grid data processing and merging according to the third grid data and the first grid data, including: setting an empty file of a target format according to the first spatial range; filling the first grid data into a first region in the empty file, wherein the first region is a region where the first grid data exists; filling the third grid data corresponding to a second region into the empty file, wherein the second region is a region where the first grid data does not exist and the third grid data exists; determining fourth grid data corresponding to a third region according to the third grid data and the first grid data, and filling the fourth grid data corresponding to the third region into the empty file to obtain the target grid data, wherein the third region is an intersection region of the first region and the second region.

[0012] Further, the fourth grid data corresponding to the third region is determined according to the third grid data and the first grid data, including: for a target pixel point in the third region, obtaining initial grid data corresponding to adjacent pixel points corresponding to the target pixel point from the third grid data and the first grid data; calculating the fourth grid data corresponding to the target pixel point according to the initial grid data; and obtaining the fourth grid data corresponding to the third region according to the fourth grid data corresponding to the target pixel point.

[0013] Further, the fourth grid data corresponding to the third region is filled into the empty file to obtain the target grid data, including: filling the fourth grid data corresponding to the third region into the empty file to obtain fifth grid data; if the fifth grid data is digital elevation data, performing smoothing processing on the fifth grid data to obtain smoothed fifth grid data, and obtaining the target grid data according to the smoothed fifth grid data; if the fifth grid data is orthophoto data, obtaining the target grid data according to the fifth grid data.

[0014] Further, the fifth grid data is smoothed to obtain smoothed fifth grid data, including: extracting a boundary of the first grid data to obtain boundary line information; determining a to-be-smoothed region according to the boundary line information and a preset number of pixel points; and smoothing the fifth grid data corresponding to the to-be-smoothed region to obtain the smoothed fifth grid data.

[0015] In order to achieve the above object, according to another aspect of the present application, a device for merging multi-source raster data is provided. The device comprises: a first obtaining unit configured to obtain first raster data of a first precision and second raster data of a second precision, wherein the first precision is not lower than the second precision; a determining unit configured to process a boundary range corresponding to the first raster data to obtain a first spatial range; a second obtaining unit configured to obtain third raster data corresponding to the first spatial range from the second raster data; and a first merging unit configured to perform raster data processing and merging according to the third raster data and the first raster data to obtain target raster data corresponding to the first spatial range.

[0016] Further, the determining unit comprises: an obtaining module configured to obtain a maximum coordinate point and a minimum coordinate point in the first raster data; a first determining module configured to obtain a minimum circumscribed rectangle range corresponding to the first raster data according to the maximum coordinate point and the minimum coordinate point; and a second determining module configured to perform outer expansion on the minimum circumscribed rectangle range according to a preset outer expansion range to obtain the first spatial range.

[0017] Further, the first merging unit comprises: a judging module configured to judge whether a preset target resampling precision exists; a first sampling module configured to perform resampling on the third raster data according to the target resampling precision to obtain resampled third raster data if the target resampling precision exists; a second sampling module configured to perform resampling on the first raster data according to the target resampling precision to obtain resampled first raster data; and a merging module configured to perform raster data processing and merging according to the resampled third raster data and the resampled first raster data to obtain target raster data corresponding to the first spatial range.

[0018] Further, the device further comprises: a sampling unit configured to perform resampling on the third raster data according to the first precision to obtain resampled third raster data if the target resampling precision does not exist and the first precision is higher than the second precision after judging whether the target resampling precision exists; and a second merging unit configured to perform raster data processing and merging according to the resampled third raster data and the first raster data to obtain target raster data corresponding to the first spatial range.

[0019] Further, the first merging unit comprises: a setting module, configured to set an empty file of a target format according to the first spatial range; a first filling module, configured to fill the first raster data into a first region in the empty file, wherein the first region is a region in which only the first raster data exists; a second filling module, configured to fill third raster data corresponding to a second region into the empty file, wherein the second region is a region in which the first raster data does not exist and the third raster data exists; and a third determining module, configured to determine fourth raster data corresponding to the third region according to the third raster data and the first raster data, and fill the fourth raster data corresponding to the third region into the empty file to obtain the target raster data, wherein the third region is an intersection region of the first region and the second region.

[0020] Further, the third determining module comprises: an obtaining sub-module, configured to, for a target pixel point in the third region, obtain initial raster data corresponding to neighboring pixel points corresponding to the target pixel point from the third raster data and the first raster data; a calculating sub-module, configured to calculate according to the initial raster data to obtain fourth raster data corresponding to the target pixel point; and a first determining sub-module, configured to obtain the fourth raster data corresponding to the third region according to the fourth raster data corresponding to the target pixel point.

[0021] Further, the third determining module comprises: a filling sub-module, configured to fill the fourth raster data corresponding to the third region into the empty file to obtain fifth raster data; a processing sub-module, configured to, if the fifth raster data is digital elevation data, perform smoothing processing on the fifth raster data to obtain smoothed fifth raster data, and obtain the target raster data according to the smoothed fifth raster data; and a second determining sub-module, configured to, if the fifth raster data is orthophoto data, obtain the target raster data according to the fifth raster data.

[0022] Further, the processing sub-module comprises: an extracting sub-sub-module, configured to extract a boundary of the first raster data to obtain boundary line information; a determining sub-sub-module, configured to determine a to-be-smoothed region according to the boundary line information and a preset number of pixel points; and a processing sub-sub-module, configured to perform smoothing processing on the fifth raster data corresponding to the to-be-smoothed region to obtain the smoothed fifth raster data.

[0023] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer readable storage medium is provided, which comprises a stored executable program, wherein when the executable program is running, the computer readable storage medium controls the device where the computer readable storage medium is located to execute the above-mentioned merging method of multi-source raster data.

[0024] In order to achieve the above object, according to another aspect of the present application, an electronic device is provided, comprising a memory storing an executable program; and a processor configured to run the program, wherein the program performs the above-mentioned method for merging multi-source raster data when running.

[0025] In order to achieve the above object, according to another aspect of the present application, a computer program product is provided, comprising computer instructions configured to implement the steps of the above-mentioned method for merging multi-source raster data when executed by a processor.

[0026] In the embodiments of the present application, the following steps are adopted: obtaining first raster data of a first precision and second raster data of a second precision, wherein the first precision is not lower than the second precision; processing a boundary range corresponding to the first raster data to obtain a first spatial range; obtaining third raster data corresponding to the first spatial range from the second raster data; and performing raster data processing and merging according to the third raster data and the first raster data to obtain target raster data corresponding to the first spatial range, thereby solving the technical problem in the related art that when raster data does not completely cover a required view range, other data sources need to be supplemented to the missing area in a manual manner, resulting in a relatively low processing efficiency of raster data.

[0027] In the present scheme, the first raster data and the second raster data are obtained, and a first spatial range to be processed is determined according to a boundary range of the first raster data. The third raster data matching the first spatial range is intercepted from the second raster data, and the third raster data and the first raster data are automatically merged to generate target raster data covering the first spatial range. The present scheme effectively overcomes the problem in the prior art that when raster data fails to completely cover a target view range, complex and time-consuming manual operation is required to supplement the deficiency of the data source, thereby resulting in a low data processing efficiency. Through the present scheme, the dependence on manual operation is reduced, potential errors caused by manual setting are avoided, and the technical effect of improving the accuracy of data processing is achieved. BRIEF DESCRIPTION OF DRAWINGS

[0028] The accompanying drawings, which form a part of the present application, are intended to provide further understanding of the present application, and the illustrative embodiments of the present application, together with their description, are intended to explain the present application, and are not intended to limit the present application in any manner. In the drawings:

[0029] Figure 1 Fig. 1 shows a hardware structure block diagram of a computer terminal for implementing the method for merging multi-source raster data;

[0030] Figure 2 Fig. 2 is a flowchart of the method for merging multi-source raster data according to an embodiment of the present application;

[0031] Figure 3 is a schematic diagram of a method for merging multi-source raster data according to an embodiment of the present application Figure 1 ;

[0032] Figure 4 is a schematic diagram of a method for merging multi-source raster data according to an embodiment of the present application Figure 2 ;

[0033] Figure 5 is a schematic diagram of a device for merging multi-source raster data according to an embodiment of the present application

[0034] Figure 6 is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative work should belong to the scope of protection of the present application.

[0036] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present application are information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal. For example, the system and the interface between the related users or institutions are provided with the corresponding operation portal for the user to choose to agree or refuse the automatic decision result; if the user chooses to refuse, the expert decision process is entered.

[0038] Embodiment 1

[0039] According to the embodiments of the present application, a method for merging multi-source raster data is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.

[0040] The method provided by the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing the method for merging multi-source raster data is shown. As shown in Figure 1 The computer terminal 10 (or mobile device) can include one or more processors 102 (the processor 102 can include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can include more or fewer components than those shown in Figure 1 or have a different configuration than that shown in Figure 1 .

[0041] It should be noted that the one or more processors 102 and / or other data processing circuitry described above can be generally referred to herein as "data processing circuitry". The data processing circuitry can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuitry can be a single standalone processing module, or incorporated in whole or in part within any of the other elements of the computer terminal 10 (or mobile device). As referred to in embodiments of the present application, the data processing circuitry functions as a processor to control, for example, selection of variable resistance terminal paths connected to the interface.

[0042] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage means corresponding to the method for merging multi-source raster data according to embodiments of the present application. The processor 102 can execute various functional applications and data processing by running the software programs and modules stored in the memory 104, i.e. implement the method for merging multi-source raster data as described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further include a memory disposed remotely with respect to the processor 102, which can be connected to the computer terminal 10 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0043] The transmission device 106 is used to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.

[0044] The display can be, for example, a touch screen type liquid crystal display (LCD), which can enable a user to interact with the user interface of the computer terminal 10 (or mobile device).

[0045] In the above operating environment, the present application provides a method for merging multi-source raster data as shown in Figure 2 Figure 2 is a flowchart of the method for merging multi-source raster data according to Embodiment One of the present application. The method includes:

[0046] ​In step S201, first grid data of a first precision and second grid data of a second precision are obtained, wherein the first precision is not lower than the second precision.

[0047] Optionally, the high-precision grid data, i.e., the first grid data of the first precision, is obtained. For example, in the application scenario of a digital elevation model (DEM), the first precision can be 1 meter. The second grid data of the second precision is obtained, and the second grid data has a lower precision and a resolution that is generally coarser than that of the first grid data. For example, the second precision can be 5 meters, 10 meters, or larger, depending on the data source and project requirements. Although low-precision data is not as detailed as high-precision data, it often covers a wider area and is an ideal choice to supplement the lack of coverage of high-precision data. The main purpose of this step is to address the common problem of incomplete data coverage in large geographic projects. For example, when building a three-dimensional terrain model of a digital twin platform, the high-precision DEM or DOM data provided by the user may be limited to a specific area and cannot cover the entire project view. At this time, by obtaining the second (lower) precision grid data, it can be used to fill the areas not covered by the high-precision data, ensuring the continuity and integrity of the entire model.

[0048] In step S202, the first spatial range is obtained according to the boundary range corresponding to the first grid data.

[0049] Optionally, the metadata of the first grid data is read, and the minimum X coordinate, maximum X coordinate, minimum Y coordinate, and maximum Y coordinate are extracted to form a rectangular bounding box, and then the boundary range corresponding to the first grid data is obtained. Then, the first spatial range is obtained by moderately expanding the boundary range corresponding to the first grid data. Through the first spatial range, it can be planned how to effectively supplement the uncovered areas with low-precision data, thereby ensuring the data integrity of the entire project area.

[0050] In step S203, the third grid data corresponding to the first spatial range is obtained from the second grid data.

[0051] Optionally, the first spatial range calculated in step S202 is used to crop the corresponding part of the second grid data, to obtain the third grid data. For example, a spatial cropping operation can be performed on the second grid data using a geographic data processing tool to ensure that only the data within the first spatial range is retained.

[0052] In step S204, the target grid data corresponding to the first spatial range is obtained by performing grid data processing and merging based on the third grid data and the first grid data.

[0053] Optionally, it is ensured that the first grid data and the processed third grid data (low-precision data) are both in the same coordinate system, and the resolutions (resampling precision) are also matched or have been adjusted to a unified standard. By processing and merging the first grid data and the third grid data, the target grid data corresponding to the first spatial range is obtained. For example, in the region where the ranges of the first grid data and the third grid data overlap, the first (high-precision) grid data is filled, and in the region not covered by the first grid data, the third (low-precision) grid data is filled.

[0054] In summary, the first grid data and the second grid data are obtained, and a first spatial range to be processed is determined according to the boundary range of the first grid data. The third grid data matching the first spatial range is intercepted from the second grid data, and the third grid data and the first grid data are automatically merged to generate the target grid data covering the first spatial range. The present scheme effectively overcomes the problem that in the prior art, when the grid data fails to completely cover the target view, complex and time-consuming manual operation is required to supplement the deficiency of the data source, thereby resulting in low data processing efficiency. Through the present scheme, the dependence on manual operation is reduced, potential errors caused by manual setting are avoided, and the technical effect of improving the accuracy of data processing is achieved.

[0055] Optionally, in the merging method of multi-source grid data provided in the embodiments of the present application, the first spatial range is obtained by processing the boundary range corresponding to the first grid data, including: obtaining the maximum coordinate point and the minimum coordinate point in the first grid data; obtaining the minimum circumscribed rectangular range corresponding to the first grid data according to the maximum coordinate point and the minimum coordinate point; and performing outer expansion on the minimum circumscribed rectangular range according to a preset outer expansion range to obtain the first spatial range.

[0056] In an optional embodiment, the metadata of the first grid data is read, and the geographic reference information therein is extracted, i.e., the minimum X coordinate, the minimum Y coordinate, the maximum X coordinate, and the maximum Y coordinate of all valid pixels. The maximum coordinate point and the minimum coordinate point among these coordinate points are determined, which respectively represent the right upper corner and the left lower corner positions of the data set in the geographic space.

[0057] Based on the maximum coordinate point and the minimum coordinate point, a rectangular boundary capable of enclosing all valid pixels of the first grid data is determined. The four vertices of this rectangle, i.e., the left lower, right upper, left upper, and right lower coordinate positions, are determined by the minimum X coordinate, the minimum Y coordinate, the maximum X coordinate, and the maximum Y coordinate, respectively. The definition of the minimum circumscribed rectangle ensures that only the geographic area actually covered by the first grid data is processed, avoiding invalid processing of irrelevant areas, thereby improving the overall efficiency of data processing.

[0058] According to the outer expansion range (for example, 500 meters) set in the configuration phase, the minimum circumscribed rectangle determined above is expanded, and the expanded rectangular range is the first spatial range.

[0059] In an optional embodiment, the schematic diagram for determining the first spatial range is as shown in FIG. 3. Figure 3 As shown in FIG. 3, the minimum circumscribed rectangular frame of the extracted high-precision tif data is calculated, and the maximum and minimum coordinates of the effective pixel points of the grid are extracted, including the minimum x-coordinate (xmin), the maximum x-coordinate (xmax), the minimum y-coordinate (ymin), and the maximum y-coordinate (ymax). A rectangle is constructed by using the obtained maximum and minimum coordinates, and the coordinates of the four corners of the rectangle are the left lower corner (xmin, ymin), the right lower corner (xmax, ymin), the left upper corner (xmin, ymax), and the right upper corner (xmax, ymax). The circumscribed rectangular frame is expanded to a specified range, the minimum circumscribed rectangular frame calculated before is expanded according to the set expansion range, and a new target processing range is formed, that is, the first spatial range is obtained.

[0060] By analyzing the geographic reference information of the first grid data, the actual covered geographic area can be efficiently and accurately determined, and the minimum circumscribed rectangle is created on this basis. Then, the first spatial range is formed by expanding the preset expansion range. This step ensures that the target area of data processing not only covers the original data, but also reserves the edge area for subsequent data fusion, so that the user can still obtain a continuous and natural three-dimensional scene experience even under a large range of viewpoint changes.

[0061] Optionally, in the method for merging multi-source grid data provided in the embodiments of the present application, the target grid data corresponding to the first spatial range is obtained by performing grid data processing and merging according to the third grid data and the first grid data, including: determining whether there is a preset target resampling accuracy; if the target resampling accuracy exists, resampling the third grid data according to the target resampling accuracy to obtain the resampled third grid data; resampling the first grid data according to the target resampling accuracy to obtain the resampled first grid data; and performing grid data processing and merging according to the resampled third grid data and the resampled first grid data to obtain the target grid data corresponding to the first spatial range.

[0062] In an optional embodiment, it is checked whether a preset target resampling accuracy is set. This step is very important because different applications may require different levels of details, and the resampling accuracy directly determines the level of detail of the raster data and the amount of processed data. If the target resampling accuracy is preset, the third raster data (low-accuracy supplementary data) needs to be resampled to match the resolution to the target resampling accuracy. At the same time, if the target resampling accuracy is different from the first accuracy of the first raster data (high-accuracy data), the first raster data (high-accuracy data) also needs to be resampled. If the first accuracy of the first raster data is the target resampling accuracy, the first raster data (high-accuracy data) can be considered as the resampled first raster data. The purpose of this is to ensure that all raster data is compared and merged on the same basis in the data fusion stage, ensuring the consistency and fusibility of the data.

[0063] In an optional embodiment, the target resampling accuracy can be set according to different types of raster data. For orthophotos, the target resolution is generally set to 0.5 m, which is the best accuracy. This accuracy can ensure the clarity of the orthophoto and the loading performance. The actual resolution can be adjusted according to the situation. For digital elevation models, the target resampling accuracy can be set to the same resolution as the high-accuracy raster data (i.e., the resolution of the first raster data). In this way, the high-accuracy raster data (first raster data) does not need to be resampled and can be considered as the resampled high-accuracy raster data (first raster data). If the accuracy of the high-accuracy raster data is too high, the target resampling accuracy can be adaptively reduced.

[0064] In an optional embodiment, the resampling method includes bilinear interpolation, nearest neighbor resampling, cubic convolution interpolation, polynomial interpolation, and spline interpolation. For nearest neighbor resampling, the nearest original raster value is selected as the new pixel value for each target raster pixel. For bilinear interpolation, the values of the four neighboring pixels of the target raster pixel are used to calculate the interpolated value by weighted averaging. For cubic convolution interpolation, the values of the 16 pixels around the target pixel are used for weighted calculation, which considers more pixels than bilinear interpolation. For this scheme, bilinear interpolation can be used for resampling based on the effect and calculation speed (if other requirements exist, the resampling method can be adaptively adjusted).

[0065] After all the raster data participating in the fusion is adjusted to the unified resampling accuracy, the resampled third raster data and the resampled first raster data are merged together to generate a seamless data set covering the first spatial range. In the overlapping area of the first raster data and the third raster data, the resampled high-accuracy data is used preferentially, and outside the coverage range of the high-accuracy data, the resampled low-accuracy data is used.

[0066] By adjusting all grid data to the same resampling precision, the problem of resolution mismatch between different data sources is eliminated, ensuring the consistency of data and the quality of fusion.

[0067] Optionally, in the method for merging multi-source grid data provided in the embodiments of the present application, after judging whether the target resampling precision is preset, the method further comprises: if the target resampling precision does not exist and the first precision is higher than the second precision, resampling the third grid data according to the first precision to obtain resampled third grid data; and performing grid data processing and merging according to the resampled third grid data and the first grid data to obtain the target grid data corresponding to the first spatial range.

[0068] In an optional embodiment, first, it is checked whether the target resampling precision is set. If not, the precisions of the first grid data and the third grid data (low-precision supplementary data) are compared. If the first precision is higher than the second precision, the first precision is selected as the reference standard. The third grid data is resampled to improve its precision to the same as that of the first grid data. After the resampling of the third grid data is completed, it is fused with the first grid data to cover the first spatial range. In the fusion process, the high-precision information of the resampled first grid data is preferentially used, and then the resampled third grid data is used for supplementation outside the coverage range of the first grid data.

[0069] By resampling the third grid data using the precision of the first grid data as the reference standard, it is ensured that the overall precision of the fused data is consistent with the high-precision data, and the quality of the final data set is improved.

[0070] Optionally, in the method for merging multi-source grid data provided in the embodiments of the present application, the performing grid data processing and merging according to the third grid data and the first grid data to obtain the target grid data corresponding to the first spatial range comprises: setting an empty file of the target format according to the first spatial range; filling the first grid data into a first region in the empty file, wherein the first region is a region where the first grid data exists; filling the third grid data corresponding to a second region into the empty file, wherein the second region is a region where the first grid data does not exist and the third grid data exists; determining fourth grid data corresponding to a third region according to the third grid data and the first grid data, and filling the fourth grid data corresponding to the third region into the empty file to obtain the target grid data, wherein the third region is an intersection region of the first region and the second region.

[0071] In an optional embodiment, an empty raster data file is created, which is in the format of the output target and has a coverage range of the first spatial range, i.e. the entire geographical area that the processed data set should cover. The first area refers to the area in the first spatial range where the first raster data (high-precision data) is located. The first raster data is directly copied and filled into the corresponding position of the empty file to preserve the original information of the high-precision data. The second area refers to the part in the first spatial range outside the first area that is only covered by the third raster data (low-precision supplementary data). Similarly, the third raster data is filled into the corresponding part of the empty file to supplement the area that the high-precision data fails to cover.

[0072] The third area is the area where the first area and the second area meet, i.e. the gap between the first area and the second area. In this area, the two data sources need to be processed comprehensively to determine the final fourth raster data. For example, smoothing processing is performed near the boundary, using mean smoothing, or setting the data value to the weighted average of the two to ensure a natural transition at the joint.

[0073] It should be noted that if the current raster data is the resampled third raster data and the resampled first raster data, the resampled first raster data is filled into the first area of the empty file, the resampled third raster data is filled into the second area of the empty file, the fourth raster data is obtained according to the resampled third raster data and the resampled first raster data, and the fourth raster data is filled into the third area of the empty file, thereby obtaining the final target raster data.

[0074] By creating an empty file that conforms to the target format and filling data according to specific areas, it is ensured that the output data set covers every part in the first spatial range, whether it is a high-precision area or a low-precision area, or an overlapping area of the two, which can be properly processed.

[0075] Optionally, in the method for merging multi-source raster data provided in the embodiments of the present application, determining the fourth raster data corresponding to the third area according to the third raster data and the first raster data comprises: for a target pixel point in the third area, obtaining initial raster data corresponding to neighboring pixel points of the target pixel point from the third raster data and the first raster data; calculating the fourth raster data corresponding to the target pixel point according to the initial raster data; and obtaining the fourth raster data corresponding to the third area according to the fourth raster data corresponding to the target pixel point.

[0076] In an optional embodiment, in the third area, for each target pixel point, the initial raster data corresponding to its neighboring pixel points is extracted from the first raster data and the third raster data, respectively.

[0077] From the obtained initial grid data of the adjacent pixel points, a specific algorithm is used to calculate the final value of the target pixel point in the fused data set (i.e., the fourth grid data described above). Common calculation methods include, but are not limited to, arithmetic mean, weighted mean, median, nearest neighbor interpolation, etc. For example, the average value of high-precision data and low-precision data in the neighborhood of the target pixel point can be calculated, or the higher-precision data can be fused using a weight, or a linear difference method can be used to obtain the fourth grid data. Finally, the fourth grid data is filled into the third region in the empty file to obtain the target grid data.

[0078] By obtaining the adjacent pixel point data of the target pixel point in the third region and calculating the fused value, the abrupt change at the boundary during data fusion can be reduced, and the boundary transition of the merged grid data is smoother and more natural.

[0079] Optionally, in the method for merging multi-source grid data provided in the embodiments of the present application, filling the fourth grid data corresponding to the third region into the empty file to obtain the target grid data comprises: filling the fourth grid data corresponding to the third region into the empty file to obtain the fifth grid data; if the fifth grid data is digital elevation data, performing smoothing processing on the fifth grid data to obtain smoothed fifth grid data, and obtaining the target grid data according to the smoothed fifth grid data; if the fifth grid data is orthophoto data, obtaining the target grid data according to the fifth grid data.

[0080] In an optional embodiment, the fourth grid data corresponding to the third region processed by the fusion algorithm is filled into the corresponding position in the target format empty file created before, thereby generating the fifth grid data containing the processing results of the first, second and third regions.

[0081] If the fifth grid data represents a digital elevation model, considering that the accuracy difference of different source data may cause elevation discontinuity at the boundary area, the fifth grid data needs to be smoothed. The smoothing processing can use mean filtering, median filtering or Gaussian filtering technology to reduce the discontinuity at the boundary and ensure smooth elevation transition.

[0082] If the fifth grid data is orthophoto data, it usually does not need additional smoothing processing, because the color and texture information of the image has been reasonably processed in the fusion process. The fifth grid data can be directly output, and a pyramid structure is constructed to optimize the loading and display performance of large-scale image data. After the above steps, for DEM data, the smoothed fifth grid data obtained after performing smoothing processing is the final target grid data; for DOM data, the fifth grid data itself is the target grid data and can be directly output.

[0083] By smoothing the DEM after fusion, the visual continuity and data consistency of the edge area are significantly improved, the visual discontinuity caused by the accuracy difference is avoided, and the overall quality of the data set is improved.

[0084] Optionally, in the merging method of the multi-source raster data provided in the embodiments of the present application, the fifth raster data is smoothed to obtain smoothed fifth raster data, including: extracting the boundary of the first raster data to obtain boundary line information; determining a to-be-smoothed area according to the boundary line information and a preset number of pixel points; and smoothing the fifth raster data corresponding to the to-be-smoothed area to obtain the smoothed fifth raster data.

[0085] In an optional embodiment, the boundary line information is extracted from the first raster data (high-precision data). According to the extracted boundary line information and a preset number of pixel points (window size), a specific area that needs to be smoothed, i.e., a to-be-smoothed area, is determined. That is, a distance (in pixels) is extended on both sides of the boundary line to form a buffer area, so as to smooth the data in the area.

[0086] Finally, the fifth raster data in the to-be-smoothed area is smoothed. The smoothing method can be local mean filtering, median filtering, Gaussian smoothing or other suitable algorithms. For example, local mean filtering can calculate the average value in the neighborhood of each target pixel point to update the value of the pixel point, thereby reducing the mutation of the elevation or gray value and realizing the continuity of the visual and geographic information at the boundary.

[0087] By extracting the boundary line and smoothing the fifth raster data, the boundary effect after data fusion can be effectively reduced, the visual and geometric continuity of the processed data can be improved, and the data quality can be enhanced.

[0088] In an optional embodiment, the merging of the source raster data can be implemented through a schematic diagram as shown in FIG. Figure 4 , and specifically includes:

[0089] Step S401, specify the tif path, resampling accuracy, coordinate system, outer expansion range, output path, smoothing parameter; specify the high-precision raster data file path (tif path); specify the low-precision raster data file path (tif path); set the target coordinate system (for example, CGCS2000 / 3 degree Gauss projection); set the output raster target resolution. Orthophoto, the general target resolution is set to 0.5m, the accuracy is best, this accuracy can ensure the clarity of the orthophoto and the loading performance, which can be adjusted according to the situation. The target resolution of the digital elevation model (DEM) is the same as the resolution of the high-precision raster data by default, and the target resolution is not preset in the system. If the accuracy of the high-precision raster data is too high, the target resolution can be adaptively reduced. Set the outer expansion range of the outer frame (unit: meter), and set the window size of the boundary smoothing processing (only for DEM).

[0090] Step S402, judge whether the input tif coordinate system and the specified coordinate system are consistent, if yes, go to step S403; if not, go to step S404.

[0091] Read the existing coordinate system information of the high-precision and low-precision raster data in the specified path; judge whether the coordinate system of the input data is consistent with the set target coordinate system; if not, automatically use the GDAL library to reproject the low-precision data to the target coordinate system.

[0092] Step S403, calculate the minimum bounding rectangle of the high-precision tif data; extract the maximum and minimum coordinates of the valid pixel points of the raster, the minimum x-coordinate (xmin), the maximum x-coordinate (xmax), the minimum y-coordinate (ymin) and the maximum y-coordinate (ymax); construct a rectangle through the obtained maximum and minimum coordinates, and the coordinates of the four corners are left lower corner (xmin, ymin), right lower corner (xmax, ymin), left upper corner (xmin, ymax) and right upper corner (xmax, ymax).

[0093] Step S404, input tif conversion coordinate system, if the tif in the specified path is inconsistent with the set target coordinate system, convert the coordinates according to the set target coordinate system, and execute step S403 after the coordinate conversion is completed.

[0094] Step S405, expand the bounding rectangle to the specified range. According to the set outer expansion range, the minimum bounding rectangle calculated before is expanded outward to form a new and larger target processing range.

[0095] Step S406, according to the target range expanded in step S405, the low-precision raster data is cropped, and the cropping range is all the raster data in the entire target outer expansion range in the low-precision data.

[0096] Step S407, determine whether the resampling accuracy is input (if the accuracy parameter is input, it is determined that the resampling accuracy is input, and if the accuracy parameter is not input, the resolution of the high-precision tif is extracted as the resampling parameter by default).

[0097] Read whether the resolution of the tif in the specified path is consistent with the set target resolution, if yes, resample the high-precision tif according to the input accuracy (step S108); if not, extract the high-precision tif accuracy and set it to the export accuracy (step S409); for this scheme, based on the effect and calculation speed, the bilinear interpolation method can be used for resampling (if there are other requirements, the resampling method can be adjusted adaptively).

[0098] Step S408, resample the high-precision tif and the cropped low-precision tif according to the input accuracy; resample the high-precision tif according to the input accuracy; resample the result of step S406 according to the input accuracy.

[0099] Step S409, extract the high-precision tif accuracy and set it to the export accuracy, extract the high-precision tif accuracy and set it to the export accuracy, and resample the result of step S106 according to the extracted accuracy.

[0100] Step S410, fuse the resampled high and low tifs together, fuse the resampled low-precision raster data and high-precision raster data in the target coordinate system and resolution to generate a preliminary fusion raster data set covering the extended range. For example, create an empty tif file, set the width, height and resolution; fill the result tif pixel value processed in step S408 or step S109 into the empty tif file one by one, and use bilinear interpolation sampling to reduce color difference when filling at the junction.

[0101] Step S411, determine whether the tif file is dem or dom, the judgment condition is that the orthophoto (DOM) has 3 or 4 bands, and the digital elevation model (DEM) has 1 band, if it is a dem file, enter the digital elevation model (DEM) processing flow (step S412); if it is a dom file, enter the orthophoto (DOM) processing flow (step S415).

[0102] Step S412, extract the boundary line of the high-precision tif in the specified path (i.e. the high-precision raster data file path (tif path) specified in step S401), and export it as a vector line shp / geojson format file.

[0103] Step S413, based on this vector line shp / geojson file, locate the pixel point set at the intersection of high and low precision data in the fusion area.

[0104] In step S414, mean value smoothing is used to smooth the pixel point set near the intersection of the high-precision data and the low-precision data. A mean value smoothing method with a specified size is applied to the intersection area to eliminate the height mutation at the edge and realize the smooth transition of the height value. For this scheme, mean value smoothing can be used based on the effect and calculation speed.

[0105] In step S415, after the smoothing processing is completed, an internal pyramid is constructed in the DEM TIFF file output finally.

[0106] The original high-precision tif (the specified high-precision raster data file (tif file) in step S401, that is, step S101) is used as the base layer. The resolution of each layer is lower than that of the previous layer, which is usually twice (reduced to half in the horizontal and vertical directions) that of the previous layer. For example, if the original data is a 1000x1000 grid, the second layer of the pyramid can be 500x500, the third layer can be 250x250, and so on. A hierarchical structure is formed. In image display, the pyramid is set to load the corresponding level quickly according to the display zoom level, thereby improving the display efficiency.

[0107] In step S416, the fused GeoTIFF file is exported.

[0108] The method for merging multi-source raster data provided in the embodiments of the present application comprises the following steps: obtaining first raster data with a first precision and second raster data with a second precision, wherein the first precision is not lower than the second precision; processing a boundary range corresponding to the first raster data to obtain a first spatial range; obtaining third raster data corresponding to the first spatial range from the second raster data; and performing raster data processing and merging to obtain target raster data corresponding to the first spatial range according to the third raster data and the first raster data. The technical problem of low processing efficiency of raster data in the related art is solved, in which case, when the raster data does not completely cover the required view range, other data sources need to be supplemented to the missing area in an artificial manner.

[0109] In the present scheme, the first raster data and the second raster data are obtained, and a first spatial range to be processed is determined according to the boundary range of the first raster data. The third raster data matched with the first spatial range is cut out from the second raster data, and the third raster data and the first raster data are automatically merged to generate target raster data covering the first spatial range. The present scheme effectively overcomes the problem of low data processing efficiency in the prior art condition, in which case, when the raster data does not completely cover the target view range, complex and time-consuming manual operation is required to supplement the insufficient data sources, thereby reducing the dependence on manual operation and avoiding potential errors caused by manual setting, and thus achieving the technical effect of improving the accuracy of data processing.

[0110] It is noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0111] Embodiment 2

[0112] The embodiment of the present application also provides a multi-source grid data merging device. It should be noted that the multi-source grid data merging device of the embodiment of the present application can be used to execute the multi-source grid data merging method provided by the embodiment of the present application. The multi-source grid data merging device provided by the embodiment of the present application is introduced as follows.

[0113] According to the embodiment of the present application, a device for implementing the above-mentioned multi-source grid data merging method is also provided, as shown in Figure 5 The device comprises a first acquisition unit 501, a determination unit 502, a second acquisition unit 503 and a first merging unit 504.

[0114] The first acquisition unit 501 is configured to acquire first grid data of a first precision and second grid data of a second precision, wherein the first precision is not lower than the second precision.

[0115] The determination unit 502 is configured to process according to a boundary range corresponding to the first grid data to obtain a first spatial range.

[0116] The second acquisition unit 503 is configured to acquire third grid data corresponding to the first spatial range from the second grid data.

[0117] The first merging unit 504 is configured to perform grid data processing and merging according to the third grid data and the first grid data to obtain target grid data corresponding to the first spatial range.

[0118] The multi-source grid data merging device provided by the embodiment of the present application acquires first grid data of a first precision and second grid data of a second precision through the first acquisition unit 501, wherein the first precision is not lower than the second precision; the determination unit 502 processes according to a boundary range corresponding to the first grid data to obtain a first spatial range; the second acquisition unit 503 acquires third grid data corresponding to the first spatial range from the second grid data; and the first merging unit 504 performs grid data processing and merging according to the third grid data and the first grid data to obtain target grid data corresponding to the first spatial range, thereby solving the technical problem that in related technologies, when a grid data does not completely cover a required view range, other data source data needs to be supplemented to a missing area in a manual manner, resulting in a relatively low processing efficiency of the grid data.

[0119] In the scheme, the first grid data and the second grid data are acquired, a first spatial range to be processed is determined according to a boundary range of the first grid data. The third grid data matched with the first spatial range is intercepted from the second grid data, and the third grid data and the first grid data are automatically merged to generate target grid data covering the first spatial range. The scheme effectively overcomes the problem that, under the condition of the prior art, when the grid data fails to completely cover the target view, complex and time-consuming manual operation is required to supplement the deficiency of the data source, thereby leading to low data processing efficiency. Through the scheme, the dependence on manual operation is reduced, potential errors caused by manual setting are avoided, and the technical effect of improving the accuracy of data processing is achieved.

[0120] Optionally, in the multi-source grid data merging device provided in the embodiments of the present application, the determining unit comprises: an acquisition module, configured to acquire a maximum coordinate point and a minimum coordinate point in the first grid data; a first determining module, configured to obtain a minimum circumscribed rectangle range corresponding to the first grid data according to the maximum coordinate point and the minimum coordinate point; and a second determining module, configured to perform outer expansion on the minimum circumscribed rectangle range according to a preset outer expansion range to obtain the first spatial range.

[0121] Optionally, in the multi-source grid data merging device provided in the embodiments of the present application, the first merging unit comprises: a judgment module, configured to judge whether there is a preset target resampling accuracy; a first sampling module, configured to, if there is the target resampling accuracy, resample the third grid data according to the target resampling accuracy to obtain resampled third grid data; a second sampling module, configured to resample the first grid data according to the target resampling accuracy to obtain resampled first grid data; and a merging module, configured to perform grid data processing and merging according to the resampled third grid data and the resampled first grid data to obtain target grid data corresponding to the first spatial range.

[0122] Optionally, in the multi-source grid data merging device provided in the embodiments of the present application, the device further comprises: a sampling unit, configured to, after judging whether there is a preset target resampling accuracy, if there is no target resampling accuracy and the first accuracy is higher than the second accuracy, resample the third grid data according to the first accuracy to obtain resampled third grid data; and a second merging unit, configured to perform grid data processing and merging according to the resampled third grid data and the first grid data to obtain target grid data corresponding to the first spatial range.

[0123] Optionally, in the multi-source raster data merging device provided by the embodiment of the present application, the first merging unit comprises: a setting module configured to set an empty file in the target format according to the first spatial range; a first filling module configured to fill the first raster data into a first region in the empty file, wherein the first region is a region in which the first raster data exists; a second filling module configured to fill the third raster data corresponding to a second region into the empty file, wherein the second region is a region in which the first raster data does not exist and the third raster data exists; and a third determining module configured to determine the fourth raster data corresponding to a third region according to the third raster data and the first raster data, and fill the fourth raster data corresponding to the third region into the empty file to obtain the target raster data, wherein the third region is an intersection region of the first region and the second region.

[0124] Optionally, in the multi-source raster data merging device provided by the embodiment of the present application, the third determining module comprises: an obtaining submodule configured to, for a target pixel point in the third region, obtain initial raster data corresponding to neighboring pixel points corresponding to the target pixel point from the third raster data and the first raster data; a calculating submodule configured to calculate according to the initial raster data to obtain the fourth raster data corresponding to the target pixel point; and a first determining submodule configured to obtain the fourth raster data corresponding to the third region according to the fourth raster data corresponding to the target pixel point.

[0125] Optionally, in the multi-source raster data merging device provided by the embodiment of the present application, the third determining module comprises: a filling submodule configured to fill the fourth raster data corresponding to the third region into the empty file to obtain fifth raster data; a processing submodule configured to, if the fifth raster data is digital elevation data, perform smoothing processing on the fifth raster data to obtain smoothed fifth raster data, and obtain the target raster data according to the smoothed fifth raster data; and a second determining submodule configured to, if the fifth raster data is orthophoto data, obtain the target raster data according to the fifth raster data.

[0126] Optionally, in the multi-source raster data merging device provided by the embodiment of the present application, the processing submodule comprises: an extracting sub-submodule configured to extract a boundary of the first raster data to obtain boundary line information; a determining sub-submodule configured to determine a to-be-smoothed region according to the boundary line information and a preset number of pixel points; and a processing sub-submodule configured to perform smoothing processing on the fifth raster data corresponding to the to-be-smoothed region to obtain smoothed fifth raster data.

[0127] It should be noted that the first acquisition unit 501, the determining unit 502, the second acquisition unit 503, and the first merging unit 504 mentioned above correspond to steps S201 to S204 in Embodiment 1. The four units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above units can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.

[0128] Example 3

[0129] Embodiments of this application may provide an electronic device. Figure 6 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6 (Only one is shown) processor 602, memory 604, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0130] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0131] The processor can invoke information and application programs stored in the memory through the transmission device to perform the following steps: acquiring first grid data with a first precision and acquiring second grid data with a second precision, wherein the first precision is not lower than the second precision; processing the boundary range corresponding to the first grid data to obtain a first spatial range; acquiring third grid data corresponding to the first spatial range from the second grid data; and performing grid data processing and merging based on the third grid data and the first grid data to obtain target grid data corresponding to the first spatial range.

[0132] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: obtaining the first spatial range according to the boundary range corresponding to the first grid data includes: obtaining the maximum coordinate point and the minimum coordinate point in the first grid data; obtaining the minimum circumscribed rectangle range corresponding to the first grid data according to the maximum coordinate point and the minimum coordinate point; and performing outer expansion on the minimum circumscribed rectangle range according to a preset outer expansion range to obtain the first spatial range.

[0133] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: obtaining the target grid data corresponding to the first spatial range by performing grid data processing and merging according to the third grid data and the first grid data includes: judging whether there is a preset target resampling accuracy; if there is the target resampling accuracy, resampling the third grid data according to the target resampling accuracy to obtain the resampled third grid data; resampling the first grid data according to the target resampling accuracy to obtain the resampled first grid data; and performing grid data processing and merging according to the resampled third grid data and the resampled first grid data to obtain the target grid data corresponding to the first spatial range.

[0134] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: after judging whether there is a preset target resampling accuracy, the method further includes: if there is no target resampling accuracy and the first accuracy is higher than the second accuracy, resampling the third grid data according to the first accuracy to obtain the resampled third grid data; and performing grid data processing and merging according to the resampled third grid data and the first grid data to obtain the target grid data corresponding to the first spatial range.

[0135] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: obtaining the target grid data corresponding to the first spatial range by performing grid data processing and merging according to the third grid data and the first grid data includes: setting an empty file of a target format according to the first spatial range; filling the first grid data into a first region in the empty file, wherein the first region is a region where the first grid data exists; filling the resampled third grid data corresponding to a second region into the empty file, wherein the second region is a region where the first grid data does not exist and the third grid data exists; determining fourth grid data corresponding to a third region according to the third grid data and the first grid data, and filling the fourth grid data corresponding to the third region into the empty file to obtain the target grid data, wherein the third region is an intersection region of the first region and the second region.

[0136] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: determining the fourth grid data corresponding to the third region according to the third grid data and the first grid data comprises: for a target pixel point in the third region, obtaining initial grid data corresponding to adjacent pixel points corresponding to the target pixel point from the third grid data and the first grid data; calculating the fourth grid data corresponding to the target pixel point according to the initial grid data; and obtaining the fourth grid data corresponding to the third region according to the fourth grid data corresponding to the target pixel point.

[0137] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: filling the fourth grid data corresponding to the third region into the empty file to obtain the target grid data comprises: filling the fourth grid data corresponding to the third region into the empty file to obtain the fifth grid data; if the fifth grid data is digital elevation data, performing smoothing processing on the fifth grid data to obtain the smoothed fifth grid data, and obtaining the target grid data according to the smoothed fifth grid data; and if the fifth grid data is orthophoto image data, obtaining the target grid data according to the fifth grid data.

[0138] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: performing smoothing processing on the fifth grid data to obtain the smoothed fifth grid data comprises: extracting the boundary of the first grid data to obtain boundary line information; determining a region to be smoothed according to the boundary line information and a preset number of pixel points; and performing smoothing processing on the fifth grid data corresponding to the region to be smoothed to obtain the smoothed fifth grid data.

[0139] Those skilled in the art can understand that, Figure 6 The structure shown is only schematic, and the electronic device can also be a smart phone, a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, or the like. Figure 6 It does not limit the structure of the electronic device. For example, the electronic device can further include more or fewer components (such as a network interface, a display device, etc.) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 6 It does not limit the structure of the electronic device. For example, the electronic device can further include more or fewer components (such as a network interface, a display device, etc.) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 6 It does not limit the structure of the electronic device. For example, the electronic device can further include more or fewer components (such as a network interface, a display device, etc.) than those shown in the figure, or have a different configuration from that shown in the figure.

[0140] Those skilled in the art can understand that all or part of the steps of various methods in the above embodiments can be completed by instructing the terminal device related hardware through a program, and the program can be stored in a computer readable storage medium, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0141] Embodiment 4

[0142] The embodiments of the present application further provide a computer readable storage medium. Optionally, in the embodiments, the storage medium can be used to store the program code executed by the merging method of multi-source raster data provided in the embodiment 1.

[0143] Optionally, in the embodiments, the storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0144] The present application further provides a computer program product, when executed on a data processing device, is adapted to perform the steps of the merging method of multi-source raster data.

[0145] The above embodiment numbers of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0146] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0147] In the several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the unit described as the division is only a logical function division, and there can be another division way in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.

[0148] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiments.

[0149] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0150] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in the form of a contribution to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes various media that can store program codes, such as a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, etc.

[0151] The above is only the preferred embodiment of the present application, and it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.

Claims

1. A method for merging multi-source raster data, characterized in that, include: Acquire first raster data with a first precision and acquire second raster data with a second precision, wherein the first precision is not lower than the second precision; The first spatial range is obtained by processing the boundary range corresponding to the first raster data. Obtain the third grid data corresponding to the first spatial range from the second grid data; Based on the third raster data and the first raster data, raster data processing and merging are performed to obtain the target raster data corresponding to the first spatial range.

2. The method according to claim 1, characterized in that, Based on the boundary range corresponding to the first raster data, the first spatial range is obtained by processing the data, including: Obtain the maximum and minimum coordinate points in the first raster data; Based on the maximum coordinate point and the minimum coordinate point, the minimum bounding rectangle range corresponding to the first grid data is obtained; Based on the preset expansion range, the minimum bounding rectangle range is expanded to obtain the first spatial range.

3. The method according to claim 1, characterized in that, Based on the third raster data and the first raster data, raster data processing and merging are performed to obtain the target raster data corresponding to the first spatial range, including: Determine whether a preset target resampling precision exists; If the target resampling accuracy exists, the third grid data is resampled according to the target resampling accuracy to obtain the resampled third grid data; The first raster data is resampled according to the target resampling precision to obtain the resampled first raster data; Based on the resampled third raster data and the resampled first raster data, raster data processing and merging are performed to obtain the target raster data corresponding to the first spatial range.

4. The method according to claim 3, characterized in that, After determining whether a preset target resampling precision exists, the method further includes: If the target resampling precision does not exist and the first precision is higher than the second precision, then the third grid data is resampled according to the first precision to obtain the resampled third grid data. Based on the resampled third raster data and the first raster data, raster data processing and merging are performed to obtain the target raster data corresponding to the first spatial range.

5. The method according to claim 1, characterized in that, Based on the third raster data and the first raster data, raster data processing and merging are performed to obtain the target raster data corresponding to the first spatial range, including: Based on the first spatial range, set an empty file in the target format; The first raster data is filled into a first region of the empty file, wherein the first region is the region where the first raster data exists; Fill the empty file with the third raster data corresponding to the second region, wherein the second region is the region where the first raster data does not exist but the third raster data exists; Based on the third raster data and the first raster data, the fourth raster data corresponding to the third region is determined, and the fourth raster data corresponding to the third region is filled into the empty file to obtain the target raster data, wherein the third region is the area at the junction of the first region and the second region.

6. The method according to claim 5, characterized in that, Determining the fourth grid data corresponding to the third region based on the third grid data and the first grid data includes: For a target pixel in the third region, the initial grid data corresponding to the neighboring pixels of the target pixel is obtained from the third grid data and the first grid data; The fourth grid data corresponding to the target pixel is obtained by calculation based on the initial grid data. Based on the fourth grid data corresponding to the target pixel, the fourth grid data corresponding to the third region is obtained.

7. The method according to claim 5, characterized in that, Fill the empty file with the fourth raster data corresponding to the third region to obtain the target raster data, including: Fill the empty file with the fourth raster data corresponding to the third region to obtain the fifth raster data; If the fifth grid data is digital elevation data, then the fifth grid data is smoothed to obtain smoothed fifth grid data, and the target grid data is obtained based on the smoothed fifth grid data. If the fifth grid data is orthophoto data, then the target grid data is obtained based on the fifth grid data.

8. The method according to claim 7, characterized in that, The smoothed fifth raster data is obtained by smoothing the fifth raster data as follows: The boundaries of the first raster data are extracted to obtain boundary line information; Based on the boundary line information and the preset number of pixels, the area to be smoothed is determined; The fifth grid data corresponding to the region to be smoothed is smoothed to obtain the smoothed fifth grid data.

9. A device for merging multi-source raster data, characterized in that, include: The first acquisition unit is used to acquire first raster data with a first precision and acquire second raster data with a second precision, wherein the first precision is not lower than the second precision; The determining unit is used to process the boundary range corresponding to the first raster data to obtain the first spatial range; The second acquisition unit is used to acquire the third grid data corresponding to the first spatial range from the second grid data; The first merging unit is used to perform raster data processing and merging based on the third raster data and the first raster data to obtain the target raster data corresponding to the first spatial range.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the multi-source raster data merging method according to any one of claims 1 to 8.

11. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method for merging multi-source raster data as described in any one of claims 1 to 8.