Efficient slicing method and device based on virtual mosaic technology
By adopting an efficient slicing method based on virtual mosaic technology in remote sensing image data slicing, using mergeJSON files and integer encoding, the problem of insufficient storage efficiency and processing flexibility in large-scale data processing in the existing technology is solved, and efficient and flexible remote sensing image data management is achieved.
Patent Information
- Application Number
- CN202510453352.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When processing large-scale remote sensing image data slicing, the prior art has shortcomings in storage efficiency, processing flexibility, dynamic access capability and metadata management, which affects its use effect in large-scale data sets or real-time analysis scenarios.
Using an efficient slicing method based on virtual mosaic technology, by uploading tiff image data to the object storage server, generating mergeJSON files, and building a slicing service based on mergeJSON, extracting tile images using resampling methods, and using integer encoding to improve storage and computing efficiency.
It realizes flexible and efficient management of large-scale remote sensing data, improves storage and computing efficiency, supports raster data integration in multiple formats, is suitable for processing large amounts of tile data, and simplifies data management and version control.
Smart Images

Figure CN119988657A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of remote sensing image map tile data slicing, and in particular to an efficient slicing method and device based on virtual mosaic technology. Background Art
[0002] Image data slicing is currently the key technology to solve the lightweight transmission, loading and display of large-scale volumetric remote sensing data on the web front end. It is an indispensable key step in the process of mass application of remote sensing satellite image data.
[0003] The most commonly used tool in practical applications is the GDAL (eospatial Data Abstraction Library) slicing tool. GDAL is the most popular remote sensing image processing library. It provides a series of operation functions for remote sensing image data, supports common impact data formats, and provides corresponding abstract structures to facilitate algorithm operations. Although GDAL2tiles has certain advantages in generating Web tiles, it has obvious disadvantages in storage efficiency, processing flexibility, dynamic access capabilities, and metadata management. In scenarios that require large-scale data sets or real-time analysis, these shortcomings may affect its use. Summary of the invention
[0004] In order to solve the existing problems, the present invention provides an efficient slicing method and device based on virtual mosaic technology, and the specific scheme is as follows: An efficient slicing method based on virtual mosaic technology comprises the following steps: S1, data preparation: upload the tiff image data to be sliced with the same coordinate system and overlapping areas to the object storage server to form a network accessible path; S2, metadata processing: read the metadata of each tiff file and calculate the quadkey, convert it into integer encoding and create a mergeJSON file of the tiff image data mosaic dataset; S3, tile service construction: build a mergeJSON-based tile service, calculate the tile geographic boundary according to the received zoom level (z), row number (y), and column number (x) parameters, and extract the corresponding tile image from the original raster data through the resampling method; S4, tile download: Calculate the tile level and row and column numbers according to the specified spatial range and level range, generate the request address by replacing the {x}, {y}, {z} placeholders, and download and save the tile data one by one.
[0005] Preferably, the resampling method in step S3 includes a bilinear interpolation or a nearest neighbor interpolation algorithm.
[0006] Preferably, step S3 specifically includes the following steps: S31, locate the corresponding tiff image from mergeJSON according to the requested x, y, z parameters; S32, calculating the geographic boundary of the target tile; S33, extract data from the located tiff image using the Rasterio library; S34, generating image slices according to the calculated tile boundaries and returning them to the user in a picture format.
[0007] Preferably, the method for calculating the tile row and column numbers in step S4 is: inversely calculating the tile row and column numbers of the corresponding pyramid level through the geographic coordinates.
[0008] The present invention also discloses a device for implementing the above method, comprising: Metadata processing module: used to parse tiff file metadata and generate mergeJSON files; Tile service module: used to calculate the quadkey integer code according to the level and row and column number parameters, and generate tiles through the tiff file under the code; Tile download module: used to convert geographic coordinate range into tile request address, batch download and store tile data.
[0009] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. After the computer program is run, any of the above methods is executed.
[0010] The present invention also discloses a computer system, including a processor and a storage medium, wherein a computer program is stored on the storage medium, and the processor reads and runs the computer program from the storage medium to execute any of the methods described above.
[0011] The beneficial effects of the present invention are: The remote sensing image data slicing scheme based on mergeJSON technology of the present invention can provide a flexible and efficient solution for managing and accessing large-scale remote sensing data. mergeJSON technology uses tiling and quadkey encoding, and then converts quadkey into integer encoding. This encoding method improves the efficiency of storage and calculation, and is suitable for use in applications that need to process a large amount of tile data. It is combined into an integer to support efficient image tiling processing, support raster data in various formats, facilitate the integration of multi-source image data, and can easily add new image sources or modify existing data. Version control makes data management more rigorous.
[0012] Integer encoding has significant advantages when processing tiles. First, in terms of storage efficiency, integer encoding takes up less storage space than quadkey strings. Second, in terms of computational efficiency, integer encoding allows the use of bit operations to quickly decode the row and column numbers of tiles. Through simple shift and mask operations, the rows and columns of tiles can be quickly extracted from integers. Therefore, when encoding and parsing tiles, integer encoding can quickly locate related tiles without having to check quadkey strings one by one, which greatly improves slicing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0014] Figure 1 A schematic diagram of an efficient slicing process based on virtual mosaic technology according to the present invention; Figure 2 This is a schematic diagram of the interior of the device according to an embodiment of the present invention.
[0015] Figure 3 This is an example of a typical mergeJSON file of the present invention. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] The purpose of the present invention is to solve the problem that the current mainstream method gdal2tiles has obvious shortcomings in storage efficiency, processing flexibility, dynamic access capability and metadata management when processing large-scale tiff image slices. The remote sensing image data slicing scheme based on mergeJSON technology can provide a flexible and efficient solution for managing and accessing large-scale remote sensing data.
[0018] The remote sensing image data slicing scheme based on mergeJSON technology can provide a flexible and efficient solution for managing and accessing large-scale remote sensing data. mergeJSON technology uses tiling and quadkey encoding, and then converts quadkey into integer encoding. This encoding method improves the efficiency of storage and calculation, and is suitable for use in applications that need to process a large amount of tile data. It is then combined into an integer, supports efficient image tiling processing, supports raster data in multiple formats, facilitates the integration of multi-source image data, and can easily add new image sources or modify existing data. Version control makes data management more rigorous.
[0019] Integer encoding has significant advantages when processing tiles. First, in terms of storage efficiency, integer encoding takes up less storage space than quadkey strings. Second, in terms of computational efficiency, integer encoding allows the use of bit operations to quickly decode the row and column numbers of tiles. Through simple shift and mask operations, the rows and columns of tiles can be quickly extracted from integers. Therefore, when encoding and parsing tiles, integer encoding can quickly locate related tiles without having to check quadkey strings one by one, which greatly improves slicing efficiency.
[0020] Firstly, the present invention provides an efficient image slicing method based on virtual mosaic technology, comprising: firstly preparing image data and setting up a file server, then integrating multiple remote sensing images (file server network path) to generate a mergeJSON virtual mosaic file dataset, and finally making tile requests according to the range and storing them locally, thereby making full use of the mergeJSON image integration and tiled quadkey encoding characteristics to realize efficient and flexible slicing processing of large-scale image data.
[0021] Furthermore, the present invention discloses an efficient storage method for raster map tile data, including: first preparing tiff remote sensing image data and building a data file server; then integrating multiple satellite images into a mosaic data set, creating a mergeJSON file, and developing a tool to generate the mergeJSON file. The specific generation of mergeJSON includes two steps. The first is metadata collection. First, it is necessary to extract metadata information of each input image, such as file path, spatial range, image attributes, etc.; then, the boundary of the entire data set is calculated according to the geographic range of all images, and the minimum and maximum zoom levels are determined. Finally, the mergeJSON is constructed according to the acquired and calculated information. The main components of the mergeJSON file include: name: The name of the dataset minzoom: minimum zoom level, indicating the minimum accessible tile zoom level maxzoom: Maximum zoom level, indicating the maximum tile zoom level that can be accessed.
[0022] bounds: The geographic extent covered by the dataset, usually expressed in the format of [minLongitude, minLatitude, maxLongitude, maxLatitude].
[0023] center: The latitude and longitude of the default center point and the zoom level, usually expressed as an array of [longitude, latitude, zoom].
[0024] tiles: A dictionary whose key is Quadkey (quadtree encoding), whose encoding length represents the number of tile levels, and whose letters represent the position of the tile of the current level in the previous level. The quadkey is converted to an integer encoding. The dictionary value behind it is the URL or file path of the raster data source corresponding to the tile.
[0025] like Figure 3 Shown is an example of a typical mergeJSON file.
[0026] The efficient slicing method and device of raster map tile data of the present invention integrates multi-source remote sensing satellite image data to build a tiff data service. Mosaic data sets, create mergeJSON files, parse mergeJSON files, and extract relevant information of each tile (such as image path, boundary, etc.). Request specific tiles through HTTP, for example, request a certain zoom level and corresponding row and column numbers, convert quadkey into integer code by parsing, determine the tile level and row and column numbers to be returned, generate a request link, and store the tiles returned by the request according to the level, row and column number rules.
[0027] Embodiment: In the embodiments of the present disclosure, an efficient slicing method based on virtual mosaic technology is provided. Taking tile data in the xyz tile format as an example, the map tile rules of the xyz specification are as follows: the image of the map when it is displayed in full size starts from the upper left corner, and is cut downward and to the right. The default size of the cut is 256*256 pixels, the grid row number in the upper left corner is 0, the column number is 0, and it increases downward and to the right.
[0028] like Figure 1 As shown: An efficient slicing method based on virtual mosaic technology includes the steps of data preparation, slice generation, access and integration. Specifically, the following steps are included: S1, data preparation: upload the tiff image data to be sliced with the same coordinate system and overlapping areas to the object storage server to form a network accessible path; S2, metadata processing: Create a mergeJSON file of the tiff image data mosaic dataset. This includes reading the metadata of each tiff file, determining the coordinate range of the dataset and the minimum and maximum zoom levels supported, calculating its position in the tile coordinate system (Quadkey), converting it to integer encoding, converting the geographic boundaries of each tiff file to tile coordinates, and then converting it to Quadkey and the corresponding image path.
[0029] S3, tile service construction: construct a mergeJSON-based tile service, calculate the tile geographic boundary according to the received zoom level (z), row number (y), and column number (x) parameters, and extract the corresponding tile image from the original raster data through a resampling method; wherein the resampling method includes a bilinear interpolation or a nearest neighbor interpolation algorithm.
[0030] Specifically, step S3 includes the following steps: S31, locate the corresponding tiff image from mergeJSON according to the requested x, y, z parameters; S32, calculating the geographic boundary of the target tile; S33, extract data from the located tiff image using the Rasterio library; S34, generating image slices according to the calculated tile boundaries and returning them to the user in a picture format.
[0031] S4, tile download: Calculate the tile level and row and column numbers according to the specified spatial range and level range, generate the request address by replacing the {x}, {y}, {z} placeholders, and download and save the tile data one by one.
[0032] The calculation method of the tile row and column number is: reversely calculate the tile row and column number of the corresponding pyramid level through the geographic coordinates.
[0033] That is: the tile download tool directly requests the tile data address, and uses {x}, {y}, and {z} as "placeholders" to replace the actual requested tile address. The layer, row number, and column number of the corresponding tile can be calculated according to the geographic coordinate position to directly request the file according to the path of the tile service module interface. After receiving the corresponding parameters, the tile server interface finds the corresponding remote sensing image from mergeJSON according to the requested tile information, and uses the Rasterio database to extract data from the TIFF image, and generates the corresponding image slice according to the requested tile boundary. The generated tiles will finally be returned to the user in image format.
[0034] like Figure 2 As shown, the present invention also discloses a device for implementing the above method, comprising: Metadata processing module: used to parse tiff file metadata and generate mergeJSON files; Tile service module: used to calculate the quadkey integer code according to the level and row and column number parameters, and generate tiles through the tiff file under the code; Tile download module: used to convert geographic coordinate range into tile request address, batch download and store tile data.
[0035] The present invention also discloses a computer-readable storage medium and a computer system. The computer-readable storage medium stores a computer program, and after the computer program is run, the method for efficient slicing based on virtual mosaic technology is executed. A computer system includes a processor and a storage medium, wherein the storage medium stores a computer program, and the processor reads and runs the computer program from the storage medium to execute the method for efficient slicing based on virtual mosaic technology.
[0036] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or a combination of the two. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. The technician may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention.
[0037] The various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in cooperation with a DSP core, or any other such configuration.
[0038] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read and write information from / to the storage medium. In an alternative, a storage medium may be integrated into a processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in a user terminal as discrete components.
[0039] In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented as a computer program product in software, each function may be stored on or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include both computer storage media and communication media, including any medium that facilitates the transfer of a computer program from one place to another. Storage media may be any available medium that can be accessed by a computer. As an example and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer. Any connection is also properly referred to as a computer-readable medium. For example, if the software is transmitted from a website, a server, or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wherein disk often reproduces data magnetically, while disc reproduces data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0040] The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein, but should be granted the widest scope consistent with the principles and novel features disclosed herein.
[0041] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An efficient slicing method based on virtual mosaic technology, characterized in that: The following steps are involved: S1, data preparation: upload the tiff image data to be sliced with the same coordinate system and overlapping areas to the object storage server to form a network accessible path; S2, metadata processing: read the metadata of each tiff file and calculate the quadkey, convert it into integer encoding and create a mergeJSON file of the tiff image data mosaic dataset; S3, tile service construction: build a mergeJSON-based tile service, calculate the tile geographic boundary according to the received zoom level (z), row number (y), and column number (x) parameters, and extract the corresponding tile image from the original raster data through the resampling method; S4, tile download: Calculate the tile level and row and column numbers according to the specified spatial range and level range, generate the request address by replacing the {x}, {y}, {z} placeholders, and download and save the tile data one by one.
2. The method according to claim 1, characterized in that: The resampling method in step S3 includes a bilinear interpolation or a nearest neighbor interpolation algorithm.
3. The method according to claim 1, characterized in that Step S3 specifically includes the following steps: S31, locate the corresponding tiff image from mergeJSON according to the requested x, y, z parameters; S32, calculating the geographic boundary of the target tile; S33, extract data from the located tiff image using the Rasterio library; S34, generating image slices according to the calculated tile boundaries and returning them to the user in a picture format.
4. The method according to claim 1, characterized in that The calculation method of the tile row and column numbers in step S4 is: reversely calculate the tile row and column numbers of the corresponding pyramid level through the geographic coordinates.
5. A device for implementing the method according to any one of claims 1 to 4, characterized in that: include: Metadata processing module: used to parse tiff file metadata and generate mergeJSON files; Tile service module: used to calculate the quadkey integer code according to the level and row and column number parameters, and generate tiles through the tiff file under the code; Tile download module: used to convert geographic coordinate range into tile request address, batch download and store tile data.
6. A computer-readable storage medium, characterized in that: A computer program is stored on the medium, and after the computer program is run, the method according to any one of claims 1 to 4 is executed.
7. A computer system, characterized in that: The method comprises a processor and a storage medium, wherein a computer program is stored in the storage medium, and the processor reads and runs the computer program from the storage medium to execute the method as claimed in any one of claims 1 to 4.
Citation Information
Patent Citations
Space-time coding method, space-time index and query method and device
CN109992636A
Large-scale satellite data-oriented vector space information gridding storage management method
CN115408382A
Tile-based remote sensing image storage method and system
CN115470366A
Storage method and device for raster image tile data
CN118606274A