Map element display method and device, medium, electronic equipment and program product
By breaking down the 3D model of map elements into skeleton lines and model components, and using affine transformation parameters for coordinate transformation, the problems of slow map loading speed and inaccurate display are solved, achieving efficient and accurate display of map elements.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2024-11-27
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies suffer from slow map loading speeds and inaccurate content display when loading virtual models with large spaces and complex structures.
The 3D model of map elements is broken down into skeleton lines and model components. Affine transformation parameters are used to perform coordinate transformation on the model components. By determining the binding relationship between the skeleton lines and model components, the affine transformation parameters are determined to achieve accurate positioning and display of map elements in map space.
It improves the loading speed and display accuracy of map elements, reduces the amount of parameter calculation, and enhances the positional and dimensional accuracy of map elements in map space.
Smart Images

Figure CN122115807A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, and specifically relates to a method for displaying map elements, a device for displaying map elements, a computer-readable medium, an electronic device, and a computer program product. Background Technology
[0002] Map modeling is the process of converting geospatial data into digital image models using computer graphics and geographic information system (GIS) technologies. It has wide applications in fields such as digital city construction, public security geographic information systems, and high-precision map data production.
[0003] For various types of map elements, such as roads, bridges, buildings and other fixed structures, a complete virtual model is usually built based on pre-collected geographic data. Then, when loading and displaying the basic map content, the virtual model of the map element is loaded synchronously.
[0004] For virtual models with large spaces and complex structures, the loading process requires a lot of communication and computing resources, which can easily lead to problems such as slow map loading speed and inaccurate display content. Summary of the Invention
[0005] This application provides a method for displaying map elements, a device for displaying map elements, a computer-readable medium, an electronic device, and a computer program product, with the aim of improving the loading speed and display accuracy of map content.
[0006] According to one aspect of the embodiments of this application, a method for displaying map elements is provided. The method includes: obtaining a three-dimensional model of a map element established in a modeling space, the three-dimensional model of the map element including skeleton lines for representing a main framework and model components bound to the skeleton lines; obtaining affine transformation parameters for mapping the skeleton lines from the modeling space to the map space; and performing coordinate transformation on the model components according to the affine transformation parameters to obtain a map element for display in the map space.
[0007] According to one aspect of the embodiments of this application, a map element display device is provided, the device comprising:
[0008] The model acquisition module is configured to acquire a 3D model of a map element established in the modeling space, wherein the 3D model of the map element includes skeleton lines for representing the main framework and model components bound to the skeleton lines.
[0009] The parameter acquisition module is configured to acquire affine transformation parameters for mapping the skeleton lines from the modeling space to the map space;
[0010] The coordinate transformation module is configured to perform coordinate transformation on the model component according to the affine transformation parameters to obtain map elements for display in the map space.
[0011] In some embodiments of this application, based on the above technical solutions, the parameter acquisition module includes:
[0012] The region identification module is configured to identify the target region in the map space for placing the map element;
[0013] The positioning modeling module is configured to establish an element positioning model corresponding to the target region in the modeling space.
[0014] The state adjustment module is configured to adjust the skeleton lines from an initial state to a target state that matches the element positioning model.
[0015] The parameter determination module is configured to determine the affine transformation parameters for mapping the skeleton lines from the modeling space to the map space based on the mapping relationship between the initial state and the target state.
[0016] In some embodiments of this application, based on the above technical solutions, the state adjustment module includes:
[0017] The local graphic selection module is configured to select local graphics from the skeleton lines for driving state adjustment;
[0018] The local graphic adjustment module is configured to adjust the local graphic from an initial state to a target state that matches the element positioning model;
[0019] Other graphic adjustment modules are configured to adjust other graphics in the skeleton lines, excluding the local graphics, according to preset node constraints. The node constraints are used to represent the constraint relationships between related nodes in the skeleton lines.
[0020] In some embodiments of this application, based on the above technical solutions, the local graphic selection module includes:
[0021] The line region selection module is configured to select an adaptive line region from the skeleton lines that matches the position of the element positioning model;
[0022] The graphic type determination module is configured to determine the graphic type used to drive the skeleton line adjustment state based on the matching relationship between the adaptation line area and the element positioning model. The graphic type includes at least one of adaptation point, adaptation line, and adaptation line pair.
[0023] The local graphic filtering module is configured to filter local graphics that match the graphic type from the adaptive line area.
[0024] In some embodiments of this application, based on the above technical solutions, the adapting line region is a closed region distributed in a two-dimensional plane, and the line region selection module is further configured to: obtain a two-dimensional plane for fitting the skeleton lines to the position of the element positioning model; select external lines located in the two-dimensional plane from the skeleton lines, and use the external lines as the region boundary to form an adapting line region that matches the position of the element positioning model.
[0025] In some embodiments of this application, based on the above technical solutions, the parameter determination module includes:
[0026] The center point acquisition module is configured to select two key feature points from the skeleton line to represent the skeleton line, and acquire the center point corresponding to the two key feature points, wherein the center point is the midpoint of the line segment connecting the two key feature points.
[0027] The coordinate acquisition module is configured to acquire the spatial position coordinates of the two key feature points and the center point in the initial state and the target state, respectively.
[0028] The parameter acquisition module is configured to acquire affine transformation parameters for transforming the spatial position coordinates from the initial state to the target state.
[0029] In some embodiments of this application, based on the above technical solutions, the affine transformation parameters include translation parameters for translating the graphic; the parameter acquisition module is further configured to: convert the spatial position coordinates of the center point from the three-dimensional spatial coordinate system of the modeling space to the geographic coordinate system to obtain the latitude and longitude coordinates of the center point; and acquire translation parameters for transforming the latitude and longitude coordinates of the center point from the initial state to the target state.
[0030] In some embodiments of this application, based on the above technical solutions, the affine transformation parameters include a three-dimensional rotation angle for rotating the graphic; the parameter acquisition module is further configured to: determine a center vector with the center point as the starting point based on the spatial position coordinates of the center point, the center vector having the same spatial orientation as the map element; and acquire a three-dimensional rotation angle for transforming the center vector from the initial state to the target state.
[0031] In some embodiments of this application, based on the above technical solutions, the affine transformation parameters include a scaling ratio for scaling the graphic; the parameter acquisition module is further configured to: determine a spatial vector pointing from one key feature point to another key feature point according to the spatial position coordinates; and acquire a scaling ratio for transforming the spatial vector from the initial state to the target state.
[0032] In some embodiments of this application, based on the above technical solutions, the model acquisition module is further configured to: acquire a view window for displaying map elements in the map space; determine the loading ratio of the map elements according to the window range of the view window; and acquire a three-dimensional model of the map elements established in the modeling space according to the loading ratio.
[0033] In some embodiments of this application, based on the above technical solutions, the apparatus further includes:
[0034] The thread creation module is configured to obtain the number of skeleton lines in the 3D model; and create multiple parallel threads based on the number of skeleton lines, wherein the parallel threads are used to calculate the radiation transformation parameters corresponding to each skeleton line in parallel.
[0035] According to one aspect of the embodiments of this application, a computer-readable medium is provided, on which a computer program is stored, which, when executed by a processor, implements the method for displaying map elements as described in the above technical solutions.
[0036] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions to implement the map element display method as described in the above technical solutions.
[0037] According to one aspect of the embodiments of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the method for displaying map elements as described in the above technical solutions.
[0038] In the technical solution provided in this application embodiment, by decomposing the 3D model of a map element into skeleton lines and model components, the skeleton lines can be used to determine the affine transformation parameters used to map the 3D model from the modeling space to the map space. Then, the coordinate transformation of the model components is performed according to the affine transformation parameters to obtain the map element used for display in the map space. Using the simple skeleton lines to determine the affine transformation parameters can reduce the amount of parameter calculation, improve the spatial transformation efficiency of the model, and thus improve the map loading speed. In addition, by utilizing the binding relationship between the skeleton lines and the model components, and performing coordinate transformation on each model component according to the affine transformation parameters, the positional accuracy and size accuracy of the map element in the map space can be improved, thereby improving the display accuracy of the map element.
[0039] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0041] Figure 1 An exemplary system architecture block diagram illustrating the application of the technical solution of this application is shown schematically.
[0042] Figure 2 A flowchart illustrating a method for displaying map elements according to one embodiment of this application is shown.
[0043] Figure 3 The skeleton line structure of a bridge model in an application scenario is shown.
[0044] Figure 4 The model component structure of a bridge model in an application scenario is shown.
[0045] Figure 5 This illustrates a component tree structure used in an application scenario to decompose a model component into other model components.
[0046] Figure 6 A flowchart for obtaining affine transformation parameters is shown in one embodiment of this application.
[0047] Figure 7 This illustration shows a schematic diagram illustrating the principle of model adaptation based on constraint relationships in an application scenario according to an embodiment of this application.
[0048] Figure 8 This document illustrates a flowchart of how the skeleton lines are matched to the element positioning model in an application scenario, according to an embodiment of this application.
[0049] Figure 9 The flowchart illustrating the calculation of affine transformation parameters in an application scenario according to an embodiment of this application is shown.
[0050] Figure 10 A schematic diagram of the structure of the map element display device provided in the embodiments of this application is shown.
[0051] Figure 11 A schematic diagram of a computer system architecture suitable for implementing the embodiments of this application is shown. Detailed Implementation
[0052] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0053] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0054] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0055] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0056] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0057] Figure 1 An exemplary system architecture block diagram illustrating the application of the technical solution of this application is shown schematically.
[0058] like Figure 1 As shown, the system architecture 100 may include terminal devices 110, a network 120, and a server 130. Terminal devices 110 may include various electronic devices such as smartphones, tablets, laptops, desktop computers, smart wearable devices, smart in-vehicle devices, and smart payment terminals. Server 130 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Network 120 may be a communication medium of various connection types capable of providing a communication link between terminal devices 110 and server 130, such as a wired or wireless communication link.
[0059] Depending on the implementation requirements, the system architecture in this application embodiment can have any number of terminal devices, networks, and servers. For example, server 130 can be a server group composed of multiple server devices. In addition, the technical solutions provided in this application embodiment can be applied to terminal device 110, or to server 130, or can be implemented jointly by terminal device 110 and server 130. This application does not impose any special limitations on this.
[0060] Taking the map element display method jointly executed by terminal device 110 and server 130 as an example, a user can send a request message to server 130 to display map elements by operating terminal device 110. After parsing the received request message, server 130 obtains the 3D model of the map element pre-generated in the modeling space, for example, it can... Figure 1 The bridge shown is modeled in 3D to obtain a virtual model of the bridge. Then, the server 130 returns the model data of the map elements to the terminal device 110. The terminal device 110 can render the 3D model of the map elements according to the received model data, and display the map space and the 3D models of the map elements distributed in the map space to the user through the interactive interface.
[0061] It should be noted that the embodiments of this application mainly use the display of map elements in a navigation map application as an example for illustration. However, in other application scenarios, map elements can also be displayed in applications that include map interface display requirements, such as games, social software, and instant messaging software. This application is not limited to this.
[0062] Taking the display of advanced road elements as an example, advanced road elements refer to complex elements in road design that have specific functions or structures, such as bridges, streetlights, and complex building blocks. In the related technologies of this application, map elements can be rendered and displayed in map applications based on semantic modeling protocols or overall model rendering technology.
[0063] The map element display scheme based on semantic modeling protocols mainly involves the design side providing models of advanced road elements. The data compilation side and the engine side understand and agree on the models, and then design a semantic modeling protocol based on the understood models (each advanced road element requires redesign). The data compilation side selects key points after the model fits the road according to the protocol and transmits them to the engine side. Finally, the engine side models the advanced road elements according to these points and the previously agreed modeling protocol. Because each advanced road element requires a redesigned semantic modeling protocol, the design and implementation complexity increases; the engine side needs to complete the modeling on the user side, increasing the computational cost of rendering and reducing rendering efficiency; furthermore, if the design changes, the modeling protocol needs to be redesigned and implemented, resulting in poor adaptability.
[0064] The scheme based on holistic model rendering involves the design team providing the overall model (the model must be treated as a whole and cannot be disassembled), and then the engine team directly rendering the corresponding advanced road elements on the specified map roads. For map elements with complex structures and large spatial dimensions, the transmission and rendering costs of the holistic model are high; when the road network changes, advanced road elements cannot perfectly fit the road surface; moreover, when rendering the map element model as a whole, stuttering often occurs, affecting map rendering efficiency.
[0065] To address the problems existing in the aforementioned related technologies, this application provides a technical solution for displaying map elements in map space based on assembly modeling. Assembly modeling refers to a method of creating complex structures or objects by combining predefined model components. The following detailed description, in conjunction with specific embodiments, provides a detailed explanation of the technical solutions provided in this application, including the map element display method, map element display device, computer-readable medium, electronic device, and computer program product.
[0066] Figure 2 A flowchart illustrating a method for displaying map elements according to one embodiment of this application is shown. This method for displaying map elements can be performed by… Figure 1The method can be executed by the terminal device or the server, or jointly by both. This application uses a method for displaying map elements executed by a terminal device as an example for illustration. Figure 2 As shown, the method for displaying the map element includes the following steps S210 to S230.
[0067] S210: Obtain the 3D model of the map element created in the modeling space. The 3D model of the map element includes the skeleton lines used to represent the main framework and the model components bound to the skeleton lines.
[0068] S220: Obtain the affine transformation parameters used to map the skeleton lines from modeling space to map space.
[0069] S230: Perform coordinate transformation on the model components according to the affine transformation parameters to obtain map elements for display in map space.
[0070] In the technical solution provided in this application embodiment, by decomposing the 3D model of a map element into skeleton lines and model components, the skeleton lines can be used to determine the affine transformation parameters used to map the 3D model from the modeling space to the map space. Then, the coordinate transformation of the model components is performed according to the affine transformation parameters to obtain the map element used for display in the map space. Using the simple skeleton lines to determine the affine transformation parameters can reduce the amount of parameter calculation, improve the spatial transformation efficiency of the model, and thus improve the map loading speed. In addition, by utilizing the binding relationship between the skeleton lines and the model components, and performing coordinate transformation on each model component according to the affine transformation parameters, the positional accuracy and size accuracy of the map element in the map space can be improved, thereby improving the display accuracy of the map element.
[0071] The following section provides a detailed explanation of the specific implementation methods for each step in the map element display process, using specific application scenarios as examples.
[0072] In step S210, a three-dimensional model of a map element established in the modeling space is obtained. The three-dimensional model of the map element includes skeleton lines for representing the main framework and model components bound to the skeleton lines.
[0073] A modeling space is a virtual 3D environment used to create, edit, and manipulate 3D models. This space can be viewed as a container holding all the elements used to build a 3D scene, such as buildings, terrain, and vegetation. Modeling spaces are typically implemented using a 3D coordinate system, allowing objects to be positioned and manipulated in three dimensions (X, Y, Z). Within the modeling space, complex 3D shapes and structures can be created using geometric modeling techniques, such as polygon meshes, surface modeling, and solid modeling. In addition to geometry, modeling spaces allow the application of textures and materials to enhance the visual realism of the models. Lighting effects, including ambient light, directional light, and point light sources, can be simulated in the modeling space, along with their effects on the model, such as shadows and highlights. Users can interact with 3D models in the modeling space, performing actions such as rotation, scaling, and translation. 3D models created in the modeling space can be converted into 2D images through a rendering process for display on screen or printing.
[0074] The 3D model of the map element in this embodiment includes skeleton lines representing the main framework and model components bound to the skeleton lines. The skeleton lines are lines used to describe the basic shape and structure of the map element, and the model components are local area models formed after structurally decomposing the map element. The model components and skeleton lines have a one-to-one binding relationship.
[0075] Taking a three-dimensional model of a cable-stayed bridge as an example, Figure 3 The diagram illustrates the skeletal structure of a bridge model in an application scenario. For example... Figure 3 As shown, designers can use design tools to create models of map elements and their skeleton lines, and export them in a standard format. Each important component in the main framework can be represented as a corresponding skeleton line.
[0076] by Figure 3 Taking the bridge model in the example, the skeleton lines that make up the main frame of the bridge model are shown in Table 1.
[0077] Table 1
[0078]
[0079]
[0080] Figure 4 The model component structure of a bridge model in an application scenario is shown. For example... Figure 4 As shown, for each skeleton line in the main frame, a corresponding model component can be bound, such as the cable tower beam, cable tower column, cable steel bar, etc. shown in the figure.
[0081] In one embodiment of this application, designers can decompose complex map elements into multiple model components and store and manage each component independently.
[0082] Figure 5 This illustrates a component tree structure used in an application scenario to decompose model components into model components. For example... Figure 5 As shown, the component tree can include a model layer, a semantic structure layer, and a component structure layer arranged sequentially from top to bottom. The model layer can include the bridge deck, piers, and supporting structures. In the semantic structure layer, the bridge deck can be further divided into road surface, guardrails, and fences. In the component structure layer, the road surface can be represented as a strip surface structure, the guardrails as the main structure, and the fences as a pipeline structure.
[0083] The skeleton lines provided by the design team form the basic structure of map elements. The generation of these skeleton lines must adhere to a standard format and strictly match the framework structure of the map elements. The design team can adjust the skeleton lines using interactive tools to ensure they meet practical requirements. In a real production environment, the skeleton lines and individual model components can be stored separately and assembled into a complete 3D model when needed.
[0084] In step S220, affine transformation parameters for mapping skeleton lines from modeling space to map space are obtained.
[0085] Affine transformation parameters are a set of mathematical parameters used to perform affine transformations on graphics in two-dimensional or three-dimensional space. An affine transformation is a linear transformation that preserves the relative position and angles between points, lines, and planes; it includes operations such as translation, rotation, scaling, and shearing. In 3D modeling and computer graphics, affine transformation parameters are crucial for achieving accurate positioning and transformation of objects in space.
[0086] Affine transformation parameters can include one or more of the following components.
[0087] Translation: The translation parameter specifies the distance an object moves in space along the X, Y, and Z axes.
[0088] Rotation: The rotation parameter defines the rotation angle of the object around the X, Y, and Z axes. These angles can be expressed as Euler angles (rotation around the three axes) or quaternions can be used to avoid gimbal lock issues.
[0089] Scaling: The scaling parameter determines the scaling ratio of an object on the X, Y, and Z axes.
[0090] Shear: The shear parameter allows an object to be tilted in one direction relative to another, which is useful for certain visual effects.
[0091] In two-dimensional space, an affine transformation can be represented by a 3x3 matrix, while in three-dimensional space, a 4x4 matrix is used. These matrices contain the transformation parameters and can be applied to each point of the object using matrix multiplication.
[0092] Figure 6 A flowchart illustrating the acquisition of affine transformation parameters is shown in one embodiment of this application. For example... Figure 6 As shown, based on the above embodiments, step S220 may further include the following steps S221 to S224.
[0093] S221: Identify the target area in the map space for placing map elements.
[0094] S222: Establish an element location model in the modeling space that corresponds to the target region.
[0095] S223: Adjust the skeleton lines from their initial state to the target state that matches the element positioning model.
[0096] S224: Determine the affine transformation parameters used to map the skeleton lines from the modeling space to the map space based on the mapping relationship between the initial state and the target state.
[0097] Taking a bridge model as an example, the target area for placing the bridge is identified in the map space. This target area may include the road boundary areas connecting the two ends of the bridge. Based on these road boundary areas, a corresponding road model is created in the modeling space. By fitting the bridge model and the road model together, a complete map display can be formed.
[0098] In one embodiment of this application, during the process of displaying the map interface, the terminal device can send the map display area to the server in real time, and then calculate the affine transformation parameters for spatial mapping on the server.
[0099] This application embodiment achieves precise adjustment of skeleton lines from their initial state to the target state by accurately identifying target areas in map space and establishing corresponding element positioning models in modeling space. By determining the mapping relationship between the initial state and the target state of the skeleton lines, this application embodiment can calculate the necessary affine transformation parameters, thereby achieving efficient and accurate mapping from modeling space to map space. This not only improves the accuracy of map element placement but also enhances the usability and reliability of map data.
[0100] In one embodiment of this application, adjusting the skeleton lines from an initial state to a target state that matches the element positioning model may further include: selecting local graphics from the skeleton lines to drive the state adjustment; adjusting the local graphics from an initial state to a target state that matches the element positioning model; and adjusting other graphics in the skeleton lines, excluding the local graphics, according to preset node constraints, wherein the node constraints are used to represent the constraint relationships between related nodes in the skeleton lines.
[0101] This application embodiment achieves precise matching and optimization of the entire skeleton line by carefully selecting and adjusting local graphics within the skeleton line to the target state, and by simultaneously adjusting other parts of the skeleton line according to preset node constraints. This embodiment not only improves the flexibility and accuracy of skeleton line adjustment but also ensures the geometric relationships and spatial constraints between nodes within the skeleton line. This maintains overall structural stability while achieving efficient alignment with the element positioning model, which is crucial for the accurate construction of complex 3D models and the precise placement of map elements.
[0102] In one embodiment of this application, selecting a local graphic from the skeleton lines for driving state adjustment may further include: selecting an adaptation line region from the skeleton lines that matches the position of the element positioning model; determining the graphic type for driving the skeleton lines to adjust state based on the matching relationship between the adaptation line region and the element positioning model, wherein the graphic type includes at least one of adaptation point, adaptation line, and adaptation line pair; and filtering local graphics that conform to the graphic type from the adaptation line region.
[0103] Taking the adaptation relationship between a bridge model and a road model as an example, selecting an adaptation line region from the skeleton lines of the bridge model that matches the position of the road model can be represented as aligning the base of the bridge model with the road boundary of the road model. During this alignment process, the skeleton lines of the bridge model are adjusted according to node constraints. The adaptation point can include, for example, the base vertex of the bridge model; the adaptation line can include, for example, a bridge surface boundary in the bridge model that aligns with the road boundary; and the adaptation line pair can include, for example, two parallel bridge surface boundaries in the bridge model that align with the road boundary.
[0104] This application embodiment achieves refined selection and adjustment of local graphics by precisely selecting matching line regions from the skeleton lines that match the element positioning model, and accordingly determining the specific graphic type (fitting point, fitting line, or fitting line pair) driving the skeleton line state adjustment. This method not only improves the targeting and efficiency of skeleton line adjustment, but also ensures precise alignment between the skeleton lines and the element positioning model, thereby optimizing the overall model's geometric structure and spatial relationships. It has significant beneficial effects on improving the accuracy of 3D modeling and the precise placement of map elements.
[0105] In one embodiment of this application, the adapting line region is a closed region distributed in a two-dimensional plane. Selecting an adapting line region that matches the position of the element positioning model from the skeleton lines may further include: obtaining a two-dimensional plane for fitting the skeleton lines to the position of the element positioning model; selecting an outer line located in the two-dimensional plane from the skeleton lines, and using the outer line as the region boundary to form an adapting line region that matches the position of the element positioning model.
[0106] This application reduces the dimensionality of three-dimensional space to two-dimensional space. By obtaining a two-dimensional plane that fits the position of the element positioning model, and precisely selecting external lines located within this plane from the skeleton lines, the matching line region that matches the element positioning model is effectively defined. This application not only improves the fit between the skeleton lines and the positioning model, but also enhances the accuracy of model construction and spatial positioning by clearly defining the region boundaries.
[0107] Figure 7 This illustration shows a schematic diagram illustrating the principle of model adaptation based on constraint relationships in an application scenario according to an embodiment of this application. For example... Figure 7 As shown, the process of fitting the skeleton lines of a bridge model to the road boundary can include: obtaining all nodes of the model and the constraint relationships between nodes based on the skeleton line file; generating a road-fitting event based on the road boundary (the coordinates of the road boundary need to be transformed to be consistent with the coordinate system of the skeleton lines); the road-fitting event will drive the road-related fitting points on the skeleton lines to change their positions; the change of fitting points will trigger relevant constraints; different constraint conditions will cause the follower points to change synchronously; at the same time, the follower points will also trigger relevant constraints, causing other points to change as well; finally, all points on the skeleton lines are fitted to the road boundary.
[0108] Constraints used to trigger relevant point constraints may include, for example, rigid constraints, soft constraints, and zero-height constraints.
[0109] Rigid constraints are constraints that must be strictly satisfied under all circumstances. These constraints cannot be violated in the solution to a problem; otherwise, the solution will be considered infeasible or invalid. Rigid constraints are often used to define the validity or legality of a solution. For example, a rigid constraint can be defined as the relative positions of nodes and elements within a rigid body region remaining constant, while the region undergoes rigid body displacement following a specified reference point.
[0110] Flexible constraints are those constraints that can be satisfied as much as possible but are not mandatory. Unlike rigid constraints, soft constraints allow for some degree of violation. The purpose of soft constraints is to make the solution as close as possible to the ideal state without violating rigid constraints. Soft constraints are typically used to specify default values and distributions for random variables. When they conflict with other constraints, soft constraints can be overridden by other hard constraints or soft constraints with higher priority, thus providing greater flexibility.
[0111] Zero height constraint is applied in the positional alignment event between the skeleton lines and the element positioning model to constrain the height relationship between the position points. For example, when the positions are aligned, the height difference should always remain zero.
[0112] Figure 8 This diagram illustrates a flowchart of how the skeleton lines are matched to the element positioning model in an application scenario, according to an embodiment of this application. For example... Figure 8 As shown, the process of matching the bridge's skeleton lines with the road model, which is used to place the bridge, as the element positioning model includes the following steps.
[0113] S801: Obtain road boundaries.
[0114] The road boundary includes a boundary in the road's extension direction and a boundary in the road's width direction. The boundary in the road's extension direction corresponds to the length of the bridge model and may include, for example, a starting point and an ending point for placing the bridge model. The boundary in the road's width direction corresponds to the width of the bridge and may include, for example, two road edge lines that respectively align with the two sides of the bridge.
[0115] S802: Establish a Cartesian orthogonal coordinate system and convert the road boundary into coordinate points.
[0116] Transform all points on the road boundary into a standard Cartesian coordinate system to obtain their corresponding coordinates.
[0117] S803: Determine whether the road boundary meets the conditions for generating a bridge model.
[0118] In the road model, check whether the road boundaries meet the conditions for building the bridge model, such as the absence of illegal geometries. If the conditions are met, continue to step S804. If the conditions are not met, the modeling is deemed a failure, and the modeling process ends.
[0119] S804: Obtain skeleton line data.
[0120] Obtain the skeleton line data contained in the bridge model. The skeleton line data includes several lines that make up the main frame of the bridge. Each line is connected by several key nodes. Key nodes can include the endpoints of the lines and the connection points between the lines.
[0121] S805: Construct constraints between nodes and create a constraint system.
[0122] In finite element analysis, constraints between model nodes are methods used to limit or couple the degrees of freedom of different nodes in the model in order to simulate actual physical connections or contact conditions. These constraints ensure that the bridge model conforms to actual structural changes during its fitting with the road model. By constructing constraints between nodes, a complete constraint system for the bridge model can be formed.
[0123] Constraints may include, for example Figure 7 The constraints shown include rigid constraints, flexible constraints, and zero-height constraints. Additionally, different types of conditions can be included, such as tie constraints, multi-point constraints (MPC), and coupling constraints.
[0124] Binding constraints allow two faces or regions in a model to be firmly bonded together and not separated during analysis. The two bound faces can have different geometries and meshes. Binding constraints can define complete constraint behavior, permanently binding surfaces together and facilitating mesh transitions.
[0125] Multi-point constraints are used to describe the relationships between multiple displacement degrees of freedom. They can simulate rigid connections between nodes or specify linear combinations of nodal displacements. Multi-point constraints can be used to describe very rigid structural elements or to transfer loads between different types of elements.
[0126] Coupling constraints are used to establish constraints between a region of the model and a reference point. There are two types: motion coupling and distributed coupling. Motion coupling welds the entire constrained region and the control point together, making the constrained region rigid; while distributed coupling allows relative deformation between parts of the constrained region, making it more flexible than the surfaces in motion coupling. S806: Creates a positional fit event.
[0127] By creating a position-fit event, the skeleton lines can be fitted to the position of the element's positioning model, allowing the bridge model to be placed at a specified location on the road model. Position-fit events can include, for example... Figure 7 The events shown are point adaptation events, line adaptation events, or line pair adaptation events.
[0128] S807: Execute a positional fit event in the constraint system.
[0129] When the position-fitting event is executed, some nodes in the skeleton lines will fit with the position of the element positioning model and change their position, while other nodes will move under the control of constraints, and finally the position adjustment of all nodes will be completed.
[0130] S808: Determine whether all positional alignment events have been completed.
[0131] If all positional alignment events have been completed, proceed to step S809. If there are still positional alignment events that have not been completed, return to step S807 and continue executing the unfinished positional alignment events in the constraint system.
[0132] S809: Determine if there are any unadjusted position points.
[0133] If all position points in the skeleton lines have been adjusted, the position adaptation process between the skeleton lines and the element positioning model ends. If there are still unadjusted position points in the skeleton lines, the position adaptation fails. Based on the reason for the failure, new position matching events and constraints can be added.
[0134] Taking the adjustment of the positions of two endpoints in a skeleton line as an example, the specific position adjustment process includes the following steps S8071 to S8074.
[0135] S8071: Establish coordinate system CS2 on the element positioning model.
[0136] In applications where the framework lines of a bridge model are fitted to a road model, the road surface of the road model can be used as a coordinate plane to establish a corresponding coordinate system.
[0137] S8072: Determine if there are any constraints that have not yet been executed.
[0138] A positional alignment event can trigger one or more constraints. For the currently executing positional alignment event, if there are still constraints that have not yet been executed, then proceed to step S8073. If all constraints have been executed, then the position adjustment process in the current positional alignment event ends.
[0139] S8073: Trigger execution constraints.
[0140] By triggering the execution of the corresponding constraints, the position adjustment result of one endpoint (i.e., the position fitting point) of the skeleton line can be used to control the other endpoint (i.e., the follower point) to move and change the coordinate value.
[0141] S8074: Determine whether the other endpoint changes synchronously.
[0142] Based on the constraints, determine whether the other endpoint of the skeleton line has changed position synchronously. If the other endpoint has completed the synchronous change, the position adjustment process of the skeleton line ends. If the other endpoint has not completed the synchronous change, return to step S8072 and continue to execute other constraints.
[0143] Taking a rigid constraint condition containing two point objects as an example, the execution of the rigid constraint condition in step S8073 may further include the following steps S80731 to S80739.
[0144] S80731: Get the two point objects P1 and P2 of the constraint, and the original point coordinates O1 and O2 of the point objects.
[0145] S80732: Calculate the direction vector V1 by subtracting O2 from O1.
[0146] S80733: Obtain the forward direction of the road where the original point O1 is located, and establish coordinate system CS1.
[0147] S80734: Calculate the coordinate components (part) of the direction vector V1 on the three coordinate axes of the coordinate system CS1.
[0148] S80735: Get the changepoint corresponding to the point object P1 that triggered the rigid constraint.
[0149] S80736: Get the coordinates of the changepoint in coordinate system CS2.
[0150] S80737: Calculate the direction vector V2 in coordinate system CS2 based on the coordinate component part.
[0151] S80738: The target point is obtained by adding the direction vector V2 to the coordinates of the change point changePoint.
[0152] S80739: Triggers the P2 object to change to the position of the target point.
[0153] By utilizing the constraints between nodes, the follower points can be triggered to change their positions along with the position-fitting points, ultimately fitting all points on the skeleton line onto the road, thus achieving positional fitting between the bridge model and the road model.
[0154] In one embodiment of this application, determining the affine transformation parameters for mapping the skeleton lines from the modeling space to the map space based on the mapping relationship between the initial state and the target state may further include: selecting two key feature points from the skeleton lines to represent the skeleton lines, and obtaining the center point corresponding to the two key feature points, wherein the center point is the midpoint of the line segment connecting the two key feature points; obtaining the spatial position coordinates of the two key feature points and the center point in the initial state and the target state, respectively; and obtaining the affine transformation parameters for transforming the spatial position coordinates from the initial state to the target state.
[0155] This application's embodiments achieve precise spatial transformation from the initial state to the target state by accurately selecting and analyzing the spatial coordinates of two key feature points and their center point on the skeleton lines. By obtaining the coordinates of these key points in different states and calculating the corresponding affine transformation parameters, this scheme can ensure the accurate adjustment and alignment of the skeleton lines. This has a significant beneficial effect on improving the construction accuracy of the 3D model and the spatial positioning accuracy of map elements, while also enhancing the geometric stability and spatial consistency of the model.
[0156] Figure 9 The flowchart illustrating the calculation of affine transformation parameters in an application scenario according to an embodiment of this application is shown. In this application scenario, the affine transformation parameters include information such as translation, rotation, and scaling, which can describe the position and orientation of high-level road elements relative to the road. The map engine, through the received affine transformation parameters, quickly locates and renders high-level road elements, avoiding a complex real-time modeling process.
[0157] like Figure 9 As shown, the process of calculating affine transformation parameters based on key feature points of skeleton lines includes the following steps.
[0158] S910: Select two key feature points from the skeleton lines to represent the skeleton lines, and obtain the center point corresponding to the two key feature points. The center point is the midpoint of the line segment connecting the two key feature points.
[0159] For example, take the two endpoints A and B of a skeleton line as key feature points, and take the midpoint C of the line connecting the two endpoints as the center point.
[0160] S920: Obtain the spatial coordinates of two key feature points and the center point in the initial state and the target state, respectively.
[0161] In the initial state, the spatial coordinates of two key feature points are obtained as A1 and B1, and the spatial coordinates of the center point are obtained as C1.
[0162] Under the target state, the spatial coordinates of two key feature points are obtained as A2 and B2, and the spatial coordinates of the center point are obtained as C2.
[0163] In one embodiment of this application, the affine transformation parameters include translation parameters for translating the graphic. The method for calculating the translation parameters includes the following steps S931 to S932.
[0164] S931: Transform the spatial coordinates of the center point from the three-dimensional spatial coordinate system of the modeling space to the geographic coordinate system to obtain the latitude and longitude coordinates of the center point.
[0165] The spatial coordinates C1 of the center point in the initial state and C2 of the center point in the target state are both transformed from the three-dimensional spatial coordinate system of the modeling space to the geographic coordinate system to obtain the latitude and longitude coordinates of the center point.
[0166] S932: Obtain the translation parameters used to transform the latitude and longitude coordinates of the center point from the initial state to the target state.
[0167] Subtracting C1 from the latitude and longitude coordinates C2 yields the translation parameter T for the pixel coordinates.
[0168] In one embodiment of this application, the affine transformation parameters include a three-dimensional rotation angle for rotating the graphic. The method for calculating the three-dimensional rotation angle includes the following steps S941 to S942.
[0169] S941: Determine the center vector starting from the center point based on the spatial coordinates of the center point. The center vector has the same spatial orientation as the map element.
[0170] Calculate the forward direction vectors V1 and V2 of the roads where C1 and C2 are located, respectively.
[0171] S942: Obtain the three-dimensional rotation angle used to transform the center vector from the initial state to the target state.
[0172] Calculate the three-dimensional rotation angle R between V1 and V2.
[0173] In one embodiment of this application, the affine transformation parameters include a scaling factor for scaling the graphic. The method for calculating the scaling factor includes the following steps S951 to S952.
[0174] S951: Determine the spatial vector pointing from one key feature point to another based on the spatial coordinates.
[0175] In the initial state, calculate the vector VP1 from A1 to B1.
[0176] Under the target state, calculate the vector VP2 from A2 to B2.
[0177] S952: Obtain the scaling factor used to transform the space vector from the initial state to the target state.
[0178] The scaling factor S is calculated based on the ratios of VP2 and VP1 in the three dimensions.
[0179] After the above affine transformation parameter calculation steps, the translation parameter T, the three-dimensional rotation angle R, and the scaling factor S are obtained.
[0180] Based on the above application scenarios, it can be seen that in this embodiment, after modeling is completed by the data compilation side, the affine transformation parameters of advanced road elements are calculated. In order to improve the calculation performance of the engine, the translation parameters are finally calculated in latitude and longitude coordinates, and the rotation and scaling parameters are calculated in the Cartesian orthogonal coordinate system.
[0181] In one embodiment of this application, obtaining a 3D model of a map element established in a modeling space includes: obtaining a view window for displaying the map element in the map space; determining the loading ratio of the map element based on the window extent of the view window; and obtaining the 3D model of the map element established in the modeling space based on the loading ratio.
[0182] This application uses dynamic loading technology to dynamically load and unload model parts according to the viewport range, thereby reducing initial loading time and memory usage.
[0183] In one embodiment of this application, before obtaining the affine transformation parameters for mapping skeleton lines from modeling space to map space, the number of skeleton lines in the 3D model can be obtained first, and then multiple parallel threads can be created based on the number of skeleton lines. The parallel threads are used to calculate the affine transformation parameters corresponding to each skeleton line in parallel.
[0184] The embodiments of this application employ multi-threaded parallel processing technology on the data compilation side to further improve data processing speed and efficiency.
[0185] As can be seen from the above description of embodiments and application scenarios, the embodiments of this application employ computational geometry and mathematical methods for map element display processing. Applying this method can simultaneously balance the computational complexity and accuracy in the map element display process, contributing to more efficient map design and analysis, and improving the efficiency of map planning and management.
[0186] In the technical solutions provided in the embodiments of this application, the product side mainly involves the collaborative work of the design side, the data compilation side, and the map engine side.
[0187] Design team responsible for:
[0188] 1) Provides models and skeleton lines for advanced road elements. Advanced road elements include bridges, streetlights, complex building blocks, etc.
[0189] 2) The design side can break down complex advanced road elements into different model components and provide corresponding skeleton lines. The skeleton lines define the basic structure and path of the advanced road elements.
[0190] 3) The design team can flexibly adjust the skeleton lines and model components according to requirements. The changes will take effect as soon as the skeleton diagram and the corresponding model are modified. This enables daily data updates.
[0191] The modular modeling approach allows designers to break down complex, high-level road elements (such as bridges, streetlights, and complex building blocks) into different basic model components and provide corresponding skeleton lines. This method improves the reusability and maintainability of the model while reducing the difficulty of creating complex models.
[0192] By splitting advanced road elements into skeleton lines and models, flexible adjustments are achieved on the design side. The design side can independently control the skeleton lines and models, arbitrarily decompose large models into multiple components, and make changes effective simply by modifying the skeleton diagram and the corresponding models, without needing to reprocess the entire map data.
[0193] The data compilation side is responsible for:
[0194] 1) Responsible for the road alignment of the skeleton lines, that is, matching and adjusting the skeleton lines with the actual road data to ensure that advanced road elements can accurately align with the road.
[0195] 2) Model based on component models, and assemble the various model components into complete advanced road elements.
[0196] 3) Compress the data to optimize data transmission efficiency.
[0197] 4) Pass the completed advanced road elements to the map engine as affine transformation parameters to reduce the modeling cost on the engine side and improve rendering efficiency.
[0198] The data compilation side is responsible for fitting the skeleton lines to the road network and modeling based on the component models. Furthermore, the data compilation side compresses the generated models to reduce storage and transmission costs. The compiled data is then passed to the map engine in the form of affine transformation parameters, reducing the modeling burden on the engine and improving rendering efficiency.
[0199] The map engine side is responsible for:
[0200] 1) Responsible for rendering advanced road elements. It renders advanced road elements quickly and efficiently using the received affine transformation parameters.
[0201] 2) Since the data compilation side has completed most of the modeling work, the rendering burden on the map engine side is greatly reduced, thereby improving rendering efficiency.
[0202] The map engine receives optimized model data after data compilation and processing, and quickly renders advanced road elements using affine transformation parameters. This method significantly improves the rendering performance of the map engine, providing users with a smoother and more realistic navigation experience.
[0203] The solution provided in this application is not only applicable to specific high-level road elements, but can also be adapted to any road element that can be decomposed into skeleton lines and models. This makes the solution widely applicable and scalable, capable of meeting road design needs in different scenarios.
[0204] By separating the skeleton lines and the model, advanced road elements of the same type can reuse the same skeleton lines and models, avoiding repetitive modeling work. Model information is passed through affine transformation parameters, reducing data volume and lowering network transmission and storage costs. Modifications on the design side are reflected in real time on the data compilation and map engine sides, enabling daily updates and rendering of advanced road elements.
[0205] In summary, the embodiments of this application, through an innovative modeling and rendering process, achieve flexible adjustment, efficient rendering, and broad adaptability of advanced road elements, providing an efficient, convenient, and low-cost solution for the field of road design.
[0206] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0207] The following describes an embodiment of the apparatus described in this application, which can be used to execute the map element display method in the above embodiments of this application. Figure 10 A schematic diagram illustrating the structure of a map element display device provided in an embodiment of this application is shown. Figure 10 As shown, the map element display device 1000 includes:
[0208] The model acquisition module 1010 is configured to acquire a three-dimensional model of a map element established in a modeling space, wherein the three-dimensional model of the map element includes skeleton lines for representing the main framework and model components bound to the skeleton lines.
[0209] The parameter acquisition module 1020 is configured to acquire affine transformation parameters for mapping the skeleton lines from the modeling space to the map space;
[0210] The coordinate transformation module 1030 is configured to perform coordinate transformation on the model component according to the affine transformation parameters to obtain map elements for display in the map space.
[0211] In some embodiments of this application, based on the above technical solutions, the parameter acquisition module includes:
[0212] The region identification module is configured to identify the target region in the map space for placing the map element;
[0213] The positioning modeling module is configured to establish an element positioning model corresponding to the target region in the modeling space.
[0214] The state adjustment module is configured to adjust the skeleton lines from an initial state to a target state that matches the element positioning model.
[0215] The parameter determination module is configured to determine the affine transformation parameters for mapping the skeleton lines from the modeling space to the map space based on the mapping relationship between the initial state and the target state.
[0216] In some embodiments of this application, based on the above technical solutions, the state adjustment module includes:
[0217] The local graphic selection module is configured to select local graphics from the skeleton lines for driving state adjustment;
[0218] The local graphic adjustment module is configured to adjust the local graphic from an initial state to a target state that matches the element positioning model;
[0219] Other graphic adjustment modules are configured to adjust other graphics in the skeleton lines, excluding the local graphics, according to preset node constraints. The node constraints are used to represent the constraint relationships between related nodes in the skeleton lines.
[0220] In some embodiments of this application, based on the above technical solutions, the local graphic selection module includes:
[0221] The line region selection module is configured to select an adaptive line region from the skeleton lines that matches the position of the element positioning model;
[0222] The graphic type determination module is configured to determine the graphic type used to drive the skeleton line adjustment state based on the matching relationship between the adaptation line area and the element positioning model. The graphic type includes at least one of adaptation point, adaptation line, and adaptation line pair.
[0223] The local graphic filtering module is configured to filter local graphics that match the graphic type from the adaptive line area.
[0224] In some embodiments of this application, based on the above technical solutions, the adapting line region is a closed region distributed in a two-dimensional plane, and the line region selection module is further configured to: obtain a two-dimensional plane for fitting the skeleton lines to the position of the element positioning model; select external lines located in the two-dimensional plane from the skeleton lines, and use the external lines as the region boundary to form an adapting line region that matches the position of the element positioning model.
[0225] In some embodiments of this application, based on the above technical solutions, the parameter determination module includes:
[0226] The center point acquisition module is configured to select two key feature points from the skeleton line to represent the skeleton line, and acquire the center point corresponding to the two key feature points, wherein the center point is the midpoint of the line segment connecting the two key feature points.
[0227] The coordinate acquisition module is configured to acquire the spatial position coordinates of the two key feature points and the center point in the initial state and the target state, respectively.
[0228] The parameter acquisition module is configured to acquire affine transformation parameters for transforming the spatial position coordinates from the initial state to the target state.
[0229] In some embodiments of this application, based on the above technical solutions, the affine transformation parameters include translation parameters for translating the graphic; the parameter acquisition module is further configured to: convert the spatial position coordinates of the center point from the three-dimensional spatial coordinate system of the modeling space to the geographic coordinate system to obtain the latitude and longitude coordinates of the center point; and acquire translation parameters for transforming the latitude and longitude coordinates of the center point from the initial state to the target state.
[0230] In some embodiments of this application, based on the above technical solutions, the affine transformation parameters include a three-dimensional rotation angle for rotating the graphic; the parameter acquisition module is further configured to: determine a center vector with the center point as the starting point based on the spatial position coordinates of the center point, the center vector having the same spatial orientation as the map element; and acquire a three-dimensional rotation angle for transforming the center vector from the initial state to the target state.
[0231] In some embodiments of this application, based on the above technical solutions, the affine transformation parameters include a scaling ratio for scaling the graphic; the parameter acquisition module is further configured to: determine a spatial vector pointing from one key feature point to another key feature point according to the spatial position coordinates; and acquire a scaling ratio for transforming the spatial vector from the initial state to the target state.
[0232] In some embodiments of this application, based on the above technical solutions, the model acquisition module is further configured to: acquire a view window for displaying map elements in the map space; determine the loading ratio of the map elements according to the window range of the view window; and acquire a three-dimensional model of the map elements established in the modeling space according to the loading ratio.
[0233] In some embodiments of this application, based on the above technical solutions, the apparatus further includes:
[0234] The thread creation module is configured to obtain the number of skeleton lines in the 3D model; and create multiple parallel threads based on the number of skeleton lines, wherein the parallel threads are used to calculate the radiation transformation parameters corresponding to each skeleton line in parallel.
[0235] The specific details of the map element display device provided in the various embodiments of this application have been described in detail in the corresponding method embodiments, and will not be repeated here.
[0236] Figure 11 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.
[0237] It should be noted that, Figure 11 The computer system 1100 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0238] like Figure 11As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1102 or programs loaded from storage section 1108 into random access memory (RAM). The RAM 1103 also stores various programs and data required for system operation. The CPU 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output interface 1105 (I / O interface) is also connected to the bus 1104.
[0239] The following components are connected to the input / output interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a local area network card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the input / output interface 1105 as needed. Removable media 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on the drive 1110 as needed so that computer programs read from them can be installed into the storage section 1108 as needed.
[0240] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable medium 1111. When the computer program is executed by central processing unit 1101, it performs various functions defined in the system of this application.
[0241] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0242] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0243] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0244] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.
[0245] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0246] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for displaying map elements, characterized in that, The method includes: Obtain a 3D model of a map element created in a modeling space, wherein the 3D model of the map element includes skeleton lines for representing the main framework and model components bound to the skeleton lines. Obtain the affine transformation parameters used to map the skeleton lines from the modeling space to the map space; The model components are subjected to coordinate transformation according to the affine transformation parameters to obtain map elements for display in the map space.
2. The method for displaying map elements according to claim 1, characterized in that, Obtaining affine transformation parameters for mapping the skeleton lines from the modeling space to the map space includes: Identify the target area in the map space for placing the map element; Establish an element location model corresponding to the target region in the modeling space; Adjust the skeleton lines from their initial state to a target state that matches the element positioning model; Based on the mapping relationship between the initial state and the target state, determine the affine transformation parameters used to map the skeleton lines from the modeling space to the map space.
3. The method for displaying map elements according to claim 2, characterized in that, Adjusting the skeleton lines from their initial state to a target state that matches the element positioning model includes: Select a local graphic from the skeleton lines to drive state adjustment; Adjust the local graphic from its initial state to a target state that matches the element positioning model; According to preset node constraints, adjust other graphics in the skeleton lines except for the local graphics. The node constraints are used to represent the constraint relationships between related nodes in the skeleton lines.
4. The method for displaying map elements according to claim 3, characterized in that, Selecting local graphics from the skeleton lines for driving state adjustment includes: Select a matching line region from the skeleton lines that matches the position of the element positioning model; Based on the matching relationship between the adaptation line region and the element positioning model, a graphic type for driving the adjustment state of the skeleton line is determined, and the graphic type includes at least one of adaptation point, adaptation line, and adaptation line pair. Select local graphics that match the graphic type from the adaptive line area.
5. The method for displaying map elements according to claim 4, characterized in that, The adapting line region is a closed region distributed in a two-dimensional plane. The adapting line region selected from the skeleton lines that matches the position of the element positioning model includes: Obtain a two-dimensional plane for aligning the skeleton lines with the position of the element positioning model; Select external lines located in the two-dimensional plane from the skeleton lines, and use the external lines as the region boundary to form an adaptive line region that matches the position of the element positioning model.
6. The method for displaying map elements according to claim 2, characterized in that, Based on the mapping relationship between the initial state and the target state, determine the affine transformation parameters used to map the skeleton lines from the modeling space to the map space, including: Two key feature points are selected from the skeleton line to represent the skeleton line, and the center point corresponding to the two key feature points is obtained. The center point is the midpoint of the line segment connecting the two key feature points. The spatial coordinates of the two key feature points and the center point are obtained in the initial state and the target state, respectively. Obtain the affine transformation parameters used to transform the spatial position coordinates from the initial state to the target state.
7. The method for displaying map elements according to claim 6, characterized in that, The affine transformation parameters include translation parameters for translating the graphic; obtaining the affine transformation parameters for transforming the spatial position coordinates from the initial state to the target state includes: The spatial coordinates of the center point are transformed from the three-dimensional spatial coordinate system of the modeling space to the geographic coordinate system to obtain the latitude and longitude coordinates of the center point; Obtain translation parameters for transforming the latitude and longitude coordinates of the center point from the initial state to the target state.
8. The method for displaying map elements according to claim 6, characterized in that, The affine transformation parameters include three-dimensional rotation angles used to rotate the graphic; Obtaining affine transformation parameters for transforming the spatial position coordinates from the initial state to the target state includes: A center vector is determined based on the spatial coordinates of the center point, with the center point as the starting point, and the center vector has the same spatial orientation as the map element. Obtain the three-dimensional rotation angle used to transform the center vector from the initial state to the target state.
9. The method for displaying map elements according to claim 6, characterized in that, The affine transformation parameters include scaling ratios used to scale the graphic; Obtaining affine transformation parameters for transforming the spatial position coordinates from the initial state to the target state includes: Determine a spatial vector pointing from one of the key feature points to another based on the spatial location coordinates; Obtain the scaling factor used to transform the spatial vector from the initial state to the target state.
10. The method for displaying map elements according to any one of claims 1 to 9, characterized in that, Obtain the 3D models of map elements created in the modeling space, including: Obtain a view window for displaying map elements in map space; The loading ratio of the map elements is determined based on the window extent of the view window; The three-dimensional models of the map elements established in the modeling space are obtained according to the loading ratio.
11. The method for displaying map elements according to any one of claims 1 to 9, characterized in that, Before obtaining the affine transformation parameters used to map the skeleton lines from the modeling space to the map space, the method further includes: Obtain the number of skeleton lines in the 3D model; Multiple parallel threads are created based on the number of skeleton lines, and the parallel threads are used to calculate the radial transformation parameters corresponding to each skeleton line in parallel.
12. A device for displaying map elements, characterized in that, The device includes: The model acquisition module is configured to acquire a 3D model of a map element established in the modeling space, wherein the 3D model of the map element includes skeleton lines for representing the main framework and model components bound to the skeleton lines. The parameter acquisition module is configured to acquire affine transformation parameters for mapping the skeleton lines from the modeling space to the map space; The coordinate transformation module is configured to perform coordinate transformation on the model component according to the affine transformation parameters to obtain map elements for display in the map space.
13. A computer-readable medium, characterized in that, The computer-readable medium stores a computer program that, when executed by a processor, implements the method for displaying map elements as described in any one of claims 1 to 11.
14. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the executable instructions to implement the method for displaying map elements as described in any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for displaying map elements as described in any one of claims 1 to 11.