Map tile generation and release method and device based on GeoServer and electronic equipment

By reprojecting, resampling, cropping and segmenting the source data, and converting the data format, the problem that GeoServer does not support multi-band TIFF tile format, terrain tile format and tilt photography 3D Tiles tile format is solved, and the generation and release of map tile data in these formats is realized, promoting the automation and standardization of services.

CN119991985APending Publication Date: 2025-05-13ELLIPSPACE (BEIJING) TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510071890.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing GeoServer server does not support multi-band TIFF tile format, terrain tile format and tilt photography 3D Tiles tile format, which cannot meet the needs of actual application scenarios.

Method used

By obtaining source data from the geographic information system, reprojection, resampling, cropping and segmentation, converting data formats according to the target tile format, generating and publishing map tile data in multi-band TIFF tile format, terrain tile format, and tilt photography 3D Tiles tile format.

Benefits of technology

It realizes the generation and release of tile data in multi-band TIFF tile format, terrain tile format and tilt photography 3D Tiles tile format based on GeoServer, which solves the problem that GeoServer does not support these formats, provides standardized tile data, and promotes service automation and standardization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991985A_ABST
    Figure CN119991985A_ABST
Patent Text Reader

Abstract

The invention discloses a GeoServer-based map tile generation method and device, a GeoServer-based map tile release method and device and electronic equipment. The method comprises the following steps: acquiring source data from a geographic information system; performing reprojection and resampling operation on the source data according to a preset projection coordinate system and resolution to obtain specific resolution data; cutting the specific resolution data to obtain data of a specific area; determining a tile space range of each map tile, segmenting the data of the specific area according to the tile space range of each map tile, and obtaining tile preliminary data of each map tile; performing data format conversion on the tile preliminary data of each map tile to obtain map tile data in a target tile format; and storing the map tile data in the target tile format to a database, and publishing the map tile data in the target tile format in a GeoServer server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device and electronic device for generating and publishing map tiles based on GeoServer. Background Art

[0002] GeoServer is an open source server software, mainly used for publishing and sharing geospatial data. However, the inventor found that although GeoServer supports tiles in multiple formats, for example, it supports image tile formats PNG (Portable Network Graphics) and JPEG (Joint Photographic Experts Group), vector tile format MVT (Mapbox Vector Tiles), tile set format TMS (Tile Map Service) and tile service standard format WMTS (Web Map Tile Service), etc., the current GeoServer does not support multi-band TIFF (Tagged Image File Format) tile format, terrain tile format, and oblique photography 3D Tiles tile format. But in actual application scenarios, multi-band TIFF tiles, terrain tiles, and oblique photography 3D Tiles tiles are also widely used. Therefore, the existing GeoServer server has the problem of not supporting multi-band TIFF tile format, terrain tile format, and oblique photography 3D Tiles tile format. Summary of the invention

[0003] The embodiment of the present invention provides a method, device and electronic device for generating and publishing map tiles based on GeoServer, which are used to solve the problem that the existing GeoServer server does not support the multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format.

[0004] The specific technical solutions are as follows:

[0005] In a first aspect, an embodiment of the present invention provides a method for generating and publishing map tiles based on GeoServer, the method comprising:

[0006] Obtain source data from a geographic information system;

[0007] According to a preset projection coordinate system and resolution, the source data is sequentially reprojected and resampled to obtain data of a specific resolution;

[0008] Cropping the data of the specific resolution to obtain data of a specific area;

[0009] Determining the tile space range of each map tile according to the target tile format and the preset projection coordinate system;

[0010] According to the tile space range of each map tile, the data of the specific area is segmented using a spatial algorithm corresponding to the target tile format to obtain preliminary tile data of each map tile;

[0011] For the preliminary tile data of each map tile, according to the data format requirements of the GeoServer server, use the data format conversion method corresponding to the target tile format to convert the preliminary tile data into a data format, so as to obtain the map tile data in the target tile format;

[0012] The map tile data in the target tile format is saved in a database, and the map tile data in the target tile format is published in a GeoServer server.

[0013] Optionally, the step of sequentially performing reprojection and resampling operations on the source data according to a preset projection coordinate system and resolution to obtain data of a specific resolution includes:

[0014] According to a preset projection coordinate system, the source data is reprojected, and the source data is converted from the original projection coordinate system to the specific projection coordinate system to obtain specific projection coordinate data;

[0015] According to a preset resolution, the specific projection coordinate data is resampled to obtain specific resolution data; wherein the preset resolution is determined according to a target tile format.

[0016] Optionally, the step of clipping the data of the specific resolution to obtain data of a specific area includes:

[0017] Determine a clipping range according to the target tile format and the projection coordinate system used;

[0018] According to the cropping range, setting cropping parameters of the cropping tool;

[0019] The specific resolution data is cropped using the cropping tool to obtain data of a specific area.

[0020] Optionally, the step of determining the tile space range of each map tile according to the target tile format and the preset projection coordinate system includes:

[0021] The tile space range of each map tile is determined according to the specification of each map tile corresponding to the target tile format and the grid segmentation rule in the preset projection coordinate system.

[0022] Optionally, the step of segmenting the data of the specific area according to the tile space range of each map tile using a spatial algorithm corresponding to the target tile format to obtain preliminary tile data of each map tile includes:

[0023] According to the tile space range of each map tile, the tile space range data of each map tile is read using a tile indexing algorithm corresponding to the target tile format to obtain preliminary tile data of each map tile.

[0024] Optionally, the step of saving the map tile data in the target tile format to a database and publishing the map tile data in the target tile format in a GeoServer server comprises:

[0025] The obtained tile data of each target tile format is stored in the database in parallel;

[0026] Establishing a communication connection between the database and the GeoServer server;

[0027] The database is published on the GeoServer server using the REST interface of the GeoServer server.

[0028] Optionally, the target tile format is a multi-band TIFF tile format, a terrain tile format, or an oblique photography 3D Tiles tile format.

[0029] In a second aspect, an embodiment of the present invention provides a map tile generation and publishing device based on GeoServer, the device comprising:

[0030] A data acquisition module is used to obtain source data from a geographic information system;

[0031] A projection sampling module, used to sequentially reproject and resample the source data according to a preset projection coordinate system and resolution to obtain data of a specific resolution;

[0032] A cropping module, used to crop the data of the specific resolution to obtain data of a specific area;

[0033] A determination module, used to determine the tile space range of each map tile according to the target tile format and the preset projection coordinate system;

[0034] A segmentation module, used to segment the data of the specific area according to the tile space range of each map tile using a spatial algorithm corresponding to the target tile format, and obtain preliminary tile data of each map tile;

[0035] A conversion module is used to convert the preliminary tile data of each map tile into a data format according to the data format requirements of the GeoServer server and using a data format conversion method corresponding to the target tile format to obtain map tile data in the target tile format;

[0036] The publishing module is used to save the map tile data in the target tile format to a database and publish the map tile data in the target tile format in a GeoServer server.

[0037] Optionally, the projection sampling module is specifically used to:

[0038] According to a preset projection coordinate system, the source data is reprojected, and the source data is converted from the original projection coordinate system to the specific projection coordinate system to obtain specific projection coordinate data;

[0039] According to a preset resolution, the specific projection coordinate data is resampled to obtain specific resolution data; wherein the preset resolution is determined according to a target tile format.

[0040] Optionally, the cutting module is specifically used for:

[0041] Determine a clipping range according to the target tile format and the projection coordinate system used;

[0042] According to the cropping range, setting cropping parameters of the cropping tool;

[0043] The specific resolution data is cropped using the cropping tool to obtain data of a specific area.

[0044] Optionally, the determining module is specifically used to:

[0045] The tile space range of each map tile is determined according to the specification of each map tile corresponding to the target tile format and the grid segmentation rule in the preset projection coordinate system.

[0046] Optionally, the publishing module is specifically used to:

[0047] According to the tile space range of each map tile, the tile space range data of each map tile is read using a tile indexing algorithm corresponding to the target tile format to obtain preliminary tile data of each map tile.

[0048] Optionally, the publishing module is specifically used to:

[0049] The obtained tile data of each target tile format is stored in the database in parallel;

[0050] Establishing a communication connection between the database and the GeoServer server;

[0051] The database is published on the GeoServer server using the REST interface of the GeoServer server.

[0052] Optionally, the target tile format is a multi-band TIFF tile format, a terrain tile format, or an oblique photography 3D Tiles tile format.

[0053] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0054] The memory is used to store computer programs;

[0055] The processor is used to implement the method steps of generating and publishing map tiles based on GeoServer as described in the first aspect when executing the program stored in the memory.

[0056] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the method steps for generating and publishing map tiles based on GeoServer as described in the first aspect above are implemented.

[0057] In summary, the method provided in this embodiment can realize the generation of tiles in multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format based on GeoServer, and can realize the publishing of the generated tile data on the GeoServer server for users to use; thereby solving the problem that the existing GeoServer server does not support multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format. In addition, the generated tile data in multi-band TIFF tile format, tile data in terrain tile format and tile data in oblique photography 3DTiles tile format are published on the GeoServer server according to the standards required by the GeoServer server, so that users can obtain standardized tile data from the GeoServer server, which is conducive to the automation and standardization of services, and further facilitates the agile development and timely delivery of projects.

[0058] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0059] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0061] Figure 1 A schematic diagram of a flow chart of a method for generating and publishing map tiles based on GeoServer provided in an embodiment of the present invention;

[0062] Figure 2 Another schematic diagram of a flow chart of a method for generating and publishing map tiles based on GeoServer provided in an embodiment of the present invention;

[0063] Figure 3 A structural schematic diagram of a map tile generation and publishing device based on GeoServer provided in an embodiment of the present invention;

[0064] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0065] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0066] The embodiment of the present invention provides a method for generating and publishing map tiles based on GeoServer, which is used to solve the problem that the existing GeoServer server does not support the multi-band TIFF tile format, terrain tile format and oblique photography 3DTiles tile format, such as Figure 1 As shown, the method includes:

[0067] S101: Obtain source data from a geographic information system;

[0068] Geographic Information System (GIS) is a spatial information system that is based on computer hardware and software systems and combines computer technology with geographic information technology.

[0069] Obtain source data from a geographic information system, that is, obtain the raw data used for analysis, processing, and visualization in GIS.

[0070] GIS source data can be classified into: vector data, raster data and attribute data, among which vector data includes: point data (indicating a single point at a specific location, such as geographic coordinate points, city landmarks, etc.), line data (representing linear features, such as roads, rivers, pipelines, etc.) and surface data (describing regional scope, such as administrative districts, lakes, land use types, etc.). Raster data includes: satellite images (images of the earth's surface taken by satellites, containing rich spectral information), digital elevation models (indicating the height information of the terrain, used for terrain analysis and three-dimensional visualization) and remote sensing images (image data obtained through platforms such as aircraft and drones, which can be used for land cover classification, environmental monitoring, etc.). Attribute data is descriptive information related to geographic elements, such as place names, population size, land use types, etc.

[0071] S102: performing reprojection and resampling operations on the source data in sequence according to a preset projection coordinate system and resolution to obtain data of a specific resolution;

[0072] Specifically, the step of performing reprojection and resampling operations on the source data in sequence according to the preset projection coordinate system and resolution to obtain data of a specific resolution may include:

[0073] According to the preset projection coordinate system, the source data is reprojected, the source data is converted from the original projection coordinate system to the specific projection coordinate system, and the specific projection coordinate data is obtained;

[0074] According to a preset resolution, the specific projection coordinate data is resampled to obtain specific resolution data; wherein the preset resolution is determined according to the target tile format.

[0075] In GIS, since different data sources may use different coordinate systems, in order to enable different data to be analyzed and displayed in the same coordinate system, the data needs to be reprojected, that is, reprojected.

[0076] In a specific embodiment, the preset projection coordinate system may be the EPSG:4326 coordinate system or the EPSG:3857 coordinate system, because these two coordinate systems include most of the business scenarios in the fields of three-dimensional spheres and plane maps.

[0077] In practical applications, the appropriate output resolution can be determined according to the target tile format, and then the specific projection coordinate data can be resampled, that is, the Resample operation can be performed to obtain data that meets the accuracy required by the target tile format.

[0078] S103: cropping the data of a specific resolution to obtain data of a specific area;

[0079] Specifically, the step of clipping the data of a specific resolution to obtain data of a specific area may include:

[0080] Determine a clipping range based on the target tile format and the projection coordinate system used;

[0081] According to the cropping range, set the cropping parameters of the cropping tool;

[0082] Use the cropping tool to crop data of a specific resolution to obtain data of a specific area.

[0083] In order to obtain the data in the required area, it is necessary to crop the data, which is the Crop operation.

[0084] According to the clipping range, the clipping parameters of the clipping tool are set to ensure that the clipping tool can correctly identify the area to be clipped. In practical applications, setting the clipping parameters of the clipping tool may include setting the vertex coordinates of a polygonal area or the boundary coordinates of a rectangular area.

[0085] S104: determining the tile space range of each map tile according to the target tile format and the preset projection coordinate system;

[0086] Specifically, the step of determining the tile space range of each map tile according to the target tile format and the preset projection coordinate system may include:

[0087] The tile space range of each map tile is determined according to the specifications of each map tile corresponding to the target tile format and the grid segmentation rules in the preset projection coordinate system.

[0088] S105: according to the tile space range of each map tile, using a spatial algorithm corresponding to the target tile format to segment the data of the specific area, and obtaining preliminary tile data of each map tile;

[0089] Specifically, according to the tile space range of each map tile, the step of segmenting the data of a specific area using a spatial algorithm corresponding to the target tile format and obtaining the preliminary tile data of each map tile may include:

[0090] According to the tile space range of each map tile, the tile space range data of each map tile is read using a tile indexing algorithm corresponding to the target tile format to obtain preliminary tile data of each map tile.

[0091] Read out the spatial range data of the tile, that is, divide the tile. The spatial algorithm refers to the tile index algorithm, such as: spatial index algorithm, grid tile index algorithm or quadtree pyramid algorithm, etc. The purpose of using the spatial algorithm is to read out the tile spatial range data of each map tile.

[0092] S106: for each map tile's preliminary tile data, according to the data format requirement of the GeoServer server, using a data format conversion method corresponding to the target tile format, the preliminary tile data is converted into a data format to obtain map tile data in the target tile format;

[0093] The preliminary data of the tile cannot be published directly to the layer of the GeoServer server. It needs to be converted into a data format that meets the layer requirements of the GeoServer server before it can be published.

[0094] In the embodiment of the present invention, the target tile format may be a multi-band TIFF tile format, a terrain tile format, or an oblique photography 3D Tiles tile format.

[0095] In a specific embodiment, different data format conversion processes may be set correspondingly for different target tile formats, for example:

[0096] For the multi-band TIFF tile format, the data format conversion process is to perform the following processing on the preliminary data of the tile in sequence: nodata processing, LWZ compression processing, statistical information update processing, and affine transformation processing to obtain tile data in the multi-band TIFF tile format. Among them, nodata processing is used to check the representation of nodata values ​​in the original data. To ensure that the new format can correctly represent nodata values ​​during the conversion process. LWZ (Lempel-Ziv-Welch) compression is a lossless data compression algorithm. LWZ compression processing is used to reduce file size without affecting image quality for easy storage and transmission. Statistical information update processing is used to analyze the statistical information of the original data, such as minimum, maximum, average, etc. Affine transformation processing is used to extract the affine transformation parameters of the original data, including information such as translation, scaling, and rotation, to ensure that the affine transformation parameters are correctly applied to the new data.

[0097] For the terrain tile format, the data format conversion process is to process the preliminary data of the tile in the following order: first use the height-map algorithm to process the header data and vertex data in the terrain tile; then use the quantized-mesh algorithm to process the triangle index and edge vertex index, and finally generate triangulated network data, that is, tile data in the terrain tile format.

[0098] The data format conversion of the oblique photography 3D Tiles tile format involves the processing of OSGB data. The data format conversion process includes the generation of json files of tilesets, the processing and generation of feature tables and batch tables, and the compression of 3D model vertices, etc., and finally the oblique photography 3D Tiles tile format tile data is converted. Among them, OSGB (OpenSceneGraph Binary) is a 3D model data format, commonly used in geographic information systems (GIS), virtual reality (VR), game development and other fields. It is a binary format used by the OpenSceneGraph (OSG) scene graph library, mainly used to store models, textures, materials and other information in 3D scenes.

[0099] S107: Save the map tile data in the target tile format to the database, and publish the map tile data in the target tile format in the GeoServer server.

[0100] Specifically, the steps of saving the map tile data in the target tile format to the database and publishing the map tile data in the target tile format in the GeoServer server include:

[0101] The obtained tile data of each target tile format is stored in the database in parallel;

[0102] Establish a communication connection between the database and the GeoServer server;

[0103] Publish the database on the GeoServer server using the GeoServer server's REST interface.

[0104] In a specific embodiment, the obtained tile data of each target tile format can be stored in parallel in a SQLite database. If you want to publish tile data that GeoServer does not support in GeoServer, you can use the mbtiles extension function of GeoServer. First store the tile data in the SQLite database, and then publish the database to GeoServer. For example, the tile data of each target tile format is stored in parallel in the SQLite database, and a file name with a suffix of mbtiles is given to the stored data file, and then the file with the suffix of mbtiles is published to the GeoServer server in the form of GWC (GeoWebCache geographic network cache) using the REST interface API (Application Programming Interface) of the GeoServer server.

[0105] In summary, the method provided in this embodiment can realize the generation of tiles in multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format based on GeoServer, and can realize the publishing of the generated tile data on the GeoServer server for users to use; thereby solving the problem that the existing GeoServer server does not support multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format. In addition, the generated tile data in multi-band TIFF tile format, tile data in terrain tile format and tile data in oblique photography 3DTiles tile format are published on the GeoServer server according to the standards required by the GeoServer server, so that users can obtain standardized tile data from the GeoServer server, which is conducive to the automation and standardization of services, and further facilitates the agile development and timely delivery of projects.

[0106] An actual example is given below to illustrate the method provided by the embodiment of the present invention in more detail.

[0107] In this embodiment, the preset projection coordinate system is the EPSG:4326 coordinate system, the target tile format is the multi-band TIFF tile format, and the tile index algorithm uses the spatial index algorithm. Figure 2 , the method comprising:

[0108] S201: Obtain source data from the geographic information system;

[0109] S202: reprojecting the source data according to the preset projection coordinate system EPSG:4326, converting the source data from the original projection coordinate system to the EPSG:4326 coordinate system, and obtaining EPSG:4326 coordinate data;

[0110] S203: determining a resolution according to the multi-band TIFF tile format, and resampling the EPSG:4326 coordinate data according to the resolution to obtain data of a specific resolution;

[0111] S204: determining a clipping range according to the multi-band TIFF tile format and the projection coordinate system used;

[0112] S205: Setting the cropping parameters of the cropping tool according to the cropping range;

[0113] S206: Using a cropping tool, cropping the data of a specific resolution to obtain data of a specific area;

[0114] S207: Determine the tile space range of each map tile according to the specification of each map tile corresponding to the target tile format and the grid segmentation rule in the preset projection coordinate system;

[0115] S208: Reading the tile space range data of each map tile using a spatial index algorithm according to the tile space range of each map tile, and obtaining preliminary tile data of each map tile;

[0116] S209: for the preliminary tile data of each map tile, according to the data format requirements of the GeoServer server, the preliminary tile data of each map tile is sequentially subjected to no-data value processing, LWZ compression processing, statistical information update processing, and affine transformation processing to obtain tile data in a multi-band TIFF tile format;

[0117] S210: The obtained tile data in multi-band TIFF tile format are stored in parallel in the SQLite database, and a file name with a suffix of mbtiles is given to the stored data file, and then the file with the suffix of mbtiles is published to the GeoServer server in GWC mode using the REST interface of the GeoServer server.

[0118] In summary, the method provided in this embodiment can realize the generation of tiles in multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format based on GeoServer, and can realize the publishing of the generated tile data on the GeoServer server for users to use; thereby solving the problem that the existing GeoServer server does not support multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format. In addition, the generated tile data in multi-band TIFF tile format, tile data in terrain tile format and tile data in oblique photography 3DTiles tile format are published on the GeoServer server according to the standards required by the GeoServer server, so that users can obtain standardized tile data from the GeoServer server, which is conducive to the automation and standardization of services, and further facilitates the agile development and timely delivery of projects.

[0119] and Figure 1 Corresponding to the embodiment shown in FIG. 1 , the embodiment of the present invention further provides a map tile generation and publishing device based on GeoServer. Figure 3 As shown, the device includes: a data acquisition module 301, a projection sampling module 302, a clipping module 303, a determination module 304, a segmentation module 305, a conversion module 306, and a publishing module 307, wherein:

[0120] The data acquisition module 301 is used to acquire source data from the geographic information system;

[0121] The projection sampling module 302 is used to sequentially reproject and resample the source data according to a preset projection coordinate system and resolution to obtain data of a specific resolution;

[0122] The cropping module 303 is used to crop the data of a specific resolution to obtain data of a specific area;

[0123] A determination module 304, for determining a tile space range of each map tile according to a target tile format and a preset projection coordinate system;

[0124] A segmentation module 305 is used to segment the data of a specific area according to the tile space range of each map tile using a spatial algorithm corresponding to the target tile format to obtain preliminary tile data of each map tile;

[0125] The conversion module 306 is used to convert the preliminary tile data of each map tile according to the data format requirements of the GeoServer server and use the data format conversion method corresponding to the target tile format to obtain the map tile data in the target tile format;

[0126] The publishing module 307 is used to save the map tile data in the target tile format to the database, and publish the map tile data in the target tile format in the GeoServer server.

[0127] Optionally, the projection sampling module 302 is specifically configured to:

[0128] According to the preset projection coordinate system, the source data is reprojected, the source data is converted from the original projection coordinate system to the specific projection coordinate system, and the specific projection coordinate data is obtained;

[0129] According to a preset resolution, the specific projection coordinate data is resampled to obtain specific resolution data; wherein the preset resolution is determined according to the target tile format.

[0130] Optionally, the cutting module 303 is specifically used for:

[0131] Determine a clipping range based on the target tile format and the projection coordinate system used;

[0132] According to the cropping range, set the cropping parameters of the cropping tool;

[0133] Use the cropping tool to crop data of a specific resolution to obtain data of a specific area.

[0134] Optionally, the determination module 304 is specifically configured to:

[0135] The tile space range of each map tile is determined according to the specifications of each map tile corresponding to the target tile format and the grid segmentation rules in the preset projection coordinate system.

[0136] Optionally, the publishing module 305 is specifically used for:

[0137] According to the tile space range of each map tile, the tile space range data of each map tile is read using a tile indexing algorithm corresponding to the target tile format to obtain preliminary tile data of each map tile.

[0138] Optionally, the publishing module 307 is specifically used to:

[0139] The obtained tile data of each target tile format is stored in the database in parallel;

[0140] Establish a communication connection between the database and the GeoServer server;

[0141] Publish the database on the GeoServer server using the GeoServer server's REST interface.

[0142] Optionally, the target tile format is a multi-band TIFF tile format, a terrain tile format, or an oblique photography 3D Tiles tile format.

[0143] In summary, the device provided in this embodiment can realize the generation of tiles in multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format based on GeoServer, and can publish the generated tile data on the GeoServer server for users to use; thereby solving the problem that the existing GeoServer server does not support multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format.

[0144] and Figure 1 Corresponding to the embodiment shown, the embodiment of the present invention further provides an electronic device, see Figure 4 , including a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404;

[0145] Memory 403, used for storing computer programs;

[0146] The processor 401 is used to implement any of the method steps for generating and publishing map tiles based on GeoServer described in the above embodiments when executing the program stored in the memory.

[0147] In summary, the electronic device provided in this embodiment can generate tiles in multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format based on GeoServer, and can publish the generated tile data on the GeoServer server for users to use; thereby solving the problem that the existing GeoServer server does not support multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format.

[0148] and Figure 1Corresponding to the embodiment shown, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any method step of generating and publishing map tiles based on GeoServer described in the above embodiments is implemented.

[0149] In summary, the storage medium provided in this embodiment can realize the generation of tiles in multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format based on GeoServer, and can publish the generated tile data on the GeoServer server for users to use; thereby solving the problem that the existing GeoServer server does not support multi-band TIFF tile format, terrain tile format and oblique photography 3D Tiles tile format.

[0150] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0151] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0152] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0154] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for generating and publishing map tiles based on GeoServer, characterized in that: The method comprises: Obtain source data from a geographic information system; According to a preset projection coordinate system and resolution, the source data is sequentially reprojected and resampled to obtain data of a specific resolution; Cropping the data of the specific resolution to obtain data of a specific area; Determining the tile space range of each map tile according to the target tile format and the preset projection coordinate system; According to the tile space range of each map tile, the data of the specific area is segmented using a spatial algorithm corresponding to the target tile format to obtain preliminary tile data of each map tile; For the preliminary tile data of each map tile, according to the data format requirements of the GeoServer server, use the data format conversion method corresponding to the target tile format to convert the preliminary tile data into a data format, so as to obtain the map tile data in the target tile format; The map tile data in the target tile format is saved in a database, and the map tile data in the target tile format is published in a GeoServer server.

2. The method according to claim 1, characterized in that The step of sequentially reprojecting and resampling the source data according to the preset projection coordinate system and resolution to obtain data of a specific resolution comprises: According to a preset projection coordinate system, the source data is reprojected, and the source data is converted from the original projection coordinate system to the specific projection coordinate system to obtain specific projection coordinate data; According to a preset resolution, the specific projection coordinate data is resampled to obtain specific resolution data; wherein the preset resolution is determined according to a target tile format.

3. The method according to claim 1, characterized in that The step of clipping the data of the specific resolution to obtain data of a specific area includes: Determine a clipping range according to the target tile format and the projection coordinate system used; According to the cropping range, setting cropping parameters of the cropping tool; The specific resolution data is cropped using the cropping tool to obtain data of a specific area.

4. The method according to claim 1, characterized in that: The step of determining the tile space range of each map tile according to the target tile format and the preset projection coordinate system comprises: The tile space range of each map tile is determined according to the specification of each map tile corresponding to the target tile format and the grid segmentation rule in the preset projection coordinate system.

5. The method according to claim 1, characterized in that The step of segmenting the data of the specific area according to the tile space range of each map tile using a spatial algorithm corresponding to the target tile format to obtain preliminary tile data of each map tile includes: According to the tile space range of each map tile, the tile space range data of each map tile is read using a tile indexing algorithm corresponding to the target tile format to obtain preliminary tile data of each map tile.

6. The method according to claim 1, characterized in that The step of saving the map tile data in the target tile format to a database and publishing the map tile data in the target tile format in a GeoServer server comprises: The obtained tile data of each target tile format is stored in the database in parallel; Establishing a communication connection between the database and the GeoServer server; The database is published on the GeoServer server using the REST interface of the GeoServer server.

7. The method according to claim 1, characterized in that The target tile format is a multi-band TIFF tile format, a terrain tile format or an oblique photography 3DTiles tile format.

8. A map tile generation and publishing device based on GeoServer, characterized in that: The device comprises: A data acquisition module is used to obtain source data from a geographic information system; A projection sampling module, used to sequentially reproject and resample the source data according to a preset projection coordinate system and resolution to obtain data of a specific resolution; A cropping module, used to crop the data of the specific resolution to obtain data of a specific area; A determination module, used to determine the tile space range of each map tile according to the target tile format and the preset projection coordinate system; A segmentation module, used to segment the data of the specific area according to the tile space range of each map tile using a spatial algorithm corresponding to the target tile format, and obtain preliminary tile data of each map tile; A conversion module is used to convert the preliminary tile data of each map tile into a data format according to the data format requirements of the GeoServer server and using a data format conversion method corresponding to the target tile format to obtain map tile data in the target tile format; The publishing module is used to save the map tile data in the target tile format to a database and publish the map tile data in the target tile format in a GeoServer server.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps described in any one of claims 1-7 when executing the program stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • 3D tile publishing method based on GeoServer and terminal equipment

    CN121614563A