Grid data image framing slicing and multi-sheet merging method
By setting slice processing parameters and performing multi-frame merging in raster data image processing, the problems of edge blanking and data duplication behind geospatial data slices are solved, and efficient data management and distribution are achieved.
Patent Information
- Application Number
- CN202411939595.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-13
AI Technical Summary
It is difficult for the prior art to efficiently manage and distribute geospatial data, especially after slicing different regions, blank areas will be generated at the edge, resulting in duplication or missing file data generated by slicing in the same region.
A raster data image segmentation and multi-image merging method is proposed. By setting slice processing parameters, including latitude and longitude range, slice level range, resampling method, coordinate projection method, etc., slicing and merging of raster data is carried out to ensure the reasonable merging of edge tiles.
It realizes efficient slicing and merging of raster data, reduces data loss and information redundancy, and improves resource utilization and system stability.
Smart Images

Figure CN119991459A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of computers, and in particular to a method for slicing and merging multiple raster data images. Background Art
[0002] With the development of geographic information technology, the speed of information update is accelerating, and satellite image data will soon have local or overall tile update requirements, and a large amount of geospatial data needs to be efficiently managed and distributed. After slicing different areas, blank areas will appear on the edges. When the output folders are directly merged during final submission, the file data generated by slicing the same area will be repeated or missing due to different tiling conditions. Therefore, it is of great significance to slice raster data images and merge multiple images.
[0003] In the prior art, many remote sensing processing software rarely provide automatic batch processing of raster data, and professionals are required to input coordinate values one by one in the software to determine the cropping range for cropping, which is inefficient. At the same time, the prior art does not perform a merging operation on the image edge tiles of files after slicing of multiple regions. Summary of the invention
[0004] The purpose of the present invention is to provide a method for slicing and merging multiple raster data images.
[0005] The technical solution to achieve the purpose of the present invention is: a method for slicing and merging multiple raster data images, comprising the following steps:
[0006] Step 1: Set the slice processing parameters, including: the latitude and longitude range of the raster data source file to be sliced, the slice level range, the resampling method, the coordinate projection method for generating tiles, the raster data source file address, the folder address for the slice result output, and the number of slice processes;
[0007] Step 2: Obtain the raster data to be sliced according to the raster data source file address, and read the geographic information metadata of the raster data, which includes the row and column size of the raster data, the geographic coordinate system used, the geographic coordinates of the corner points, pixel information, and image channel information;
[0008] Step 3: According to the set slice level range and longitude and latitude range parameters of the slice to be sliced, the corner point geographic coordinate information and pixel information of the read raster data are intersected in the same coordinate system to obtain the actual slice level range and longitude and latitude range where the slice operation needs to be performed;
[0009] Step 4: Read the raster data within the actual latitude and longitude range where the slicing operation needs to be performed, perform projection conversion according to the coordinate projection method of generating tiles, slice the raster data after projection conversion to generate corresponding tiles, calculate the coordinates corresponding to each tile, read the tile data from the corresponding coordinates in the data memory according to the resampling method, and generate the corresponding tile image in combination with the slicing level range;
[0010] Step 5: Merge the tile images at the edges of the two images.
[0011] Further, step 3: according to the set slice level range and longitude and latitude range parameters of the slice to be sliced, the corner point geographic coordinate information and pixel information of the read raster data are intersected in the same coordinate system to obtain the actual slice level range and longitude and latitude range where the slice operation needs to be performed. The specific method is:
[0012] Step 3.1, according to the corner geographic coordinates and pixel information of the read geographic information metadata, determine the level range that can be generated. The level range calculation formula is as follows:
[0013]
[0014] Among them, x srcMax 、x srcMin They represent the maximum and minimum longitude of the raster data, respectively; pixelSizeX and pixelSizeY represent the pixel values of the raster data in the X and Y directions, respectively; tileSize is the tile size;
[0015] According to the set level range and the calculated level range that can be generated, the actual slice level range is obtained. The calculation process is as follows:
[0016] z min =max(z tarMin , z srcMin )
[0017] z max =min(z tarMax , z srcMax )
[0018] Among them, z tarMin 、z tarMax Respectively represent the minimum and maximum level ranges of the settings, z srcMin 、z srcMax Respectively represent the calculated theoretical minimum and maximum level ranges;
[0019] Step 3.2, based on the set latitude and longitude range to be sliced and the corner point geographic coordinates of the read geographic information metadata, calculate the actual latitude and longitude range where the slicing operation needs to be performed:
[0020] xmin =max(x tarMin , x srcMin )
[0021] x max =min(x tarMax , x srcMax )
[0022] y min =max(y tarMin ,y srcMin )
[0023] y max =min(y tarMax ,y srcMax )
[0024] Among them, x tarMin 、x tarMax Respectively represents the setting of minimum and maximum longitude, y tarMin ,y tarMax Respectively represent the minimum and maximum latitude settings, y srcMin ,y srcMax Respectively represent the minimum and maximum latitude of the raster data.
[0025] Further, step 4: read the raster data within the actual latitude and longitude range where the slicing operation needs to be performed, perform projection conversion according to the coordinate projection method of generating tiles, slice the raster data after projection conversion to generate corresponding tiles, calculate the coordinates corresponding to each tile, read the tile data from the corresponding coordinates in the data memory according to the resampling method, and generate the corresponding tile image in combination with the slicing level range, where:
[0026] A multi-threaded mechanism is used to process file reading and writing operations on different physical storage locations. The thread reads the queue to obtain the raster data to be processed and the actual longitude and latitude range where the slicing operation needs to be performed, and uses the memory resources of the device where the service is located. If the current memory usage does not reach the set upper limit, the reading thread will continue to process the next task in the queue.
[0027] Further, step 4: read the raster data within the actual latitude and longitude range where the slicing operation needs to be performed, perform projection conversion according to the coordinate projection method of generating tiles, slice the raster data after projection conversion to generate corresponding tiles, calculate the coordinates corresponding to each tile, read the tile data from the corresponding coordinates in the data memory according to the resampling method, and generate the corresponding tile image in combination with the slicing level range, where:
[0028] Read the raster data within the specified geographic range, and perform necessary projection conversion on the raster data according to the coordinate projection method set in step 1; store the converted raster data in the corresponding data memory block, and then store the address of the data memory block in the pre-allocated data memory; finally, split each file into tiles, and allocate data memory for each tile.
[0029] Further, step 4: read the raster data within the actual latitude and longitude range where the slicing operation needs to be performed, perform projection conversion according to the coordinate projection method of generating tiles, slice the raster data after projection conversion to generate corresponding tiles, calculate the coordinates corresponding to each tile, read the tile data from the corresponding coordinates in the data memory according to the resampling method, and generate the corresponding tile image in combination with the slicing level range, where:
[0030] The generated tiles are stored in the form of multi-level folders according to the tile level and tile coordinates. In the process of slicing to generate tile images, a matching xml file is generated to describe the organization, name, geographic range, projection coordinates, tile format, and pixel information of the map tiles, so that the client can request the correct tiles from the server.
[0031] Further, step 5: according to different image slice areas, edge tiles in different framing areas are merged, and the specific method is as follows:
[0032] First, select the tile folders generated by slicing two or more images to be merged, compare the paths of the folders at each level to see if they are consistent, and filter out the files with the same name in the final subfolder as the image tile data of the edge of the two images;
[0033] After determining the image edge tiles that need to be merged, the tiles are merged using the multi-image edge tile merging algorithm; read the original image and the watermark image into the generated object, create an object for drawing on the original image, set the transparency of the watermark overlay on the original image for blending, where the original pixel color is (R, G, B, A), and the target pixel color is (R', G', B', A'), then the blending formula is as follows:
[0034] A"=A+A'(1-A)
[0035]
[0036] After the image merging is completed, the resources are released and saved to the specified path.
[0037] Furthermore, an exception handling and detection method is set up to output an error message and terminate the execution of the program when an error is encountered in the program.
[0038] A raster data image framing and slicing and multi-image merging system implements the raster data image framing and slicing and multi-image merging method to achieve raster data image framing and slicing and multi-image merging, and is divided into 5 modules to respectively execute steps 1 to 5.
[0039] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for slicing and merging multiple images of a raster data image is implemented to realize slicing and merging multiple images of a raster data image.
[0040] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method for slicing and merging raster data images and multiple images is implemented to achieve slicing and merging raster data images and multiple images.
[0041] Compared with the prior art, the present invention has the following significant advantages: 1) dynamically adjusting the slicing strategy according to data characteristics and user needs, improving resource utilization and reducing unnecessary computing and storage overhead; 2) being able to better handle abnormal situations, improving the stability and reliability of the geographic information system, and ensuring data integrity and processing continuity; 3) merging adjacent map edge tiles after the source file is divided into multiple slicing area files, reducing data loss and information redundancy. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 The present invention is a flow chart of a method for slicing and merging multiple raster data images. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] A method for slicing and merging multiple raster data images comprises the following steps:
[0045] Step 1: Set slice processing parameters;
[0046] Through command line terminal operation, the slice processing parameters include: the latitude and longitude range of the raster data source file to be sliced, the slice level range, the resampling method, the coordinate projection method for generating tiles, the raster data source file address, the folder address for the slice result output, and the number of slice processes.
[0047] Step 2: Read the input raster data source file and filter out the raster data that needs to be sliced;
[0048] The raster data to be sliced is obtained according to the set raster data source file address, and the geographic information metadata of the raster data is read. The geographic information metadata includes the row and column size of the raster data, the geographic coordinate system used, the geographic coordinates of the corner points, pixel information and image channel information.
[0049] Step 3: According to the set slice level range and longitude and latitude range parameters of the slice to be sliced, intersect with the corner point geographic coordinate information and pixel information of the read raster data in the same coordinate system to obtain the actual slice level range and longitude and latitude range required to perform the slicing operation.
[0050] Step 3.1, determine the range of levels that can be generated based on the corner geographic coordinates and pixel information of the read geographic information metadata. Different zoom levels correspond to different resolutions, which determine the level of detail of the map. A higher zoom level means more details on the map, but the covered geographic area is smaller, while a lower zoom level means the opposite. The level range calculation formula used in the present invention is as follows:
[0051]
[0052] Among them, x srcMax 、x srcMin They represent the maximum and minimum longitude of the raster data respectively. pixelSizeX and pixelSizeY represent the pixel values of the raster data in the X and Y directions respectively. tileSize is the tile size, which is usually 256 pixels.
[0053] According to the set level range and the calculated level range that can be generated, the actual slice level range is obtained. The calculation process is as follows:
[0054] z min =max(z tarMin , z srcMin )
[0055] z max =min(z tarMax , z srcMax )
[0056] Among them, z tarMin 、z tarMax Respectively represent the minimum and maximum level ranges of the settings, z srcMin 、z srcMax They represent the calculated theoretical minimum and maximum level ranges respectively.
[0057] Step 3.2, based on the set latitude and longitude range to be sliced and the corner point geographic coordinates of the read geographic information metadata, calculate the actual latitude and longitude range where the slicing operation needs to be performed:
[0058] x min=max(x tarMin , x srcMin )
[0059] x max =min(x tarMax , x srcMax )
[0060] y min =max(y tarMin ,y srcMin )
[0061] y max =min(y tarMax ,y srcMax )
[0062] Among them, x tarMin 、x tarMax Respectively represents the setting of minimum and maximum longitude, y tarMin ,y tarMax Respectively represent the minimum and maximum latitude settings, y srcMin ,y srcMax Respectively represent the minimum and maximum latitude of the raster data.
[0063] Step 4: Read the raster data within the actual latitude and longitude range where the slicing operation needs to be performed, perform projection conversion according to the coordinate projection method of generating tiles, slice the raster data after projection conversion to generate corresponding tiles, calculate the coordinates corresponding to each tile, read the tile data from the corresponding coordinates in the data memory according to the resampling method, and generate the corresponding tile image;
[0064] In order to improve the efficiency and quality of slicing tasks, the program uses a multi-threading mechanism to handle file reading and writing operations on different physical storage locations. These threads run independently of other working threads to avoid resource competition. Among them, the thread reads the queue to obtain the raster data to be processed and step 3 determines the actual range to be sliced, and uses the memory resources of the device where the service is located. If the current memory usage does not reach the set upper limit, the reading thread will continue to process the next task in the queue.
[0065] Multithreading method:
[0066] (a) Create child processes: Process different tiles in parallel through multiple processes to improve data processing efficiency;
[0067] (b) Inter-process communication: Create multiple thread-safe queues to transfer data between multiple processes;
[0068] (c) Parallel computing: Use asynchronous methods to execute functions, avoid resource competition, and improve overall processing speed;
[0069] (d) Context management and locking to prevent multiple processes from modifying shared resources simultaneously.
[0070] According to the requirements of the reading task, read the raster data within the specified geographic range, and perform necessary projection conversion on the raster data according to the coordinate projection method set in step 1; store the converted raster data in the corresponding data memory block, and then store the address of the data memory block in the pre-allocated data memory; finally, split each file into tiles, and allocate data memory for each tile.
[0071] Use parallel computing to read each tile, and read the processed tile data from the data memory in units of lines; calculate the coordinates corresponding to each tile; after obtaining the coordinates, read the tile data from the corresponding coordinates in the data memory according to the resampling method set in step 1, and then generate the corresponding tile image;
[0072] In the process of slicing and generating tile images, a matching XML file will also be generated. The XML file is used to describe the organization, name, geographic range, projection coordinates, tile format, pixel information and other contents of the map tile, so that the client can request the correct tile from the server.
[0073] In the above description, projection conversion involves the process of converting geographic coordinates to projection coordinates and pixel coordinates to projection coordinates. Slicing involves various calculation methods such as tile coordinate calculation, zoom level determination, and tile boundary range determination. A general coordinate conversion algorithm is used, which is introduced as follows:
[0074] (a) Convert geographic coordinates (latitude and longitude) to projection coordinates. For the Web Mercator projection, the formula is as follows:
[0075] x=λ·R·π / 180
[0076]
[0077] Where λ represents longitude, represents latitude, R is the radius of the earth
[0078] (b) Convert pixel coordinates to Mercator coordinates. First, convert pixel coordinates to tile coordinates, calculate the tile resolution based on the current zoom level, and calculate the meter coordinates at the current zoom level as follows:
[0079]
[0080] Where (Px, Py) is the given pixel coordinate and z is the zoom level
[0081] (c) Convert the pixel coordinates in the map tile to tile coordinates to determine the tile position of a pixel coordinate, as follows:
[0082]
[0083]
[0084] Where (Px, Py) is the given pixel coordinate, and tileSize is the tile size, usually 256 pixels.
[0085] (d) Determine the zoom level corresponding to a given pixel size. The specific implementation formula is as follows:
[0086]
[0087] Where PixelSize is the given resolution size, and R is the radius of the earth;
[0088] The pseudo code is as follows:
[0089]
[0090] (e) Calculate the tile boundary lines for a given tile coordinate (tx, ty) and zoom level. These boundary lines are the longitude and latitude in the Mercator coordinate system. The specific calculation logic is as follows:
[0091] Resolution calculation:
[0092] West border: west = tx × tileSize × res-180
[0093] South border: south = ty × tileSize × res-90
[0094] East boundary: oast = (tx+1) × tiloSizo × ros-180
[0095] North boundary: north = (ty + 1) × tukeSize × res-90
[0096] (f) Convert geographic coordinates (longitude and latitude) to pixel coordinates in the map tile as follows:
[0097]
[0098] Among them, resFact is half of the circumference of the earth's equator. For the Mercatort projection, this value is approximately 256*2*π. is the geographic coordinate system, z is the zoom level, and res is the resolution.
[0099] The core algorithm for tile generation of geospatial data is described as follows:
[0100] (g) Tile coordinate calculation algorithm:
[0101] The column coordinates represent the horizontal position of the tile in the hierarchy:
[0102]
[0103] The row coordinates represent the vertical position of the tile in the hierarchy:
[0104]
[0105] Where λ is the longitude of the center of the tile, φ is the latitude of the center of the tile, and z is the zoom level;
[0106] (h) Tile generation algorithm. The main process is as follows: obtain the raster data to be sliced. If the geographic coordinate system of the raster data is inconsistent with the coordinate projection method of the set tile, perform projection conversion; crop and scale the raster data according to the actual tile level and coordinates obtained in step 3, render the cropped tile data into image format, and finally store the generated tiles in a multi-level folder form according to the tile level and tile coordinates, such as: z / x / y.png.
[0107] Step 5: According to different image slice areas, merge the edge tiles in different framing areas;
[0108] First, select the tile folders generated by slicing two or more maps that need to be merged, compare the paths of the folders at each level to see if they are consistent, and filter out the files with the same name in the final subfolder as the image tile data at the edges of the two maps; after determining the map edge tiles that need to be merged, merge the tiles using the multi-map edge tile merging algorithm.
[0109] The multi-image edge tile merging algorithm is described as follows:
[0110] Read the original image and watermark image into the generated object, create an object for drawing on the original image, set the transparency of the watermark overlay on the original image for mixing, where the original pixel color is (R, G, B, A), and the target pixel color is (R', G', B', A'), then the mixing formula is as follows:
[0111] A"=A+A'(1-A)
[0112]
[0113] After the image merging is completed, the resources are released and saved to the specified path.
[0114] The present invention also provides an exception handling and detection method, which outputs an error message and terminates the execution of the program when an error is encountered in the program. At the same time, for the image channel information in the raster data to be sliced, if there is a problem that the communication information does not contain the Alpha channel value, it is allowed to simulate the Alpha channel by setting a default Alpha channel value to achieve a better slicing effect.
[0115] The present invention also proposes a raster data image framing and slicing and multi-image merging system, implements the raster data image framing and slicing and multi-image merging method, realizes raster data image framing and slicing and multi-image merging, and is divided into 5 modules, which respectively execute steps 1 to 5.
[0116] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for slicing and merging multiple images of a raster data image is implemented to realize slicing and merging multiple images of a raster data image.
[0117] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method for slicing and merging raster data images and multiple images is implemented to achieve slicing and merging raster data images and multiple images.
[0118] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.
[0119] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for slicing and merging multiple raster data images, characterized in that: The steps include: Step 1: Set the slice processing parameters, including: the latitude and longitude range of the raster data source file to be sliced, the slice level range, the resampling method, the coordinate projection method for generating tiles, the raster data source file address, the folder address for the slice result output, and the number of slice processes; Step 2: Obtain the raster data to be sliced according to the raster data source file address, and read the geographic information metadata of the raster data, which includes the row and column size of the raster data, the geographic coordinate system used, the geographic coordinates of the corner points, pixel information, and image channel information; Step 3: According to the set slice level range and longitude and latitude range parameters of the slice to be sliced, the corner point geographic coordinate information and pixel information of the read raster data are intersected in the same coordinate system to obtain the actual slice level range and longitude and latitude range where the slice operation needs to be performed; Step 4: Read the raster data within the actual latitude and longitude range where the slicing operation needs to be performed, perform projection conversion according to the coordinate projection method of generating tiles, slice the raster data after projection conversion to generate corresponding tiles, calculate the coordinates corresponding to each tile, read the tile data from the corresponding coordinates in the data memory according to the resampling method, and generate the corresponding tile image in combination with the slicing level range; Step 5: Merge the tile images at the edges of the two images.
2. The method for slicing and merging multiple raster data images according to claim 1, characterized in that: Step 3: According to the set slice level range and longitude and latitude range parameters, the corner point geographic coordinate information and pixel information of the read raster data are intersected in the same coordinate system to obtain the actual slice level range and longitude and latitude range where the slice operation needs to be performed. The specific method is as follows: Step 3.1, according to the corner geographic coordinates and pixel information of the read geographic information metadata, determine the level range that can be generated. The level range calculation formula is as follows: Among them, x srcMax 、x srcMin They represent the maximum and minimum longitude of the raster data, respectively; pixelSizeX and pixelSizeY represent the pixel values of the raster data in the X and Y directions, respectively; tileSize is the tile size; According to the set level range and the calculated level range that can be generated, the actual slice level range is obtained. The calculation process is as follows: With min =max(from tarMin ,With srcMin ) With max =min(of tarMax ,With srcMax ) Among them, z tarMin 、z tarMax Respectively represent the minimum and maximum level ranges of the settings, z srcMin 、z srcMax Respectively represent the calculated theoretical minimum and maximum level ranges; Step 3.2, based on the set latitude and longitude range to be sliced and the corner point geographic coordinates of the read geographic information metadata, calculate the actual latitude and longitude range where the slicing operation needs to be performed: x min =max(x tarMin ,x srcMin ) x max =min(x tarMax ,x srcMax ) and min =max(y tarMin ,and srcMin ) and max =min(and tarMax ,and srcMax ) Among them, x tarMin 、x tarMax Respectively represents the setting of minimum and maximum longitude, y tarMin ,y tarMax Respectively represent the minimum and maximum latitude settings, y srcMin ,y srcMax Respectively represent the minimum and maximum latitude of the raster data.
3. The method for slicing and merging multiple raster data images according to claim 1, characterized in that: Step 4: Read the raster data within the actual latitude and longitude range where the slicing operation needs to be performed, perform projection conversion according to the coordinate projection method of generating tiles, slice the raster data after projection conversion to generate corresponding tiles, calculate the coordinates corresponding to each tile, read the tile data from the corresponding coordinates in the data memory according to the resampling method, and generate the corresponding tile image in combination with the slicing level range, where: A multi-threaded mechanism is used to process file reading and writing operations on different physical storage locations. The thread reads the queue to obtain the raster data to be processed and the actual longitude and latitude range where the slicing operation needs to be performed, and uses the memory resources of the device where the service is located. If the current memory usage does not reach the set upper limit, the reading thread will continue to process the next task in the queue.
4. The method for slicing and merging multiple raster data images according to claim 3, characterized in that: Step 4: Read the raster data within the actual latitude and longitude range where the slicing operation needs to be performed, perform projection conversion according to the coordinate projection method of generating tiles, slice the raster data after projection conversion to generate corresponding tiles, calculate the coordinates corresponding to each tile, read the tile data from the corresponding coordinates in the data memory according to the resampling method, and generate the corresponding tile image in combination with the slicing level range, where: Read the raster data within the specified geographic range, and perform necessary projection conversion on the raster data according to the coordinate projection method set in step 1; store the converted raster data in the corresponding data memory block, and then store the address of the data memory block in the pre-allocated data memory; finally, split each file into tiles, and allocate data memory for each tile.
5. The method for slicing and merging multiple raster data images according to claim 3, characterized in that: Step 4: Read the raster data within the actual latitude and longitude range where the slicing operation needs to be performed, perform projection conversion according to the coordinate projection method of generating tiles, slice the raster data after projection conversion to generate corresponding tiles, calculate the coordinates corresponding to each tile, read the tile data from the corresponding coordinates in the data memory according to the resampling method, and generate the corresponding tile image in combination with the slicing level range, where: The generated tiles are stored in the form of multi-level folders according to the tile level and tile coordinates. In the process of slicing to generate tile images, a matching xml file is generated to describe the organization, name, geographic range, projection coordinates, tile format, and pixel information of the map tiles, so that the client can request the correct tiles from the server.
6. The method for slicing and merging multiple raster data images according to claim 3, characterized in that: Step 5: According to different image slice areas, merge the edge tiles in different framing areas. The specific method is as follows: First, select the tile folders generated by slicing two or more images to be merged, compare the paths of the folders at each level to see if they are consistent, and filter out the files with the same name in the final subfolder as the image tile data of the edge of the two images; After determining the image frame edge tiles that need to be merged, the tiles are merged using the multi-image frame edge tile merging algorithm; Read the original image and watermark image into the generated object, create an object for drawing on the original image, set the transparency of the watermark overlay on the original image for mixing, where the original pixel color is (R, G, B, A), and the target pixel color is (R', G', B', A'), then the mixing formula is as follows: A"=A+A'(1-A) After the image merging is completed, the resources are released and saved to the specified path.
7. The method for slicing and merging multiple raster data images according to claim 3, characterized in that: Exception handling and detection methods are set up to output error information and terminate program execution when an error is encountered in the program.
8. A raster data image slicing and multi-image merging system, characterized in that: The method for slicing and merging raster data images as described in any one of claims 1 to 7 is implemented to realize slicing and merging raster data images as well as merging multiple images, and is divided into five modules, and steps 1 to 5 are performed respectively.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for slicing and merging multiple images of raster data images as described in any one of claims 1 to 7 is implemented to realize slicing and merging multiple images of raster data images.
10. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for raster data image framing and slicing and merging multiple images as described in any one of claims 1 to 7 is implemented to achieve raster data image framing and slicing and merging multiple images.
Citation Information
Patent Citations
Tile map data organization method
CN101944132A
Raster data slice generating method and raster data slice generating system
CN105045930A
Parallel mode grid image slicing method
CN105550977A
Remote sensing image processing method, device and equipment
CN117670724A
GIS system tile storage format and method
CN118093575A