WebGIS three-dimensional geographic data lightweight method
By extracting two-dimensional plane features and spatial line features and storing rendered data in client cache, the poor display effect caused by lightweight processing of WebGIS three-dimensional geographic data is solved, and fast rendering and efficient data transmission are achieved.
Patent Information
- Application Number
- CN202411776487.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In the prior art, the lightweight processing of WebGIS three-dimensional geographic data leads to loss of geometric information and simplified model rendering, resulting in poor display effect.
By extracting two-dimensional plane features and spatial line features from three-dimensional geographic data, storing them on the server side, and mapping the spatial rendering data into the client cache, the client cache quickly renders the three-dimensional geographic data to avoid repeated requests for server data.
It realizes rapid rendering and display of three-dimensional geographic data, reduces the server-side data transmission load, improves the rendering efficiency of the client, and maintains the integrity of three-dimensional geographic information.
Smart Images

Figure CN119251426A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of building information model data processing, and in particular to a lightweight method for WebGIS three-dimensional geographic data. Background Art
[0002] WebGIS is the product of the combination of Web technology and GIS technology. It is a new technology that uses Web technology to expand and improve geographic information systems. WebGIS uses the client / server concept to perform GIS analysis tasks. It divides the task into two parts: the server and the client. The client can request data, analysis tools or modules from the server. The server either executes the client's request and sends the results back to the client through the network, or sends the data and analysis tools to the client for the client to use. The information in GIS is mainly spatial data that needs to be expressed in graphics and images. The client queries and analyzes the spatial data through interactive operations. WebGIS allows clients to operate GIS maps and data on the Internet, use the Web to find the spatial data they need, and perform various operations.
[0003] WebGIS three-dimensional geographic data generally includes geographic data, spatial data and attribute data, among which geographic data is the core content of WebGIS, including the spatial location, shape and attribute information of various geographic features. These data usually exist in the form of vector data and raster data. Spatial data is the basic data in the geographic information system, including the spatial location and shape information of various geographic features. Attribute data is non-spatial information related to geographic features, such as the rendering information of three-dimensional buildings in geographic information, the detailed display information corresponding to the actual three-dimensional buildings, etc. Therefore, the massive data of WebGIS three-dimensional data has made the lightweighting of WebGIS data a hot topic in recent years.
[0004] In the prior art, lightweighting of WebGIS 3D geographic data generally involves simplifying the 3D geometric model, converting the model format, or simplifying the rendering. The above technologies can achieve lightweight processing of WebGIS 3D geographic data, but the lightweight WebGIS 3D geographic data has a poor display effect due to the loss of geometric information and the simplification of model rendering. Summary of the invention
[0005] In order to solve the above technical problems, this application proposes the following technical solutions: In a first aspect, an embodiment of the present application provides a lightweight method for WebGIS three-dimensional geographic data, including: Obtaining two-dimensional plane feature data according to three-dimensional geographic data and extracting plane line features corresponding to the two-dimensional plane feature data and space line features of the three-dimensional geographic data; The plane line features and the space line features are stored on the server side and the space rendering data in the three-dimensional geographic data is mapped and stored in the client cache; When accessing the GIS server through the client to view three-dimensional geographic data, the rendering data corresponding to the current plane line selected area is retrieved from the client cache according to the area in the plane line feature currently selected by the client to render the three-dimensional geographic data of the plane line selected area.
[0006] In a possible implementation, the step of obtaining two-dimensional plane feature data according to three-dimensional geographic data and extracting plane line features corresponding to the two-dimensional plane feature data and space line features of the three-dimensional geographic data includes: Use the loadtxt function in the numpy library to load 3D geographic data from the GIS 3D model; Use the PCA module in the skleam library to reduce the dimensionality of the three-dimensional geographic data to obtain two-dimensional plane data and generate a two-dimensional plane model; The plane line features of the two-dimensional plane feature data and the space line features of the three-dimensional geographic data are obtained according to the two-dimensional plane model and the three-dimensional model respectively.
[0007] In a possible implementation, storing the plane line features and the space line features on the server side and mapping and storing the space rendering data in the three-dimensional geographic data into the client cache includes: Splitting the plane line feature according to the unit individuals in the GIS three-dimensional model to obtain a plurality of sub-plane line features; Splitting the space line feature according to the sub-plane line feature to obtain a plurality of sub-space line features; Establishing a mapping relationship between the sub-plane line features and the sub-space line features to obtain a plurality of three-dimensional module line groups; Determine the spatial rendering data of each of the three-dimensional module line groups in the GIS three-dimensional model; The spatial rendering data mapping of each of the three-dimensional module line groups is stored in a cache on the client side accessing the GIS server.
[0008] In a possible implementation, when the GIS server is accessed through the client to view the three-dimensional geographic data, the rendering data corresponding to the current plane line selected area is retrieved from the client cache according to the area in the plane line feature currently selected by the client to render the three-dimensional geographic data of the plane line selected area, including: When the client accesses the GIS server, the GIS server transmits the plane line features in the two-dimensional plane model to the client side; When the client side selects and determines any sub-plane line feature in the plane line feature, it requests the corresponding sub-space line feature from the GIS server side according to the mapping relationship; The three-dimensional module line group composed of the obtained sub-plane line features and the requested sub-space line features is read from the client-side cache corresponding spatial rendering data to restore all features in the original three-dimensional geographic data.
[0009] In a possible implementation, after obtaining the three-dimensional module line group composed of the sub-plane line features and the sub-space line features, reading the corresponding spatial rendering data from the client-side cache to restore all the features in the original three-dimensional geographic data includes: Determine the color, gloss and transparency parameters of the three-dimensional module line group corresponding to the spatial rendering data; Firstly, the texture features in the spatial rendering data are retrieved to perform texture rendering on the surface of the three-dimensional module line group so that each surface of the three-dimensional module line group can restore the original pattern or details; Then, a color scheme of different faces of the three-dimensional module line group is determined, and the color features in the spatial rendering data are rendered onto the textured three-dimensional module line group; Finally, adjustment and rendering are performed according to the illumination, shadow and reflection data in the spatial rendering data to obtain all the features of the three-dimensional module line group in the original three-dimensional geographic data.
[0010] In a possible implementation, after the client completes an access or operation, the spatial rendering data in the client cache is updated.
[0011] In a possible implementation, when the client completes an access or operation, updating the spatial rendering data in the client cache includes: After the first spatial rendering data in the client-side cache is retrieved, the first spatial rendering data is deleted, the first spatial rendering data being any spatial rendering data; Expanding the first cache space, and storing the pointer address of the first cache space as replacement data to the original position of the first spatial rendering data, and generating new cache spaces after different spatial rendering data are retrieved, and the pointer address of each new cache space is unique; After the client side has finished viewing, the original three-dimensional geographic data corresponding to the first spatial rendering data is directly stored in the new cache space.
[0012] In a possible implementation, the step of expanding the first cache space and storing the pointer address of the first cache space as replacement data to the original location of the first space rendering data includes: After deleting the first spatial rendering data, retaining the storage space of the first spatial rendering data in the client-side cache unchanged; After the first cache space is determined, determining the length of the pointer address of the first cache space; The storage space of the first spatial rendering data in the client-side cache is released until the length of the remaining space meets the length of the pointer address of the first cache space; The pointer address of the first cache space is stored in the remaining space after the release.
[0013] In an embodiment of the present application, the three-dimensional geographic data is pre-processed and then split. The three-dimensional line data on the GIS server side and the spatial rendering data cached on the client side can enable the client to quickly view the three-dimensional geographic data, and while achieving lightweight data on the GIS server side, it does not affect the client's three-dimensional geographic information display. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A schematic diagram of a process flow of a WebGIS three-dimensional geographic data lightweight method provided in an embodiment of the present application; Figure 2 A schematic diagram of mapping three-dimensional geographic data line features and spatial rendering data provided in an embodiment of the present application; Figure 3 A schematic diagram of client cache data update provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] The present solution is described below in conjunction with the accompanying drawings and specific implementation methods.
[0016] See also Figure 1 The WebGIS three-dimensional geographic data lightweight method provided in this embodiment includes: S101, obtaining two-dimensional plane feature data according to three-dimensional geographic data and extracting plane line features corresponding to the two-dimensional plane feature data and space line features of the three-dimensional geographic data.
[0017] A large number of three-dimensional geographic models are stored in the GIS server, which are used to describe the actual form of geographic objects. These models convert geographic objects into continuous surfaces or geographic objects, and add various attributes for further analysis and research. Three-dimensional geographic models are generally a combination of several vector models in the map space, and generally use lines, polygons, points and surfaces to represent the outline shape of the geography, and the color and object features of the geographic model are realized by color rendering.
[0018] In this embodiment, based on the GIS three-dimensional model in the existing GIS server, the loadtxt function in the numpy library is first used to load the three-dimensional geographic data from the GIS three-dimensional model, and the PCA module in the skleam library is used to reduce the dimension of the three-dimensional geographic data to obtain two-dimensional plane data and generate a two-dimensional plane model; the plane line features of the two-dimensional plane feature data and the spatial line features of the three-dimensional geographic data are obtained according to the two-dimensional plane model and the three-dimensional model respectively.
[0019] In this embodiment, the plane line features obtained are the basic division of the unit individuals in the three-dimensional geographic data on the two-dimensional level, such as a building or a road as a basic plane line unit. After obtaining the plane line features, the spatial line features can be obtained by using the contour lines of the original three-dimensional model and the obtained plane line features by differential subtraction.
[0020] S102, storing the plane line features and the space line features in the server side and mapping and storing the space rendering data in the three-dimensional geographic data in the client cache.
[0021] After splitting the 3D geographic data into plane line features, space line features and space rendering data, in order to achieve lightweight data on the GIS server side, only plane line features and space line features are retained on the GIS server side, and the space rendering data is stored in the access client cache in the form of cache. In this way, when the client views the data on the GIS server side, it can quickly request the line feature data from the server side, and the space rendering data can be obtained locally.
[0022] In this embodiment, in order to enable the client to obtain the GIS data that needs to be viewed more quickly, when the client accesses the GIS server to view and use the GIS data on the WEB page, the data is transmitted to the client in a unit-separated mode, that is, the client WEB page first displays a complete plane information. When the client clicks on any building in it, only the corresponding spatial line features will be transmitted from the server. This does not affect the client's access to data and also reduces the efficiency of data transmission on the GIS server.
[0023] Based on the above considerations, in this embodiment, the plane line features are split according to the unit individuals in the GIS three-dimensional model to obtain multiple sub-plane line features, and the space line features are split according to the sub-plane line features to obtain multiple sub-space line features. A mapping relationship between the sub-plane line features and the sub-space line features is established to obtain multiple three-dimensional module line groups, and the spatial rendering data of each of the three-dimensional module line groups in the GIS three-dimensional model is determined, and the spatial rendering data of each of the three-dimensional module line groups is mapped and stored in the client-side cache accessing the GIS server.
[0024] A schematic distance, such as Figure 2 As shown, there are three buildings A, B and C in the original GIS data. The method in this embodiment is used to first split the plane line features into three sub-plane line features A1, B1 and C1, and the sub-space line features corresponding to A1, B1 and C1 are A2, B2 and C2 respectively. A mapping relationship is established, (A1, A2), (B1, B2) and (C1, C2) form three three-dimensional module line groups, and the spatial rendering data in the client cache also exists independently, a corresponds to (A1, A2), b corresponds to (B1, B2), and c corresponds to (C1, C2).
[0025] S103, when accessing the GIS server through the client to view the three-dimensional geographic data, the rendering data corresponding to the current plane line selected area is retrieved from the client cache according to the area in the plane line feature currently selected by the client to render the three-dimensional geographic data of the plane line selected area.
[0026] When the client accesses the GIS server, the GIS server transmits the plane line features in the two-dimensional plane model to the client side; when the client side selects and determines any sub-plane line feature in the plane line feature, it requests the corresponding sub-space line feature from the GIS server side according to the mapping relationship. The corresponding spatial rendering data is read from the client side cache according to the three-dimensional module line group composed of the obtained sub-plane line feature and the requested sub-space line feature to restore all the features in the original three-dimensional geographic data.
[0027] Taking S102 as an example, when the client clicks A1 on the WEB page, it will trigger a request for subspace line feature A2 from the GIS server and retrieve spatial rendering data a from the client cache. In this way, building A displayed in the original GIS three-dimensional geographic data is displayed in front of the client.
[0028] In this embodiment, when you continue to view other geographic information after viewing building A in the three-dimensional geographic data, the subspace line features and spatial rendering data of building A can be released. However, considering that the client may repeatedly access the same geographic information, it is necessary to repeatedly request the subspace line features from the GIS server, which wastes the resources of the GIS server. Therefore, in this embodiment, after the client completes an access or operation, the spatial rendering data in the client cache is updated.
[0029] Specifically, when the first spatial rendering data in the client-side cache is retrieved, the first spatial rendering data is deleted, and the first spatial rendering data is any spatial rendering data. The first cache space is expanded, and the pointer address of the first cache space is stored as replacement data in the original position of the first spatial rendering data. After different spatial rendering data are retrieved, new cache spaces are generated respectively, and the pointer address of each new cache space is unique; after the client side has finished checking, the original three-dimensional geographic data corresponding to the first spatial rendering data is directly stored in the new cache space.
[0030] like Figure 3 As shown, the storage interval of the original first spatial rendering data on the client cache side is segment s1. When the first spatial rendering data is retrieved for the first time, the first spatial rendering data is deleted, but the storage space of segment s1 is reserved. After the first cache space is determined, the length k1 of the pointer address of the first cache space is determined, and then the storage space segment s1 of the first spatial rendering data in the client side cache is released until the remaining space length meets the length k1 of the pointer address of the first cache space; the pointer address k1 of the first cache space is stored in the remaining space after the release.
[0031] After adopting the above method, when the client accesses the same three-dimensional geographic information, it does not need to repeatedly request data from the GIS server. It only needs to read the pointer address of the original three-dimensional geographic data from the client-side cache and quickly read it directly from the corresponding new cache space.
[0032] It should be pointed out that the client in this embodiment is not limited to one, but can be multiple. After the client establishes communication with the GIS server, the spatial rendering data corresponding to the three-dimensional geographic information is randomly sent to the client cache in advance according to the client's access request. The server side only needs to transmit the corresponding line feature data according to the user's specific viewing requirements, thus realizing the lightweight transmission of GIS three-dimensional geographic data. When the client disconnects the communication with the GIS server, all geographic data in the client cache is released immediately.
[0033] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0034] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A lightweight method for WebGIS three-dimensional geographic data, characterized in that: include: Obtaining two-dimensional plane feature data according to three-dimensional geographic data and extracting plane line features corresponding to the two-dimensional plane feature data and space line features of the three-dimensional geographic data; The plane line features and the space line features are stored on the server side and the space rendering data in the three-dimensional geographic data is mapped and stored in the client cache; When accessing the GIS server through the client to view three-dimensional geographic data, the rendering data corresponding to the current plane line selected area is retrieved from the client cache according to the area in the plane line feature currently selected by the client to render the three-dimensional geographic data of the plane line selected area.
2. The WebGIS three-dimensional geographic data lightweight method according to claim 1, characterized in that: The step of obtaining two-dimensional plane feature data according to three-dimensional geographic data and extracting plane line features corresponding to the two-dimensional plane feature data and space line features of the three-dimensional geographic data includes: Use the loadtxt function in the numpy library to load 3D geographic data from the GIS 3D model; Use the PCA module in the skleam library to reduce the dimensionality of the three-dimensional geographic data to obtain two-dimensional plane data and generate a two-dimensional plane model; The plane line features of the two-dimensional plane feature data and the space line features of the three-dimensional geographic data are obtained according to the two-dimensional plane model and the three-dimensional model respectively.
3. The WebGIS three-dimensional geographic data lightweight method according to claim 2, characterized in that: The planar line features and the spatial line features are stored on the server side and the spatial rendering data in the three-dimensional geographic data is mapped and stored in the client cache, including: Splitting the plane line feature according to the unit individuals in the GIS three-dimensional model to obtain a plurality of sub-plane line features; Splitting the space line feature according to the sub-plane line feature to obtain a plurality of sub-space line features; Establishing a mapping relationship between the sub-plane line features and the sub-space line features to obtain a plurality of three-dimensional module line groups; Determine the spatial rendering data of each of the three-dimensional module line groups in the GIS three-dimensional model; The spatial rendering data mapping of each of the three-dimensional module line groups is stored in a cache on the client side accessing the GIS server.
4. The WebGIS three-dimensional geographic data lightweight method according to claim 3, characterized in that: When the GIS server is accessed through the client to view the three-dimensional geographic data, the rendering data corresponding to the current plane line selected area is retrieved from the client cache according to the area in the plane line feature currently selected by the client to render the three-dimensional geographic data of the plane line selected area, including: When the client accesses the GIS server, the GIS server transmits the plane line features in the two-dimensional plane model to the client side; When the client side selects and determines any sub-plane line feature in the plane line feature, it requests the corresponding sub-space line feature from the GIS server side according to the mapping relationship; The three-dimensional module line group composed of the obtained sub-plane line features and the requested sub-space line features is read from the client-side cache corresponding spatial rendering data to restore all features in the original three-dimensional geographic data.
5. The WebGIS three-dimensional geographic data lightweight method according to claim 4, characterized in that: After obtaining the three-dimensional module line group composed of the sub-plane line features and the sub-space line features, the corresponding spatial rendering data is read from the client-side cache to restore all the features in the original three-dimensional geographic data, including: Determine the color, gloss and transparency parameters of the three-dimensional module line group corresponding to the spatial rendering data; Firstly, the texture features in the spatial rendering data are retrieved to perform texture rendering on the surface of the three-dimensional module line group so that each surface of the three-dimensional module line group can restore the original pattern or details; Then, a color scheme of different faces of the three-dimensional module line group is determined, and the color features in the spatial rendering data are rendered onto the textured three-dimensional module line group; Finally, adjustment and rendering are performed according to the illumination, shadow and reflection data in the spatial rendering data to obtain all the features of the three-dimensional module line group in the original three-dimensional geographic data.
6. The WebGIS three-dimensional geographic data lightweight method according to claim 4 or 5, characterized in that: When the client side completes an access or operation, the spatial rendering data in the client side cache is updated.
7. The WebGIS three-dimensional geographic data lightweight method according to claim 6, characterized in that: When the client side completes an access or operation, the spatial rendering data in the client side cache is updated, including: After the first spatial rendering data in the client-side cache is retrieved, the first spatial rendering data is deleted, the first spatial rendering data being any spatial rendering data; Expanding the first cache space, and storing the pointer address of the first cache space as replacement data to the original position of the first spatial rendering data, and generating new cache spaces after different spatial rendering data are retrieved, and the pointer address of each new cache space is unique; After the client side has finished viewing, the original three-dimensional geographic data corresponding to the first spatial rendering data is directly stored in the new cache space.
8. The WebGIS three-dimensional geographic data lightweight method according to claim 7, characterized in that: The step of expanding the first cache space and storing the pointer address of the first cache space as replacement data to the original position of the first space rendering data includes: After deleting the first spatial rendering data, retaining the storage space of the first spatial rendering data in the client-side cache unchanged; After the first cache space is determined, determining the length of the pointer address of the first cache space; The storage space of the first spatial rendering data in the client-side cache is released until the length of the remaining space meets the length of the pointer address of the first cache space; The pointer address of the first cache space is stored in the remaining space after the release.
Citation Information
Patent Citations
Geographic information system having dynamic data model
CA2490428A1
Method for quickly loading space data through three-dimensional GIS (global information system)
CN104616354A
3D visualization method and system of natural resource data
CN105069020A
EnersunWebCache based method for dynamically generating cached power grid map tiles
CN105608191A
Embedded Web3d system based on Thing3DV local rendering cloud management model
CN113298957A
