Thematic map slicing method and device, electronic equipment and computer storage medium

By dynamically acquiring the dimensions of the thematic map and the user-input boundary range, constructing bounding box parameters using Web Mercator projection, generating tiling subtasks and processing them concurrently, the problem of traditional map tiling tools being unable to adapt to thematic maps lacking spatial information is solved, achieving efficient tiling and visualization integration.

CN121883503APending Publication Date: 2026-04-17AERIAL PHOTOGRAMMETRY & REMOTE SENSING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
AERIAL PHOTOGRAMMETRY & REMOTE SENSING CO LTD
Filing Date
2025-12-31
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional map tiling tools cannot adapt to thematic maps that lack spatial information, resulting in tile misalignment, missing or overlapping images, making them difficult to integrate and apply in GIS platforms.

Method used

By dynamically obtaining the dimensions of the thematic map and the user-input boundary range, an adaptive tiling scheme is constructed. The bounding box parameters are constructed using Web Mercator projection, tiling subtasks are generated and processed concurrently, and rendered into image files of specified sizes.

Benefits of technology

It achieves standard tile-based processing of thematic maps without spatial information, avoiding tile misalignment and missing tiles, and supports efficient concurrent tiling and visualization integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121883503A_ABST
    Figure CN121883503A_ABST
Patent Text Reader

Abstract

The invention provides a thematic map slicing method and device, electronic equipment and a computer storage medium, and belongs to the technical field of image processing. The method comprises the following steps: acquiring the width, height and input range of a thematic map; dynamically constructing a temporary slicing scheme based on the width, the height and the input range; according to the temporary slicing scheme and a slicing hierarchy input by a user, generating a plurality of slicing subtasks, and distributing the slicing subtasks to a plurality of threads for concurrent processing; for each slice subtask, extracting a data block from a world coverage object with Web Mercator projection based on a bounding box parameter corresponding to the slice subtask, and rendering the data block into a picture file with a specified size; by dynamically acquiring the size of the thematic map and the range of four degrees input by the user, an adaptive slicing scheme is constructed, so that standard tiling processing of the thematic map without space information is realized, slice dislocation and missing are effectively avoided, and efficient concurrent slicing and visual integration are supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a thematic map tiling method, apparatus, electronic device, and computer storage medium. Background Technology

[0002] Map tiling technology uses algorithms such as quadtrees to cut large maps into multiple smaller images, dynamically loading them according to scaling levels. This is a key method for achieving lightweight transmission and rapid display of maps on the web. Traditional map tiling tools typically require the source map to have a complete projected coordinate system and spatial boundaries for accurate tiling and rendering based on a preset grid scheme. However, in practical applications, there are many thematic maps lacking spatial information, such as scanned images of paper atlases and historical maps. These lack metadata such as projected coordinates and spatial boundaries, making them unsuitable for direct adaptation by conventional tiling tools. During the tiling process, these maps often suffer from problems such as misaligned tile grids, missing images, or overlapping due to the inability to determine the actual spatial boundaries. This makes it difficult to generate standardized tile map services, limiting the integration and application of thematic maps in GIS platforms. Therefore, there is an urgent need for a tiling method that can dynamically adapt to thematic maps lacking spatial information, enabling seamless integration with existing GIS service systems. Summary of the Invention

[0003] The purpose of this invention is to provide a thematic map tiling method, apparatus, electronic device, and computer storage medium. By dynamically acquiring the size of the thematic map and the user-input boundary range, an adaptive tiling scheme is constructed, realizing the standard tiled processing of thematic maps without spatial information, effectively avoiding tile misalignment and missing tiles, and supporting efficient concurrent tiling and visualization integration.

[0004] In a first aspect, the present invention provides a thematic map tiling method, comprising: Obtain the width, height, and input boundaries of the thematic map; where the input boundaries include: minimum longitude, maximum longitude, minimum latitude, and maximum latitude; Based on the width, height, and input boundary range, a temporary tiling scheme is dynamically constructed; wherein, the dynamic construction of the temporary tiling scheme includes: converting the input boundary range into a Web Mercator projection to construct the bounding box parameters of the thematic map; Based on the temporary tiling scheme and the tiling level input by the user, multiple tiling subtasks are generated, and it is determined whether the boundary range corresponding to each tiling subtask intersects with the bounding box parameters of the thematic map. The tiling subtasks corresponding to the intersecting boundary ranges are added to the execution task queue. The task queue is divided into multiple task sets, and then distributed to multiple threads for concurrent processing. For each slice subtask in a collection of multiple tasks, based on the bounding box parameters corresponding to the slice subtask, data blocks are extracted from the world overlay object with Web Mercator projection and rendered as image files of a specified size.

[0005] In some preferred embodiments of the present invention, the step of converting the input boundary range into a Web Mercator projection to construct the bounding box parameters of a thematic map includes: Read and convert the thematic map into an unprojected raw grid overlay object; The input boundary range is converted to the Web Mercator projection to obtain the projected coordinates; the projected coordinates include: the minimum longitude, the maximum longitude, the minimum latitude, and the maximum latitude. Calculate the width and height under projection based on the coordinates after projection. Based on the projected coordinates, projected width, and projected height, the original grid overlay object is converted into a world overlay object with Web Mercator projection to construct the bounding box parameters of the thematic map.

[0006] In some preferred embodiments of the present invention, the thematic map is read by calling the read coverage method, the input parameter of the read coverage method being the image storage path; the original grid coverage object is converted into a world coverage object with Web Mercator projection by calling the calculate world coverage method, the input parameters of the calculate world coverage method being the minimum longitude, the maximum longitude, the minimum latitude, and the maximum latitude.

[0007] In some preferred embodiments of the present invention, the step of generating multiple tile subtasks based on a temporary tiling scheme and the tile level input by the user, and determining whether the boundary range corresponding to each tile subtask intersects with the bounding box parameters of the thematic map, and adding the tile subtasks corresponding to the intersecting boundary ranges to the execution task queue, includes: Based on the maximum level of the slice input by the user, determine the slice subtasks based on the quadtree structure at each level; Iterate through each slice subtask at each level to obtain the boundary range of the slice subtask. Intersection determination is performed between the four boundaries of each slice subtask and the bounding box parameters of the thematic map; If the determination result is intersection, the slice subtask is added to the execution task queue as a slice subtask to be executed; If the determination result is that they do not intersect, then skip the current preset slice subtask.

[0008] In some preferred embodiments of the present invention, multiple slice subtasks in the execution task queue are divided into multiple task sets, which is achieved by calling a method to obtain all task sets. The input parameter of the method to obtain all task sets is the maximum level of the slice.

[0009] In some preferred embodiments of the present invention, for each slice subtask in a plurality of task sets, the step of extracting data blocks from a world overlay object with Web Mercator projection based on the bounding box parameters corresponding to the slice subtask and rendering them as image files of a specified size includes: Input the bounding box parameters corresponding to the world overlay object and the slice subtask; Based on the spatial extent defined by the bounding box parameters corresponding to the slice subtask, extract the corresponding sub-data blocks from the world overlay object; Render the sub-data block into an image file of the specified size.

[0010] In some preferred embodiments of the present invention, the sub-data block is rendered as an image file of a specified size by calling the rendering tile method. The input parameters of the rendering tile method are the bounding box parameters corresponding to the world overlay object and the slice subtask.

[0011] Secondly, the present invention provides a thematic map tiling device, comprising: The data acquisition module is used to obtain the width, height, and input boundaries of the thematic map; the input boundaries include: minimum longitude, maximum longitude, minimum latitude, and maximum latitude. The tile scheme construction module is used to dynamically construct temporary tile schemes based on width, height, and input boundary ranges. The dynamic construction of temporary tile schemes includes converting the input boundary ranges into a Web Mercator projection to construct the bounding box parameters of the thematic map. The slice subtask processing module is used to generate multiple slice subtasks based on the temporary slicing scheme and the slice level input by the user, and to determine whether the four boundaries of each slice subtask intersect with the bounding box parameters of the thematic map. The slice subtasks corresponding to the intersecting four boundaries are added to the execution task queue. The slice subtask distribution module is used to divide multiple slice subtasks in the task queue into multiple task sets and distribute them to multiple threads for concurrent processing. The rendering module is used to extract data blocks from a world overlay object with Web Mercator projection and render them as image files of a specified size, based on the bounding box parameters corresponding to each slice subtask in a collection of multiple tasks.

[0012] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the thematic map tiling method provided in the first aspect above.

[0013] Fourthly, the present invention provides a computer storage medium storing computer-executable instructions, which, when called and executed by a processor, cause the processor to implement the thematic map tiling method provided in the first aspect.

[0014] This invention brings the following beneficial effects: This invention provides a thematic map tiling method, apparatus, electronic device, and computer storage medium. The method includes: obtaining the width, height, and input boundary range of a thematic map; wherein the input boundary range includes: input minimum longitude, input maximum longitude, input minimum latitude, and input maximum latitude; dynamically constructing a temporary tiling scheme based on the width, height, and input boundary range; wherein dynamically constructing the temporary tiling scheme includes: converting the input boundary range into a Web Mercator projection to construct the bounding box parameters of the thematic map; generating multiple tiling sub-tasks according to the temporary tiling scheme and the tiling level input by the user, and determining the boundary range corresponding to each tiling sub-task and the bounding box of the thematic map. If the parameters intersect, the corresponding tile subtasks with intersecting boundary ranges are added to the execution task queue. Multiple tile subtasks in the execution task queue are divided into multiple task sets and assigned to multiple threads for concurrent processing. For each tile subtask in the multiple task sets, data blocks are extracted from the world overlay object with Web Mercator projection based on the bounding box parameters corresponding to the tile subtask, and rendered as image files of a specified size. By dynamically obtaining the thematic map size and the user-input boundary range, an adaptive tiling scheme is constructed, realizing standard tile processing for thematic maps without spatial information, effectively avoiding tile misalignment and missing tiles, and supporting efficient concurrent tiling and visualization integration. Attached Figure Description

[0015] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0016] Figure 1 A flowchart of a thematic map tiling method provided in an embodiment of the present invention; Figure 2This is a schematic diagram illustrating the principle of Web Mercator projection slicing, provided as an embodiment of the present invention. Figure 3 A flowchart of subtask generation and filtering provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the process of rendering tiles according to an embodiment of the present invention; Figure 5 This is a schematic diagram of a three-layer thematic map tile rendering result provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a thematic map tiling device provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0017] Icons: 310 - Data acquisition module; 320 - Slicing scheme construction module; 330 - Slicing subtask processing module; 340 - Slicing subtask distribution module; 350 - Rendering module; 400 - Memory; 401 - Processor; 402 - Bus; 403 - Communication interface. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0019] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0020] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0021] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0022] Furthermore, terms such as "horizontal," "vertical," and "sag" do not imply that components must be absolutely horizontal or suspended, but rather that they can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," not that the structure must be completely horizontal, but can be slightly tilted.

[0023] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0024] This application proposes a thematic map tiling method. The core idea is to "dynamically define spatial information" and construct an adaptive tiling method. First, before the tiling task is triggered, the system needs to parse the metadata of the thematic layer in real time. This includes automatically obtaining its width and height and adaptively calculating the resolution based on the input boundary range. Subsequently, based on these dynamic parameters, a temporary tiling scheme that perfectly matches the thematic map is constructed in real time, enabling the thematic map to be successfully published and invoked as a standard tile map service, achieving seamless integration of thematic map visualization and GIS service infrastructure.

[0025] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0026] Example 1 This invention provides a thematic map tiling method, applied to a thematic map image processing system. (See also...) Figure 1 The flowchart shown in this embodiment of the invention provides a thematic map tiling method, which includes: Step S102: Obtain the width, height, and input boundaries of the thematic map; wherein, the input boundaries include: input minimum longitude, input maximum longitude, input minimum latitude, and input maximum latitude.

[0027] Specifically, the system reads the image file and directly parses the image's width (PWidth) and height (PHeight) from its metadata or pixel matrix. These two parameters define the physical dimensions of the thematic map in the pixel coordinate system. Simultaneously, since such thematic maps do not contain projected coordinate information, the system needs to receive the geographic range specified by the user based on actual geographical knowledge or external reference materials, i.e., the input boundary range. This range is defined by the user-provided minimum longitude (MinX), maximum longitude (MaxX), minimum latitude (MinY), and maximum latitude (MaxY), forming a preliminary geographic rectangular area corresponding to the image content. Obtaining the width, height, and input boundary range essentially establishes the initial association between the pure image pixel dimension and the user-desired geographic spatial dimension, providing an indispensable initial parameter set for subsequent steps to achieve accurate mapping and dynamic spatial registration from pixel coordinates to geographic coordinates.

[0028] Step S104: Dynamically construct a temporary tiling scheme based on the width, height, and input boundary range; wherein, dynamically constructing the temporary tiling scheme includes: converting the input boundary range into a Web Mercator projection to construct the bounding box parameters of the thematic map.

[0029] Specifically, using the width, height, and input boundary range obtained in the previous step, a temporary tiling scheme that perfectly matches the thematic map is generated in real time through coordinate transformation and calculation. This scheme is not a predefined static grid, but rather "tailor-made" according to the parameters of each thematic map being processed, thereby ensuring precise alignment between the tiling grid and the image content and fundamentally avoiding tiling misalignment or missing pieces.

[0030] Furthermore, in some preferred embodiments of the present invention, the step of converting the input boundary range to a Web Mercator projection to construct the bounding box parameters of the thematic map includes: reading and converting the thematic map into an unprojected original grid overlay object; converting the input boundary range to a Web Mercator projection to obtain the projected coordinates; wherein the projected coordinates include: the minimum longitude, the maximum longitude, the minimum latitude, and the maximum latitude; calculating the width and height under projection based on the projected coordinates; and converting the original grid overlay object into a world overlay object with a Web Mercator projection based on the projected coordinates, the width under projection, and the height under projection to construct the bounding box parameters of the thematic map.

[0031] For details, see Figure 2 The illustrated embodiment of the present invention provides a schematic diagram of the Web Mercator projection tiling principle. The system reads an image file using the readCoverage method and converts it into an unprojected raw grid cover object (GridCoverage), which contains only pixel matrix information. Subsequently, the system starts this dynamic construction process. The input to this process consists of two parts: first, the user-inputted latitude and longitude range (MinX, MaxX, MinY, MaxY); and second, the raw grid cover object (GridCoverage) obtained in the previous step. Next, a projection transformation is performed, using a coordinate transformation algorithm to convert the user-inputted latitude and longitude range into coordinates under the Web Mercator projection, obtaining the minimum longitude (MinX) after projection. Mercator Maximum longitude (MaxX) Mercator Minimum latitude (MinY) Mercator ) and maximum latitude (MaxY) Mercator The units are converted to meters. Then, the calculation phase begins, where the projected geographic width (WorldWidth = MaxX) is calculated based on the projected coordinates. Mercator -MinX Mercator ) and height (WorldHeight=MaxY) Mercator -MinY Mercator Ultimately, during the construction phase, the system is based on the projection origin (MinX). Mercator MinY Mercator Using the calculated WorldWidth and WorldHeight, the precise bounding box (BBOX) parameters of the thematic map in the Web Mercator coordinate system are constructed, and the original gridcoverage is converted into a worldcoverage with real geographic coordinates. This completes the process.

[0032] Furthermore, in some preferred embodiments of the present invention, the thematic map is read by calling the read coverage method, the input parameter of the read coverage method being the image storage path; the original grid coverage object is converted into a world coverage object with Web Mercator projection by calling the calculate world coverage method, the input parameters of the calculate world coverage method being the minimum longitude, the maximum longitude, the minimum latitude, and the maximum latitude.

[0033] Specifically, referring to the key method illustration in Table 1, the `readCoverage` method is the data entry point. Its input parameter is the storage path of the image file. Its function is to read the thematic map image file from the disk into memory and encapsulate it into a `GridCoverage` object operable by the GeoTools library. This object at this stage only contains raster data and has no spatial reference. The `calcWorldCoverage` method is the core of spatial registration. It receives the user-input latitude and longitude parameters and, combined with the image `GridCoverage` obtained in the previous step, generates a new `WorldCoverage` object with Web Mercator projection through internal coordinate transformation and affine transformation. This object integrates the pixel matrix with the geographic coordinate system, making subsequent geographic-range-based tiling operations possible.

[0034] Table 1

[0035] Step S106: Based on the temporary tiling scheme and the tiling level input by the user, generate multiple tiling subtasks, and determine whether the boundary range corresponding to each tiling subtask intersects with the bounding box parameters of the thematic map. Add the tiling subtasks corresponding to the intersecting boundary ranges to the execution task queue.

[0036] For details, see Figure 3 The illustrated embodiment of the present invention provides a subtask generation and filtering flowchart. After obtaining the WorldCoverage object with spatial information and its spatial extent, the system first inputs the user-defined maximum tile level (tileMaxZoom), denoted as Z. Subsequently, it calculates the preset total number of tiles at the current level; that is, according to the quadtree rule, the world is divided into 2 sub-levels at level Z. Z ×2 Z Each tile. The process then enters a phase of iterating through each preset tile task. For each task in the loop, the system obtains the range of each preset tile task. Next, it checks the intersection of this preset task's range with the spatial range of WorldCoverage. If the result is an intersection, the preset task is added to the execution task queue as a valid tile subtask. If the result is a non-intersection, the current task is skipped.

[0037] Once all preset tasks have been processed, the process enters the stage of splitting the task set for subsequent concurrent processing. At this point, the subtask generation and filtering process is complete. This mechanism ensures that only relevant regions are generated as slice tasks, thus significantly improving processing efficiency.

[0038] Furthermore, in some preferred embodiments of the present invention, the steps of generating multiple slice subtasks based on the temporary tiling scheme and the slice level input by the user, and determining whether the boundary range corresponding to each slice subtask intersects with the bounding box parameters of the thematic map, and adding the slice subtasks corresponding to the intersecting boundary ranges to the execution task queue, include: determining slice subtasks based on a quadtree structure at each level according to the maximum slice level input by the user; sequentially traversing each slice subtask at each level to obtain the boundary range corresponding to the slice subtask; performing an intersection determination on the boundary range corresponding to each slice subtask and the bounding box parameters of the thematic map; if the determination result is intersection, adding the slice subtask as a slice subtask to be executed to the execution task queue; if the determination result is non-intersection, skipping the current preset slice subtask.

[0039] Specifically, the system traverses each tile grid (tile information object (TileInfo)) in the quadtree structure level by level, from level 1 to the user-specified tileMaxZoom level. For each grid, its fixed geographic extent (TileBBOX) is obtained. Through spatial geometric operations, it is determined whether the TileBBOX intersects with the bounding box (BBOX) of the thematic map. If they intersect, it means that the tile contains part of the thematic map content, and it is added to the execution queue; if they do not intersect, it is skipped directly, ensuring that each task in the task queue is a "valid task," which is highly targeted and lays the foundation for subsequent efficient parallel processing.

[0040] Furthermore, in some preferred embodiments of the present invention, multiple slice subtasks in the execution task queue are divided into multiple task sets, which is achieved by calling a method to obtain all task sets. The input parameter of the method to obtain all task sets is the maximum level of the slice.

[0041] Specifically, referring to Table 1, the `getAllTaskCollections` method is responsible for task encapsulation and allocation optimization. Its input is `tileMaxZoom`, and its internal logic is based on the task queue generated in previous steps. This method doesn't simply return the queue; instead, it intelligently groups all tile subtasks in the queue, splitting them into multiple task collections (a list of `List<TileInfo>` objects). This partitioning strategy typically considers factors such as data locality and task load balancing, aiming to break down a large task into multiple appropriately granular, independent sets of smaller tasks. This makes it ideal for concurrent processing by multiple threads or processes, and is a key step in improving overall tile throughput.

[0042] Step S108: Divide the multiple slice subtasks in the task queue into multiple task sets and assign them to multiple threads for concurrent processing.

[0043] Specifically, the multiple task sets after being divided are distributed to multiple threads for concurrent execution. Each thread independently processes one task set, responsible for rendering the output of all tile subtasks within that set. Since each tile task (extracting and rendering data based on bounding boxes (BBOX)) is independent of each other, concurrent processing does not cause resource contention conflicts. This maximizes the utilization of the computing power of multi-core CPUs, reducing tasks that might have taken hours to process serially to minutes or even less, greatly improving the efficiency of publishing thematic maps as tile map services.

[0044] Step S110: For each slice subtask in the multiple task sets, extract data blocks from the world overlay object with Web Mercator projection based on the bounding box parameters corresponding to the slice subtask, and render them as image files of a specified size.

[0045] For details, see Figure 4 The illustrated embodiment of the present invention provides a schematic diagram of a tile rendering process. For each tile subtask received by a concurrent thread, the core operation is to first input a pre-constructed WorldCoverage containing the entire thematic map data and the corresponding bounding box parameters (BBOX) (a specific, small geographic bounding box). Next, the system extracts sub-data blocks from the WorldCoverage based on the BBOX range, that is, precisely "crops" out the small patch of raster data corresponding to the BBOX range from the WorldCoverage. Then, this sub-data block is rendered as a 256×256 image, i.e., resampling and rendering according to the standard tile size (256×256 pixels), ultimately generating a PNG image file, which is stored according to tile naming rules (usually including Z, X, Y layer row and column numbers). At this point, a standard map tile that can be recognized and used by a GIS server (such as OpenStreetMap, Google Maps) is generated, and the process ends.

[0046] Furthermore, in some preferred embodiments of the present invention, for each slice subtask in a set of multiple tasks, the step of extracting data blocks from a world overlay object with Web Mercator projection based on the bounding box parameters corresponding to the slice subtask and rendering them into an image file of a specified size includes: inputting the world overlay object and the bounding box parameters corresponding to the slice subtask; extracting corresponding sub-data blocks from the world overlay object according to the spatial range defined by the bounding box parameters corresponding to the slice subtask; and rendering the sub-data blocks into an image file of a specified size.

[0047] Specifically, the input consists of a WorldCoverage object representing the entire thematic map and a bounding box object (BBOX) representing a small geographic unit. The rendering engine (such as GeoTools' renderTile method) first performs rapid location and data extraction within the WorldCoverage based on the spatial extent defined by the BBOX, obtaining a "data window" that precisely matches that extent. Then, this data window undergoes color rendering, anti-aliasing, and other graphic processing, and is output as a fixed-size (e.g., 256x256) bitmap object (such as a Java BufferedImage object), finally encoded and saved in a web-friendly format such as PNG. The rendering result is as follows. Figure 5 The diagram shown is a schematic representation of a three-layer thematic map tile rendering result provided by an embodiment of the present invention.

[0048] Furthermore, in some preferred embodiments of the present invention, the sub-data block is rendered as an image file of a specified size by calling the rendering tile method, the input parameters of which are the bounding box parameters corresponding to the world overlay object and the slice subtask.

[0049] Specifically, referring to Table 1, the renderTile method is the final execution unit for converting geographic data into image pixels. It takes a WorldCoverage object with spatial information and the bounding box object (BBOX) of a specific tile as input parameters. It uses spatial indexing to quickly extract the subset of data corresponding to the BBOX from the WorldCoverage, then calls the graphics rendering engine to draw according to preset image size, format, and rendering rules (such as interpolation methods), returning a complete image object. This encapsulation makes the core rendering logic of the tile modular and reusable, making it a crucial and efficient part of the entire tile pipeline. Through this method, the dynamically constructed spatial information is ultimately materialized into multiple standard map tile images.

[0050] This invention provides a thematic map tiling method, comprising: obtaining the width, height, and input boundary range of the thematic map; wherein the input boundary range includes: input minimum longitude, input maximum longitude, input minimum latitude, and input maximum latitude; dynamically constructing a temporary tiling scheme based on the width, height, and input boundary range; wherein dynamically constructing the temporary tiling scheme includes: converting the input boundary range into a Web Mercator projection to construct the bounding box parameters of the thematic map; generating multiple tiling sub-tasks according to the temporary tiling scheme and the tiling level input by the user, and determining whether the boundary range corresponding to each tiling sub-task intersects with the bounding box parameters of the thematic map, and tiling the corresponding sub-tasks accordingly. The tile subtasks corresponding to the intersection of the four boundaries are added to the execution task queue; multiple tile subtasks in the execution task queue are divided into multiple task sets and assigned to multiple threads for concurrent processing; for each tile subtask in the multiple task sets, data blocks are extracted from the world overlay object with Web Mercator projection based on the bounding box parameters corresponding to the tile subtask, and rendered as image files of a specified size; by dynamically obtaining the size of the thematic map and the four boundaries input by the user, an adaptive tiling scheme is constructed, realizing the standard tile processing of thematic maps without spatial information, effectively avoiding tile misalignment and missing tiles, and supporting efficient concurrent tiling and visualization integration.

[0051] Example 2 Based on the above embodiments, this invention provides a thematic map tiling device, see [link to related document]. Figure 6 The diagram shown is a structural schematic of a thematic map tiling device provided in an embodiment of the present invention. The device includes: The data acquisition module 310 is used to acquire the width, height, and input boundary range of the thematic map; wherein, the input boundary range includes: input minimum longitude, input maximum longitude, input minimum latitude, and input maximum latitude; The tile scheme construction module 320 is used to dynamically construct temporary tile schemes based on width, height, and input boundary range; wherein, dynamically constructing temporary tile schemes includes: converting the input boundary range into a Web Mercator projection to construct the bounding box parameters of the thematic map; The slice subtask processing module 330 is used to generate multiple slice subtasks based on the temporary slicing scheme and the slice level input by the user, and to determine whether the four boundaries of each slice subtask intersect with the bounding box parameters of the thematic map, and to add the slice subtasks corresponding to the intersecting four boundaries to the execution task queue. The slice subtask distribution module 340 is used to divide multiple slice subtasks in the task queue into multiple task sets and distribute them to multiple threads for concurrent processing. The rendering module 350 is used to extract data blocks from the world overlay object with Web Mercator projection and render them as image files of a specified size, based on the bounding box parameters corresponding to the slice subtask in the multiple task sets.

[0052] Furthermore, in some preferred embodiments of the present invention, the tiling scheme construction module 320 is used to read and convert the thematic map into an unprojected original grid overlay object; convert the input boundary range into a Web Mercator projection to obtain the projected coordinates; wherein the projected coordinates include: the minimum longitude, the maximum longitude, the minimum latitude, and the maximum latitude; calculate the width and height under projection based on the projected coordinates; and convert the original grid overlay object into a world overlay object with a Web Mercator projection according to the projected coordinates, the width under projection, and the height under projection to construct the bounding box parameters of the thematic map.

[0053] Furthermore, in some preferred embodiments of the present invention, the thematic map is read by calling a read coverage method, the input parameter of which is the image storage path; the original grid coverage object is converted into a world coverage object with Web Mercator projection by calling a calculate world coverage method, the input parameters of which are the minimum longitude, the maximum longitude, the minimum latitude, and the maximum latitude.

[0054] Furthermore, in some preferred embodiments of the present invention, the slice subtask processing module 330 is used to determine the slice subtasks based on the quadtree structure at each level according to the maximum slice level input by the user; sequentially traverse each slice subtask at each level to obtain the boundary range corresponding to the slice subtask; perform an intersection determination between the boundary range corresponding to each slice subtask and the bounding box parameters of the thematic map; if the determination result is an intersection, the slice subtask is added to the execution task queue as a slice subtask to be executed; if the determination result is a non-intersection, the current preset slice subtask is skipped.

[0055] Furthermore, in some preferred embodiments of the present invention, multiple slice subtasks in the execution task queue are divided into multiple task sets, which is achieved by calling a method to obtain all task sets. The input parameter of the method to obtain all task sets is the maximum level of the slice.

[0056] Furthermore, in some preferred embodiments of the present invention, the rendering module 350 is used to input the bounding box parameters corresponding to the world overlay object and the slice subtask; extract the corresponding sub-data blocks from the world overlay object according to the spatial range defined by the bounding box parameters corresponding to the slice subtask; and render the sub-data blocks into image files of a specified size.

[0057] Furthermore, in some preferred embodiments of the present invention, the sub-data block is rendered as an image file of a specified size by calling the rendering tile method, wherein the input parameters of the rendering tile method are the bounding box parameters corresponding to the world overlay object and the slice subtask.

[0058] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the thematic map tiling device described above can be referred to the corresponding process in the aforementioned embodiments of the thematic map tiling method, and will not be repeated here.

[0059] Example 3 This invention also provides an electronic device for running a thematic map tiling method; see [link to related documentation]. Figure 7 The schematic diagram of an electronic device provided by the embodiment of the present invention shown below includes a memory 400 and a processor 401. The memory 400 is used to store one or more computer instructions, which are executed by the processor 401 to implement the above-mentioned thematic map tiling method.

[0060] Furthermore, Figure 7 The electronic device shown also includes a bus 402 and a communication interface 403. The processor 401, the communication interface 403 and the memory 400 are connected via the bus 402.

[0061] The memory 400 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 403 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 402 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0062] Processor 401 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 401 or by instructions in software form. Processor 401 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 400, and processor 401 reads information from memory 400 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0063] This invention also provides a computer storage medium storing computer-executable instructions. When these computer-executable instructions are called and executed by a processor, they cause the processor to implement the aforementioned thematic map tiling method. For specific implementation details, please refer to the method embodiments, which will not be repeated here.

[0064] The computer program products of the thematic map tiling method, apparatus and electronic device provided in the embodiments of the present invention include a computer storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0065] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and / or device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0066] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0067] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for tiling thematic maps, characterized in that, include: Obtain the width, height, and input boundaries of the thematic map; wherein, the input boundaries include: minimum longitude, maximum longitude, minimum latitude, and maximum latitude; Based on the width, height, and input boundary range, a temporary tiling scheme is dynamically constructed; wherein, the dynamic construction of the temporary tiling scheme includes: converting the input boundary range into a Web Mercator projection to construct the bounding box parameters of the thematic map; Based on the temporary tiling scheme and the tiling level input by the user, multiple tiling subtasks are generated, and it is determined whether the boundary range corresponding to each tiling subtask intersects with the bounding box parameters of the thematic map. The tiling subtasks corresponding to the intersecting boundary ranges are added to the execution task queue. The multiple slice subtasks in the execution task queue are divided into multiple task sets and assigned to multiple threads for concurrent processing; For each of the slice subtasks in the multiple task sets, based on the bounding box parameters corresponding to the slice subtask, data blocks are extracted from the world overlay object with Web Mercator projection and rendered as image files of a specified size.

2. The thematic map tiling method according to claim 1, characterized in that, The step of converting the input boundary range to a Web Mercator projection to construct the bounding box parameters of the thematic map includes: Read and convert the thematic map into an unprojected raw grid overlay object; The input boundary range is converted into a Web Mercator projection to obtain the projected coordinates; wherein the projected coordinates include: the minimum longitude, the maximum longitude, the minimum latitude, and the maximum latitude. Based on the projected coordinates, calculate the width and height under projection; Based on the projected coordinates, the projected width, and the projected height, the original grid overlay object is converted into a world overlay object with Web Mercator projection to construct the bounding box parameters of the thematic map.

3. The thematic map tiling method according to claim 2, characterized in that, The reading of the thematic map is achieved by calling the read coverage method, the input parameter of which is the image storage path; the conversion of the original grid coverage object into a world coverage object with Web Mercator projection is achieved by calling the calculate world coverage method, the input parameters of which are the minimum longitude, the maximum longitude, the minimum latitude, and the maximum latitude.

4. The thematic map tiling method according to claim 1, characterized in that, Based on the temporary tiling scheme and the tiling level input by the user, multiple tiling subtasks are generated, and it is determined whether the boundary range corresponding to each tiling subtask intersects with the bounding box parameters of the thematic map. The step of adding the tiling subtask corresponding to the intersecting boundary range to the execution task queue includes: Based on the maximum slice level input by the user, determine the slice subtasks based on the quadtree structure at each level; Iterate through each of the slice subtasks at each level to obtain the boundary range corresponding to the slice subtask; The intersection of the four boundaries of each slice subtask with the bounding box parameters of the thematic map is determined. If the determination result is intersection, then the slice subtask is added to the execution task queue as a slice subtask to be executed; If the determination result is that they do not intersect, then skip the current preset slice subtask.

5. The thematic map tiling method according to claim 4, characterized in that, The step of dividing multiple slice subtasks in the execution task queue into multiple task sets is achieved by calling a method to obtain all task sets, wherein the input parameter of the method to obtain all task sets is the maximum level of the slice.

6. The thematic map tiling method according to claim 1, characterized in that, For each of the slice subtasks in the plurality of task sets, the step of extracting data blocks from a world overlay object with Web Mercator projection and rendering them as image files of a specified size based on the bounding box parameters corresponding to the slice subtask includes: Input the bounding box parameters corresponding to the world overlay object and the slice subtask; Based on the spatial range defined by the bounding box parameters corresponding to the slice sub-task, extract the corresponding sub-data blocks from the world overlay object; Render the sub-data block into an image file of a specified size.

7. The thematic map tiling method according to claim 6, characterized in that, The process of rendering the sub-data block into an image file of a specified size is achieved by calling the rendering tile method, wherein the input parameters of the rendering tile method are the bounding box parameters corresponding to the world overlay object and the slice subtask.

8. A thematic map tiling device, characterized in that, include: The data acquisition module is used to acquire the width, height, and input boundary range of the thematic map; wherein, the input boundary range includes: minimum longitude, maximum longitude, minimum latitude, and maximum latitude; A tiling scheme construction module is used to dynamically construct a temporary tiling scheme based on the width, height, and input boundary range; wherein, the dynamic construction of the temporary tiling scheme includes: converting the input boundary range into a Web Mercator projection to construct the bounding box parameters of the thematic map; The slice subtask processing module is used to generate multiple slice subtasks according to the temporary slicing scheme and the slice level input by the user, and to determine whether the four boundaries of each slice subtask intersect with the bounding box parameters of the thematic map, and to add the slice subtask corresponding to the intersecting four boundaries to the execution task queue. The slice subtask distribution module is used to divide multiple slice subtasks in the execution task queue into multiple task sets and distribute them to multiple threads for concurrent processing. The rendering module is used to extract data blocks from a world overlay object with Web Mercator projection for each of the slice subtasks in the multiple task sets, based on the bounding box parameters corresponding to the slice subtask, and render them as image files of a specified size.

9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the thematic map tiling method according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the thematic map tiling method according to any one of claims 1 to 7.