WebGL-based city information model two-dimensional and three-dimensional data service dynamic projection method and system

By using a WebGL-based dynamic projection method for 2D and 3D data services of urban information models, the problem of dynamic projection of multi-coordinate system data in WEB 3D scenes is solved, realizing real-time dynamic projection and efficient operation and maintenance of data, and supporting seamless display of multiple coordinate systems.

CN121996850APending Publication Date: 2026-05-08GUANGZHOU AOGE INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU AOGE INTELLIGENT TECH CO LTD
Filing Date
2025-12-18
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing web 3D scenes, data from different coordinate systems cannot be properly projected onto the Earth's surface, resulting in high maintenance costs and severe data isolation. Traditional planar projection 3D models cannot be loaded, and dynamic projection display of multiple coordinate systems cannot be achieved.

Method used

A WebGL-based dynamic projection method for urban information model 2D and 3D data services is adopted. Through metadata information acquisition and coordinate system resolution, and by utilizing static tiling, dynamic services, and dynamic projection components of 3D data services, the data services are dynamically projected onto the Earth's surface in real time in the browser environment, supporting seamless overlay display of multiple coordinate systems.

Benefits of technology

It enables real-time dynamic projection fusion of multi-source heterogeneous data services at the front end, shortens preprocessing time, reduces operation and maintenance complexity, supports seamless overlay display of various coordinate systems, reduces operation and maintenance costs, and improves data conversion efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996850A_ABST
    Figure CN121996850A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of city information models, and relates to a WebGL-based city information model two-dimensional and three-dimensional data service dynamic projection method and system. The method comprises the following steps of: judging a requested service type according to a URL (Uniform Resource Locator) address of a data service, and obtaining metadata information of the data service needing to be loaded; judging whether the content identifying the coordinate system information exists in the metadata information, if not, receiving an external declaration, and transmitting the external declaration into a coordinate system; if the data service has the defined coordinate system information, analyzing the coordinate system information of the data service; and calling corresponding dynamic projection components according to different service types, and performing dynamic projection transformation of the data service. According to the method, the data service is dynamically projected to the surface of the earth in real time in a browser environment, the problems of data isolation, low preprocessing efficiency and operation and maintenance redundancy in an existing scheme are solved, and the technical bottleneck that multi-coordinate system data cannot be dynamically processed in an existing Web end three-dimensional scene is broken through.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of City Information Modeling (CIM) technology, specifically a method and system for dynamic projection of two-dimensional and three-dimensional data services of city information models based on WebGL. Background Technology

[0002] With the development of City Information Modeling (CIM), 3D Reality China, Digital Twin Cities, Citywide Digital Transformation, and New Urban Infrastructure Construction, and with the increasing number and sophistication of 3D data acquisition and production equipment, the amount of 3D urban data is exploding. Almost daily, a large amount of data is generated, including white models, oblique photogrammetry, artificial precision models, laser point clouds, and BIM data. This data ultimately needs to be aggregated into a unified urban data platform, such as a City Information Modeling (CIM) platform, forming the city's public digital foundation. This data typically exists as a service on the platform. How to dynamically project and display these data services from different coordinate systems is a pressing issue that needs to be addressed.

[0003] Traditional planar projection 3D models cannot be loaded or directly fitted to the Earth's surface. For 3D data projection, such as I3S data services, two separate service SLPK files need to be maintained for the original multi-coordinate systems. After performing projection transformations on the coordinate system, the service can be published for use, resulting in a long workflow. Moreover, dynamic data projection is mostly implemented on desktop environments. In web scenarios, data from different coordinate systems (such as Gaussian projection, geographic coordinate systems, and commercial map coordinate systems) are generally isolated and cannot be properly projected onto the Earth's surface. In addition, two separate services need to be maintained for different coordinate systems (such as WGS84 version and local coordinate system version), increasing operational costs.

[0004] Therefore, existing technologies for accessing multi-coordinate system data in web 3D scenes have shortcomings and need to be improved and developed. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention provides a method and system for dynamic projection of urban information model 2D and 3D data services based on WebGL. This method projects urban 2D and 3D data services onto the Earth's surface in real time within a browser environment, solving the problems of data isolation, inefficient preprocessing, and redundant operation and maintenance in existing solutions. It also breaks through the technical bottleneck that existing Web-based 3D scenes cannot dynamically process multi-coordinate system data.

[0006] On one hand, embodiments of the present invention provide a dynamic projection method for two-dimensional and three-dimensional data services of a city information model based on WebGL, comprising the following steps: S1. Based on the URL address of the data service, determine the type of the requested service and obtain the metadata information of the data service to be loaded. S2. Determine if the metadata contains information identifying the coordinate system. If not, receive the external declaration and pass in the coordinate system. If the data service has predefined coordinate system information, parse the coordinate system information of the data service. S3. Invoke the corresponding dynamic projection component according to different service types to perform dynamic projection transformation of data services.

[0007] Preferably, the dynamic projection component includes a static tile dynamic projection component, a dynamic service dynamic projection component, and a 3D data service dynamic projection component; step S3 includes: S31. The static slice dynamic projection component is used to complete the front-end dynamic projection transformation of the static slice service. S32. Through the dynamic service dynamic projection component, realize the front-end dynamic projection transformation of dynamic element service and dynamic tile service; S33. Through the dynamic projection component of the 3D data service, realize the front-end dynamic projection transformation of the 3D tiling service.

[0008] On the other hand, embodiments of the present invention also provide a dynamic projection system for two-dimensional and three-dimensional data services of urban information models based on WebGL, implemented using the above-mentioned dynamic projection method, wherein the dynamic projection system includes: The metadata information acquisition module determines the type of the requested service based on the URL address of the data service and obtains the metadata information of the data service to be loaded. The coordinate system information parsing module determines whether the metadata contains content identifying the coordinate system. If not, it receives an external declaration and passes in the coordinate system. If the data service has predefined coordinate system information, it parses the coordinate system information of the data service. The dynamic projection module calls the corresponding dynamic projection component according to different service types to perform dynamic projection transformation of data services.

[0009] Compared with the prior art, the technical effects achieved by the present invention include: 1. This invention realizes real-time dynamic projection fusion of multi-source heterogeneous data services such as white model, oblique photogrammetry, and BIM in City Information Model (CIM), supports seamless overlay display of various coordinate systems (CGCS2000, BD09, etc.), supports direct conversion of 2D and 3D data in the browser, shortens preprocessing time by about 90%, and solves the problem of projection isolation of multi-source heterogeneous data.

[0010] 2. This invention develops a zero-preprocessing loading technology, which uses a front-end dynamic coordinate transformation mechanism, such as ECEF→ENU matrix transformation, and coordinate dynamic projection to directly render planar projection data, avoiding data reconstruction and publishing, and solving the problem of low efficiency in 3D data preprocessing.

[0011] 3. This invention constructs a unified service publishing mechanism, in which the original coordinate system data is directly published and the dynamic projection task is completed by the front end, reducing the complexity of platform operation and maintenance and solving the problem of high complexity in the operation and maintenance of multi-coordinate system services.

[0012] 4. This invention supports data services for commonly used two-dimensional and three-dimensional Gaussian projection coordinate systems as well as local coordinate systems, enabling lossless and efficient data conversion. Attached Figure Description

[0013] Figure 1 This is a flowchart of the dynamic projection method for two-dimensional and three-dimensional data services of urban information models in this embodiment of the invention. Figure 2 This is a flowchart of the front-end dynamic projection transformation of the static slicing service in an embodiment of the present invention; Figure 3 This is a flowchart of the front-end dynamic projection transformation of the dynamic element / tile service in this embodiment of the invention; Figure 4 This is a flowchart of the front-end dynamic projection transformation of the 3D slicing service in an embodiment of the present invention; Figure 5 This is a schematic diagram of the front-end dynamic projection transformation of the three-dimensional slicing service in an embodiment of the present invention. Detailed Implementation

[0014] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto. Example

[0015] The coordinate transformation classes built into this invention correspond to the following relationships: ①GaussKrugerToCartographic: Converting Gauss projection plane coordinates in meters to Earth's radian coordinates; ②CartographicToGaussKruger: Convert Earth's radian coordinates to Gaussian projection plane coordinates; ③GaussKrugerToGeographic: Converts Gauss projection plane coordinates in meters to geographic latitude and longitude coordinates; ④GeographicToGaussKruger: Convert geographic latitude and longitude coordinates to Gaussian projection plane coordinates in meters; ⑤GCJ02ToCartographic: National Geodetic Survey 02 conversion of latitude and longitude coordinates to Earth's radian coordinates; ⑥BD09ToGCJ02: Convert Baidu 09 latitude and longitude coordinates to the National Geodetic Survey 02 latitude and longitude coordinate system; ⑦GCJ02ToBD09: Converting the coordinate system from the National Geodetic Survey 02 latitude and longitude coordinate system to the Baidu 09 latitude and longitude coordinate system; ⑧CartographicToGCJ02: Convert Earth's radian coordinates to National Geodetic Survey 02 latitude and longitude coordinates.

[0016] The present invention proposes a dynamic projection method for two-dimensional and three-dimensional data services of urban information models based on WebGL, such as... Figure 1 As shown, the specific steps include the following: S1. Based on the URL address of the data service, determine the type of the requested service and obtain the metadata information of the data service to be loaded.

[0017] S2. Determine if the metadata contains information identifying the coordinate system. If not, receive the external declaration and pass in the coordinate system WKT (Well-Known Text) / WKID (Well-Known ID). If the data service has predefined coordinate system information, parse the coordinate system information of the data service.

[0018] The key analysis methods are as follows: S21 and WKT are languages ​​that fully describe spatial reference systems and can be directly parsed.

[0019] S22 and WKID analysis, taking the commonly used Gaussian projection coordinate system in China as an example.

[0020] The system constructs the WKIDToGaussKrugerPrjParams method to convert WKID (Well-Known ID) to Gauss-Kruger projection parameters, specifically for handling Gaussian projection parameters in the China National Coordinate System 2000 (CGCS2000). This method is mainly used for coordinate reference system conversion in GIS systems, converting standard WKID encoding into specific Gauss-Kruger projection parameters, providing the basic configuration for subsequent coordinate transformations and map projections.

[0021] After parsing, range verification will be performed to check if WKID is within the valid range (4491-4554) of the CGCS2000 Gaussian projection. Parameter initialization will be performed, setting default projection parameters such as the central meridian, east offset distance of 500,000, and north offset distance of 0. Configuration matching will be performed, iterating through four CGCS2000 projection configurations: 6-degree with zone number, 6-degree with zone number without zone number, 3-degree with zone number, and 3-degree with zone number without zone number. Parameter calculations will include: Central meridian = Initial central meridian + (WKID difference × bandwidth); (Zone number = starting zone number + WKID difference; this only applies to zone number configuration.)

[0022] For the 3-degree and 6-degree zones configured with zone numbers, special processing will be performed, and a zone number prefix will be added for the eastward offset distance.

[0023] S3. Invoke the corresponding dynamic projection component according to different service types to perform dynamic projection transformation of data services.

[0024] In this embodiment, the dynamic projection component includes a static tile dynamic projection component, a dynamic service dynamic projection component, and a 3D data service dynamic projection component; this step specifically includes: S31. Through the static tile dynamic projection component, complete the front-end dynamic projection transformation of static tile services (WMTS, Geoscene MapServer, etc.).

[0025] like Figure 2 As shown, the specific implementation steps of the front-end dynamic projection transformation of the static tiling service include: S311. First, determine the coordinate system of the data service, and then determine different service slicing schemes based on different coordinate systems.

[0026] This step constructs the updateTilingScheme function to create corresponding tiling schemes based on different coordinate systems and tiling parameters.

[0027] When the coordinate system of the data service is a geographic coordinate system, the service tiling scheme is handled in two ways: In the simple case, the default geographic coordinate system tiling scheme class `GeographicTilingScheme` is used; in the complex case, a special tiling scheme from -400 to 400 is handled, requiring the geographic extent to be reset. params.rectangle=Rectangle.fromDegrees(-400, -400, 400, 400).

[0028] When the coordinate system of the data service is the Mercator projection coordinate system, use the Mercator global projection coordinate system service tiling scheme class WebMercatorTilingScheme.

[0029] When the coordinate system of the data service is a Gaussian projection coordinate system, a Gaussian projection tiling scheme class, GaussKrugerTilingScheme, is constructed. This class mainly inherits from the WebMercatorTilingScheme class. The core methods that need to be overridden are projection.project and projection.unproject.

[0030] The `projection.project` method is refactored as follows: First, it calls `CartographicToGaussKruger` to convert latitude and longitude radian coordinates to Gaussian plane projection meter coordinates, returning the Gaussian projected Cartesian coordinate values; then, it converts degrees, minutes, and seconds, converting the radian geographic coordinates to degrees; next, it converts to Gauss-Kruger projection, using the Gauss-Kruger projection algorithm to convert latitude and longitude coordinates to plane coordinates; finally, it outputs the coordinates, returning a `Cartesian3` object containing the X and Y coordinates.

[0031] Furthermore, the `projection.unproject` method has been refactored to: first, call `GaussKrugerToCartographic` to convert the Cartesian coordinates of the Gaussian projection into latitude and longitude radian coordinates; then perform Gauss-Kruger inverse projection, using the Gauss-Kruger inverse projection algorithm to convert the plane coordinates (X, Y) into latitude and longitude coordinates; next, convert the latitude and longitude coordinates from degrees to radians; finally, output the coordinates, returning a `Cartographic` object containing longitude and latitude.

[0032] When the coordinate system of the data service is a commercial map coordinate system, taking Baidu Maps as an example, we construct the Baidu Maps tile scheme class BD09TilingScheme. This class mainly inherits from the WebMercatorTilingScheme class.

[0033] The `project` method has been refactored as follows: First, it converts latitude and longitude coordinates to Baidu 09 latitude and longitude coordinates, returning the latitude and longitude coordinate values ​​in the Baidu coordinate system. Then, it converts the geographic coordinates from radians to degrees. Next, it transforms the coordinate system, converting the WGS84 coordinate system to GCJ02 (National Geodetic Survey 02 Coordinate System), and then from GCJ02 to BD09 (Baidu coordinate system). Finally, it restricts the coordinate range, limiting longitude to [-180, 180] and latitude to [-71.988531, 74.000022]. This algorithm is the core projection transformation method of the Baidu Maps tile system, ensuring that geographic coordinates can be correctly mapped to the Baidu Maps tile coordinate system, providing a foundation for subsequent tile coordinate calculations.

[0034] The `unproject` method is refactored as follows: First, convert the Baidu 09 latitude and longitude coordinates to latitude and longitude radian coordinates and return the latitude and longitude radian coordinates; then, reverse the coordinate system transformation, converting the BD09 coordinate system to GCJ02 (from the Baidu coordinate system to the National Geodetic Survey 02 coordinate system), and then converting the GCJ02 coordinate system to WGS84 (from the National Geodetic Survey 02 coordinate system to the International Standard Coordinate System); finally, convert the degree-based latitude and longitude coordinates to radian units.

[0035] The `tileXYToNativeRectangle` method has been refactored to calculate the geographic rectangle range from tile coordinates. First, the tile width is obtained by retrieving the tile width for the current layer from the `resolutions` array based on the layer level. Then, the boundary coordinates are calculated, where `tileWidth` is the tile width, typically 256. The specific calculation formulas are as follows: West boundary (west) = x * tileWidth, East boundary (east) = (x+1) * tileWidth, North boundary (north) = (-y+1) * tileWidth, South boundary (south) = -y * tileWidth.

[0036] The `positionToTileXY` method has been refactored to calculate the conversion of geographic coordinates to corresponding tile coordinates. First, it checks the boundaries, specifically whether the input geographic coordinates are within the rectangular area of ​​the current tile system. Then, it performs a coordinate projection transformation, converting the geographic coordinates to Web Mercator coordinates using a projection system. Finally, it calculates the tile coordinates. X-tile coordinate = Math.floor(Mercator X-coordinate / tile width); Y-coordinate of tile = -Math.floor(Mercator Y-coordinate / tile width).

[0037] S312. After generating different slicing schemes based on different coordinate systems, determine whether the slicing scheme is a standard scheme, so as to further process the non-standard slicing scheme level in subsequent steps.

[0038] In this embodiment, the method for determining whether the slicing scheme is a standard scheme is as follows: (1) Preprocess the input parameters: If the obtained service metadata only contains the level 0 scale information, then obtain lod0ScaleDenominator (scale denominator, such as 1000 in 1:1000), and calculate the level 0 resolution lod0Resolution according to the formula resolution = (scaleDenominator * metersPerInch) / dpi, where metersPerInch represents the number of meters per inch; dpi represents the pixel value per inch.

[0039] (2) Use the following two conditions to detect cases where the range of the 0th-level slice is not equal to 180 degrees: The first condition is to check if the range of the level 0 slice is not equal to 180 degrees (allowing an error of 0.1): .

[0040] The second condition is to confirm that the level identifier of the level 0 slice is indeed 0: tileInfo.lods[0]?.level === 0.

[0041] When both of the above conditions are met, it is determined that the level 0 slice of the corresponding slicing scheme is not a true level 0, but a non-standard level.

[0042] S313, Handling non-standard slicing schemes at different levels.

[0043] For non-standard slicing schemes at level i, the core processing steps are: (1) Calculate the number of level 0 slices in the Y direction, and calculate the total number of slices of this level based on the level 0 resolution of the slices.

[0044] The total number of slices is calculated as follows: First, determine the equatorial length. If using a geographic coordinate system (latitude and longitude), the equatorial length is 360 degrees; if using a projected coordinate system (metric system), the equatorial length is 40075016.68557849 meters (the circumference of the Earth's equator). Then, calculate the original resolution: originResolution = equatorial length / slice size. Next, calculate the scale factor: num = original resolution / level 0 slice resolution. Then, calculate the level: level = Math.round(Math.log2(num)), taking the nearest integer level. Finally, return the total number of slices: Math.pow(2, level), which is 2 raised to the power of level.

[0045] ; .

[0046] (2) Based on the base resolution multiplied by the number of level 0 tiles in the Y direction, the actual level 0 resolution used is obtained: lod0Resolution = lod0Resolution * numberOfLevelZeroTilesY.

[0047] (3) Construct the rectangular boundary points. For the southwest corner, use the Y-value of the slice origin coordinates minus the product of the resolution and the slice height, i.e.: rectangleSouthwest.x=tileOrigin.x; rectangleSouthwest.y=tileOrigin.y-lod0Resolution* tileHeight; For the northeast corner, the X value is increased by twice the product of the resolution and the slice width, while the Y value retains the Y coordinate of the slice origin, i.e.: rectangleNortheast.x=tileOrigin.x+lod0Resolution * tileWidth * 2; rectangleNortheast.y=tileOrigin.y.

[0048] S314. Construct the mapping relationship between the tile pyramid model and the coordinate system.

[0049] The global Earth's surface is divided into multiple levels of tile grids. Lower levels (such as Level 0) cover the entire globe with a few tiles, while higher levels (such as Level 18) contain more finely detailed local tiles. For example: Level 0: One tile covers the entire globe; Level 1: 4 tiles (2×2); Level n: 4^n tiles.

[0050] The relationship between the Earth tile coordinate system and latitude and longitude is expressed using the WGS84 geographic coordinate system. Earth tiles are identified by the (z, x, y) triplet, where z represents the level with a value of 0-N, x represents the column number increasing from left to right, and y represents the row number.

[0051] ; ; Where lat represents latitude and lot represents longitude.

[0052] Calculate the requested tile row and column number based on the pyramid model and slicing scheme: First, a boundary check is performed to check if the position is within the rectangular area of ​​the tile scheme. If it is outside the range, undefined is returned. Then calculate the number of tiles, and obtain the total number of tiles in the X and Y directions according to the layer; xTiles = this.getNumberOfXTilesAtLevel(level); yTiles = this.getNumberOfYTilesAtLevel(level); Then calculate the tile dimensions: total width: overallWidth = northeast corner x - southwest corner x, single tile width: xTileWidth = overallWidth / xTiles, total height: overallHeight = northeast corner y - southwest corner y, single tile height: yTileHeight = overallHeight / yTiles; Next, a coordinate projection transformation is performed to project the geographic coordinates onto the Web Mercator coordinate system; Next, calculate the distances. The distance from the west boundary is: distanceFromWest = projected x - southwest corner x, and the distance from the north boundary is: distanceFromNorth = northeast corner y - projected y (note the Y-axis direction). Finally, the tile coordinates are calculated: X coordinate: xTileCoordinate = (distanceFromWest / xTileWidth) | 0 (rounded down), Y coordinate: yTileCoordinate = (distanceFromNorth / yTileHeight) | 0 (rounded down). Boundary adjustments are made to ensure that the tile coordinates do not exceed the number of tiles.

[0053] S315. Determine the data format of static tiles. Different types of tile data are drawn and rendered on the map using different methods.

[0054] If the tile is raster image data, the tile is obtained according to its row and column numbers, and the corresponding tile material is applied according to the corresponding grid. If the tile is an STK terrain tile, the corresponding elevation model is directly loaded into the corresponding range according to the row and column numbers.

[0055] If the tile is a Heightmap raster tile terrain, the pixel values ​​need to be interpolated and converted into triangular grid data first, and then the corresponding elevation model needs to be loaded in the corresponding range according to the row and column numbers.

[0056] S32. Through the dynamic service dynamic projection component, realize the front-end dynamic projection transformation of dynamic element service and dynamic tile service.

[0057] Among them, dynamic feature services include WFS, Geoscene FeatureServer, etc., and dynamic tile services include WMS, Geoscene MapServer, etc.

[0058] like Figure 3As shown, taking dynamic projection of Gaussian projection data as an example, the specific implementation steps of the front-end dynamic projection transformation of dynamic feature service and dynamic tile service include: S321. Obtain the intersection of the view range and the dynamic service.

[0059] The acquisition process is as follows: Perform a status check to see if the layer has been added to the view, if the layer is visible, and if the layer needs updating; obtain the current camera's view extent; calculate the intersection of the camera's view extent and the layer extent. If the layer is in a Gaussian projection coordinate system, GaussKrugerToCartographic needs to be called to dynamically project the layer extent; handle boundary conditions. If the intersection is empty, return directly without updating; if the intersection is not empty, set an update flag, calculate the view bounding box, and trigger layer updates.

[0060] S322. Determine whether the service provider supports dynamic projection transformation. If the requested service provider supports dynamic projection transformation, modify the dynamic service request sent by the client. If the requested dynamic tile or data service does not support dynamic projection transformation, dynamic projection transformation needs to be performed on the client. Calculate the projection relationship between the range of the requested tile and the range in the map, and convert the WGS84 latitude and longitude rectangle range back to the rectangle range of the original coordinate system, i.e., the rectangle range of the Gaussian projection coordinate system.

[0061] S323. Request data from the server based on the transformed coordinate system range and coordinate reference.

[0062] S324. Determine whether the service type is dynamic tiles or dynamic vector data. If it is dynamic tiles, the image data is applied to the Earth's surface as a texture according to the geographic range. If it is dynamic vector data, call GaussKrugerToGeographic to dynamically convert the returned dynamic vector data point by point into the coordinate values ​​required for map drawing, and then draw it on the map.

[0063] S33. Achieve dynamic projection transformation of the front-end of the 3D tiling service through a dynamic projection component of the 3D data service. The 3D tiling service includes 3DTiles, I3S, etc.

[0064] See Figure 4 The core idea behind the dynamic projection transformation in this step is to assemble the model in the Earth-Centered, Earth-Fixed (ECEF) coordinate system, and then transform it from the sphere-centered Cartesian coordinate system to the local Cartesian coordinate system (ENU) on the Earth's surface. Figure 5 As shown.

[0065] The specific steps are as follows: S331. Determine whether the coordinate system of the 3D tile service is a planar projected coordinate system (Gaussian / Mercator) or a geographic coordinate system (4326 / 4490).

[0066] S332. If the coordinate system of the 3D tile service is a geographic coordinate system, then the model is constructed and rendered on the map according to the rule that the child node is calculated based on the global change matrix of the parent node.

[0067] S333. If the coordinate system of the 3D slicing service is a planar projection coordinate system, then set the center point as the origin of the Earth-Centered, Earth-Fixed (ECEF) coordinate system.

[0068] .

[0069] S334. Traverse the child nodes of the data within the loaded range. For the center point of the bounding box of the traversed child node, call GaussKrugerToGeographic to convert it into latitude and longitude coordinates, and then convert it into an ENU matrix.

[0070] The transformation matrix construction steps are as follows: Rotation matrix R: calculated from the quaternion or default direction of the OBB; Parent node global transformation matrix Mparent, which is the transformation matrix inherited from the parent node; Local transformation matrix Mlocal, which is the local transformation matrix of the child node relative to the parent node; Geocentric to Northeast-Up transformation matrix MECEF→ENU, which is the rotation matrix from the geocentric fixed coordinate system (ECEF) to the local Northeast-Up coordinate system, where geoPosition is the latitude and longitude coordinates of the center point of the bounding box of the child node (converted from meters to latitude and longitude via GaussKrugerToGeographic); For the root node and non-WGS84 coordinate systems, apply the ENU (East-North-Up) to world coordinate transformation to obtain the final transformation matrix: .

[0071] S335. Determine if the service type is 3Dtiles, I3S, or others. If the service type is I3S, the transformation matrix needs to be converted from column-major to row-major.

[0072] S336. Calculate the transformation matrix of the child node based on the origin of the parent node's sphere center coordinates. The calculation steps are as follows: Matrix multiplication: Multiply the transformation matrix enuToW from ENU to world coordinates with the current local transformation matrix. Child nodes inherit the pose of their parent nodes. Final matrix = enuToW × local transformation matrix.

[0073] Result storage: The final transformation matrix is ​​obtained and used for 3D tile definition.

[0074] S337. Based on the calculated transformation matrix, create each node one by one and complete the model construction.

[0075] S338. Modify the root node transformation matrix based on the transformation matrix relative to the center of the sphere in the metadata.

[0076] Based on the same inventive concept, this embodiment also provides a WebGL-based dynamic projection system for two-dimensional and three-dimensional data services of urban information models, implemented using the aforementioned dynamic projection method. The dynamic projection system includes: The metadata information acquisition module determines the type of the requested service based on the URL address of the data service and obtains the metadata information of the data service to be loaded. The coordinate system information parsing module determines whether the metadata contains content identifying the coordinate system. If not, it receives an external declaration and passes in the coordinate system. If the data service has predefined coordinate system information, it parses the coordinate system information of the data service. The dynamic projection module calls the corresponding dynamic projection component according to different service types to perform dynamic projection transformation of data services.

[0077] In the dynamic projection system, please refer to the corresponding steps S1-S3 for the specific implementation process of each of the above modules.

[0078] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A dynamic projection method for two-dimensional and three-dimensional data services of a city information model based on WebGL, characterized in that, Includes the following steps: S1. Based on the URL address of the data service, determine the type of the requested service and obtain the metadata information of the data service to be loaded. S2. Determine if the metadata contains information identifying the coordinate system. If not, receive the external declaration and pass in the coordinate system. If the data service has predefined coordinate system information, parse the coordinate system information of the data service. S3. Invoke the corresponding dynamic projection component according to different service types to perform dynamic projection transformation of data services.

2. The dynamic projection method according to claim 1, characterized in that, The dynamic projection components include a static tile dynamic projection component, a dynamic service dynamic projection component, and a 3D data service dynamic projection component; step S3 includes: S31. The static slice dynamic projection component is used to complete the front-end dynamic projection transformation of the static slice service. S32. Through the dynamic service dynamic projection component, realize the front-end dynamic projection transformation of dynamic element service and dynamic tile service; S33. Through the dynamic projection component of the 3D data service, realize the front-end dynamic projection transformation of the 3D tiling service.

3. The dynamic projection method according to claim 2, characterized in that, Step S31, the front-end dynamic projection transformation of the static tiling service, includes the following steps: S311. First, determine the coordinate system of the data service, and then determine different service slicing schemes based on different coordinate systems. S312. Determine whether the slicing scheme is a standard scheme; S313, Handling non-standard slicing scheme levels; S314. Construct the mapping relationship between the tile pyramid model and the coordinate system; S315. Determine the data format of static tiles. Different types of tile data are drawn and rendered on the map using different methods.

4. The dynamic projection method according to claim 3, characterized in that, The method for determining whether the slicing scheme is a standard scheme in step S312 is as follows: Preprocess the input parameters; Two conditions are used to detect cases where the range of the level 0 slice is not equal to 180 degrees: The first condition is to check whether the range of the level 0 slice is not equal to 180 degrees; The second condition is to confirm that the level identifier of the level 0 slice is indeed 0; When both conditions are met, it is determined that the level 0 slice of the corresponding slicing scheme is not the real level 0, but a non-standard level. Step S313 For non-standard slicing scheme levels, the processing steps include: Calculate the number of level 0 slices in the Y direction, and calculate the total number of slices of the corresponding level based on the level 0 resolution of the slices; The actual level 0 resolution is obtained by multiplying the base resolution by the number of level 0 slices in the Y direction; Construct the rectangular boundary points. For the southwest corner, use the slice origin coordinate Y value minus the product of resolution and slice height; for the northeast corner, add twice the product of resolution and slice width to the X value, and keep the slice origin Y coordinate for the Y value.

5. The dynamic projection method according to claim 3, characterized in that, Step S314 includes: The global surface is divided into a multi-level tile grid, with lower levels covering the entire globe with a few tiles and higher levels containing more refined local tiles. The relationship between the Earth tile coordinate system and latitude and longitude is expressed using the WGS84 geographic coordinate system; Earth tiles are identified by (z, x, y) triples, where z represents the level with a value of 0-N, x represents the column number increasing from left to right, and y represents the row number; The calculation of the requested tile row and column number is performed based on the pyramid model and tiling scheme: First, a boundary check is performed to ensure the location is within the rectangular area of ​​the tile scheme; then, the number of tiles is calculated, obtaining the total number of tiles in the X and Y directions according to the hierarchy; next, the tile size is calculated; then, a coordinate projection transformation is performed, projecting the geographic coordinates to the Web Mercator coordinate system; then, the distances from the western and northern boundaries are calculated; finally, the tile coordinates are calculated, and the boundaries are processed to ensure that the tile coordinates do not exceed the range of the number of tiles.

6. The dynamic projection method according to claim 3, characterized in that, In step S315: If the tile is a raster image data, the tile is obtained according to the row and column number, and the corresponding tile material is applied according to the corresponding grid; if the tile is an STK terrain tile, the corresponding elevation model is directly loaded in the corresponding range according to the row and column number. If the tile is a Heightmap raster tile terrain, first convert the pixel values ​​into triangular grid data through interpolation, and then load the corresponding elevation model in the corresponding range according to the row and column numbers.

7. The dynamic projection method according to claim 2, characterized in that, Step S32 includes: S321. Obtain the intersection of the view extent and the dynamic service; S322. Determine whether the service provider supports dynamic projection transformation. If the requested service provider supports dynamic projection transformation, modify the dynamic service request sent by the client. If the requested dynamic tile or data service does not support dynamic projection transformation, dynamic projection transformation needs to be performed on the client. Calculate the projection relationship between the range of the requested tile and the range in the map, and convert the WGS84 latitude and longitude rectangle range back to the rectangle range of the original coordinate system. S323. Request data from the server based on the transformed coordinate system range and coordinate reference; S324. Determine whether the service type is dynamic tiles or dynamic vector data. If it is dynamic tiles, the image data is applied to the Earth's surface as a texture according to the geographic range. If it is dynamic vector data, call GaussKrugerToGeographic to dynamically convert the returned dynamic vector data point by point into the coordinate values ​​required for map drawing, and then draw it on the map.

8. The dynamic projection method according to claim 2, characterized in that, Step S33 includes: S331. Determine whether the coordinate system of the 3D tile service is a planar projection coordinate system or a geographic coordinate system; S332. If the coordinate system of the 3D tile service is a geographic coordinate system, then the model is built and rendered on the map according to the rule of calculating the global change matrix of the child node based on the parent node. S333. If the coordinate system of the 3D slicing service is a planar projection coordinate system, then set the center point as the origin of the geocentric coordinate system. S334. Traverse the child nodes of the data within the loading range. For the center point of the bounding box of the traversed child node, call GaussKrugerToGeographic to convert it into latitude and longitude coordinates, and then convert it into an ENU matrix. S335. Determine if the service type is 3Dtiles, I3S, or others; if the service type is I3S, convert the transformation matrix from column-major to row-major. S336. Calculate the transformation matrix of the child node based on the origin of the parent node's sphere center coordinates; S337. Based on the calculated transformation matrix, create each node one by one and complete the model construction; S338. Modify the root node transformation matrix based on the transformation matrix relative to the center of the sphere in the metadata.

9. The dynamic projection method according to claim 1, characterized in that, Step S2 passes the external declaration into the WKT or WKID coordinate system.

10. A dynamic projection system for two-dimensional and three-dimensional data services of a city information model based on WebGL, implemented using the dynamic projection method described in any one of claims 1-9, characterized in that, The dynamic projection system includes: The metadata information acquisition module determines the type of the requested service based on the URL address of the data service and obtains the metadata information of the data service to be loaded. The coordinate system information parsing module determines whether the metadata contains content identifying the coordinate system. If not, it receives an external declaration and passes in the coordinate system. If the data service has predefined coordinate system information, it parses the coordinate system information of the data service. The dynamic projection module calls the corresponding dynamic projection component according to different service types to perform dynamic projection transformation of data services.