Method for modeling conversion relationships of geographic entities
By establishing multiple morphological nodes of geographic entities and their two-dimensional and three-dimensional data representations, configuring spatial graphics and attribute value relationships, and generating unique entity codes, the problem of inconsistent database structures during geographic entity transformation is solved, achieving efficient and flexible entity relationship modeling and data storage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KQ GEO TECH CO LTD
- Filing Date
- 2024-11-21
- Publication Date
- 2026-05-22
AI Technical Summary
In existing technologies, the lack of a unified database structure standard in the process of geographic entity transformation leads to high transformation complexity, frequent conflicts during multiple transformations and writes, and difficulty in achieving efficient entity relationship modeling.
By establishing multiple morphological nodes of geographic entities and their two-dimensional and three-dimensional data representations, configuring spatial graphics and attribute value relationships, and generating unique entity codes, unified storage and association of two-dimensional and three-dimensional data are achieved, optimizing the conversion process.
It improves the efficiency and flexibility of geographic entity conversion, reduces intermediate processing steps, and realizes unified storage and efficient conversion of 2D and 3D entity data in the database, making it suitable for domestic geographic information systems.
Smart Images

Figure CN122072999A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of geographic information data processing, and in particular to a method, apparatus, electronic device, storage medium, and computer program product for modeling geographic entity transformation relationships. Background Technology
[0002] The construction of 3D reality in China is part of the new infrastructure construction and serves as the foundation for various digital achievements. A key characteristic is its entity-based management, focusing on independent geographical features and overcoming limitations imposed by map scale, map sheet division, and projection. Designing the geographic entity conversion process and constructing digital models of these entities have become the focus of attention for all parties involved.
[0003] New-type basic surveying and mapping takes geographic entities as its perspective and object, aiming to build a basic geographic entity database. For areas where large-scale topographic mapping has been completed, the formats, scales, and standards of the collected basic geographic information and geographic entity databases vary from region to region. Developers need to configure conversion mapping tables and conversion modules for each region based on the actual basic geographic information obtained, converting basic geographic information into geographic entities. The method for converting basic geographic information into geographic entities is not universal, affecting conversion efficiency. In some cases, a method has been proposed to transfer the raw data to an intermediate database, and then from the intermediate database to the entity database. However, the data structures of both the intermediate database and the entity database are definition-dependent, increasing the complexity of the conversion and making rapid adjustments difficult. The original basic geographic information elements may have one-to-one, one-to-many, and many-to-one conversion correspondences with geographic entities. When multiple types of geographic entities are converted together or multiple geographic entities from multiple databases are used as input sources, the large number of geographic entity categories leads to multiple conversions. Furthermore, if the target table is the same during conversion, write conflicts will occur, requiring multiple conversions. Moreover, how to generate entity relationships in batches is also a current pain point in the industry. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, storage medium, and computer program product for modeling geographic entity transformation relationships to solve one or more of the above-mentioned technical problems.
[0005] In a first aspect, embodiments of this application provide a method for modeling geographic entity transformation relationships, including:
[0006] Establish multiple morphological nodes for geographic entities, as well as the two-dimensional and three-dimensional data representations corresponding to each morphological node, and set the attribute values for each morphological node.
[0007] Configure the mapping relationship between geographic information elements and geographic entities. The mapping relationship includes spatial graphic relationship and attribute value relationship. The spatial graphic relationship includes at least one of one-to-one, one-to-many, and many-to-one relationship between geographic information elements and geographic entities. The attribute value relationship includes at least one of numerical mapping, area ratio, attribute value similarity, and attribute value inclusion relationship.
[0008] Obtain the target data to be converted, and obtain the two-dimensional data representation set and three-dimensional data representation set of one or more geographic entities corresponding to the geographic information elements in the target data according to the spatial graphic relationship. Calculate the spatial entity relationship of the one or more geographic entities based on the entity relationship operation rules.
[0009] Based on spatial information, the longitude and latitude values of one or more geographic entities are obtained. According to the spatial entity relationship, the longitude and latitude values are converted into strings and the strings are concatenated according to preset rules to generate a unique entity code for one or more geographic entities.
[0010] The unique entity codes of the one or more geographic entities are stored in preset fields of the two-dimensional data representation set and the three-dimensional data representation set, so as to associate the three-dimensional models of the one or more geographic entities with the two-dimensional vectors according to the unique entity codes.
[0011] Secondly, embodiments of this application provide an apparatus for modeling geographic entity transformation relationships, comprising:
[0012] The data representation creation module is used to create multiple morphological nodes of geographic entities and the corresponding two-dimensional and three-dimensional data representations of each morphological node, and to set the attribute values of each morphological node.
[0013] The mapping relationship configuration module is used to configure the mapping relationship between geographic information elements and geographic entities. The mapping relationship includes spatial graphic relationship and attribute value relationship. The spatial graphic relationship includes at least one of one-to-one, one-to-many, and many-to-one relationships between geographic information elements and geographic entities. The attribute value relationship includes at least one of numerical mapping, area ratio, attribute value similarity, and attribute value inclusion relationship.
[0014] The target data acquisition module is used to acquire the target data to be converted, obtain the two-dimensional data representation set and the three-dimensional data representation set of one or more geographic entities corresponding to the geographic information elements in the target data according to the spatial graphic relationship, and calculate the spatial entity relationship of the one or more geographic entities based on the entity relationship operation rules.
[0015] The entity code generation module is used to obtain the longitude and latitude values of one or more geographic entities based on spatial information, convert the longitude and latitude values into strings according to the spatial entity relationship, and concatenate the strings according to preset rules to generate a unique entity code for one or more geographic entities.
[0016] The entity encoding storage module is used to store the unique entity encoding of the one or more geographic entities into preset fields of the two-dimensional data representation set and the three-dimensional data representation set, so as to associate the three-dimensional model of the one or more geographic entities with the two-dimensional vector according to the unique entity encoding.
[0017] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method described in any of the above-mentioned embodiments.
[0018] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method described in any of the above-mentioned embodiments.
[0019] Fifthly, embodiments of this application provide a computer program product, the computer program product including a computer program / instruction, which, when executed by a processor, implements the method described in any of the above-mentioned embodiments.
[0020] According to the embodiments of this application, firstly, multiple morphological nodes of geographic entities and their corresponding two-dimensional and three-dimensional data representations are established, and attribute values of each morphological node are set; secondly, the mapping relationship between geographic information elements and geographic entities is configured, the mapping relationship including spatial graphic relationship and attribute value relationship, the spatial graphic relationship including at least one of one-to-one, one-to-many, and many-to-one relationships between geographic information elements and geographic entities, and the attribute value relationship including at least one of numerical mapping, area ratio, attribute value similarity, and attribute value inclusion relationship; then, the target data to be converted is obtained, and one or more geographic entities corresponding to the geographic information elements in the target data are obtained according to the spatial graphic relationship. The two-dimensional data representation set and the three-dimensional data representation set are used to calculate the spatial entity relationship of one or more geographic entities based on entity relationship operation rules. Then, based on spatial information, the longitude and latitude values of one or more geographic entities are obtained. According to the spatial entity relationship, the longitude and latitude values are converted into strings and concatenated according to preset rules to generate a unique entity code for one or more geographic entities. Finally, the unique entity code of one or more geographic entities is stored in preset fields of the two-dimensional data representation set and the three-dimensional data representation set, so as to associate the three-dimensional model of one or more geographic entities with the two-dimensional vector according to the unique entity code.
[0021] The above-described scheme, using entity digital models as the target transformation outcome, considers the flexibility of configuration, the complexity of multiple entity types, and the inherent relationships between primitives and attributes. It designs a geographic entity digital model composed of entity attribute records, two-dimensional graphic sets, three-dimensional graphic sets, entity relationships, and other information. Entity specification configuration enhances the flexibility of entity target database structure adjustment, and mapping template configuration (spatial graphic relationships and attribute value relationships) enhances data transformation flexibility. Two-dimensional and three-dimensional calculations are used to associate the geographic entity's three-dimensional model with the entity's vector graphics. This significantly reduces intermediate processing steps in geographic entity transformation relationship modeling, enabling efficient entity transformation and unified storage of entity two-dimensional and three-dimensional data in the database. In a single transformation, the two-dimensional and three-dimensional representations of an entity can be simultaneously associated, giving the entity complete spatial information and attributes, making it suitable for three-dimensional applications. Furthermore, the scheme provided in this application can further improve transformation and database entry efficiency through algorithm optimization. Transformation tasks can be executed in parallel, and a geographic information engine can be used to read, store, query, and analyze two-dimensional and three-dimensional data. This allows the technical solution proposed in this application to be applied to domestic geographic information systems and run in a domestic environment.
[0022] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application, it can be implemented according to the contents of the specification. In order to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description
[0023] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments according to this application and should not be construed as limiting the scope of this application.
[0024] Figure 1 A flowchart illustrating a geographic entity transformation relationship modeling scheme provided in an embodiment of this application is shown.
[0025] Figure 2 This paper illustrates a detailed flowchart of a geographic entity transformation relationship modeling scheme provided in an embodiment of this application.
[0026] Figure 3 A flowchart of a geographic entity transformation relationship modeling method provided in an embodiment of this application is shown;
[0027] Figure 4 This illustration shows a flowchart of configuring the mapping relationship between geographic information elements and geographic entities in a geographic entity transformation relationship modeling scheme provided in an embodiment of this application;
[0028] Figure 5 This illustration shows a schematic diagram of determining spatial entity relationships as spatial inclusion and associating a three-dimensional model with a two-dimensional vector in a geographic entity transformation relationship modeling scheme provided in an embodiment of this application;
[0029] Figure 6 This illustration shows a parallel processing flow diagram in a geographic entity transformation relationship modeling scheme provided in an embodiment of this application;
[0030] Figure 7 This illustration shows a flowchart of the process of hierarchical identification and output of two-dimensional data in a geographic entity transformation relationship modeling scheme provided in an embodiment of this application;
[0031] Figure 8 This invention illustrates a structural block diagram of an apparatus for modeling geographic entity transformation relationships provided in an embodiment of this application; and
[0032] Figure 9 A block diagram of an electronic device used to implement embodiments of this application is shown. Detailed Implementation
[0033] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the concept or scope of this application. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0034] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application are described below. The following relevant technologies are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and all of them fall within the protection scope of the embodiments of this application.
[0035] Figure 1 The illustration shows a flowchart of a geographic entity transformation relationship modeling scheme provided in an embodiment of this application. Figure 1 The process shown in the diagram—reading source data and data conversion mapping template—performing spatial graphic and attribute item conversion—generating unique entity codes—performing entity relationship calculations—performing 3D model import—performing 3D model and entity linking—corresponds to the processing steps of this solution: establishing multiple morphological nodes of geographic entities and their corresponding 2D and 3D data representations, and setting attribute values for each morphological node; configuring the mapping relationship between geographic information elements and geographic entities, including spatial graphic relationships and attribute value relationships. The spatial graphic relationships include at least one of one-to-one, one-to-many, and many-to-one relationships between geographic information elements and geographic entities, and the attribute value relationships include at least one of numerical mapping, area proportion, attribute value similarity, and attribute value inclusion relationships; and obtaining the target data to be converted. Based on the spatial graphical relationships, a two-dimensional data representation set and a three-dimensional data representation set of one or more geographic entities corresponding to the geographic information elements in the target data are obtained. The spatial entity relationships of the one or more geographic entities are calculated based on entity relationship operation rules. The longitude and latitude values of the one or more geographic entities are obtained based on spatial information. According to the spatial entity relationships, the longitude and latitude values are converted into strings, and the strings are concatenated according to preset rules to generate unique entity codes for the one or more geographic entities. The unique entity codes of the one or more geographic entities are stored in preset fields of the two-dimensional data representation set and the three-dimensional data representation set, so that the three-dimensional models of the one or more geographic entities are associated with the two-dimensional vectors according to the unique entity codes.
[0036] Figure 2 This illustration shows a detailed flowchart of a geographic entity transformation relationship modeling scheme provided in an embodiment of this application. For example... Figure 2As shown, firstly, multiple morphological nodes of geographic entities can be established, along with their corresponding two-dimensional and three-dimensional data representations, and attribute values can be set for each morphological node. Specifically, one of the following databases can be selected as input: Basic Geographic Information Database (GDB), Basic Geographic Information Database (SHP), and Basic Geographic Information Database (DWG). Simultaneously, three-dimensional model data (batch of individual models) can also be input. Then, the mapping relationship between geographic information elements and geographic entities can be configured on these data. This mapping relationship includes spatial graphic relationships (configured according to spatial graphic transformation relationships) and attribute value relationships (configured according to attribute item transformation rules). Spatial graphic relationships include at least one of the following: one-to-one, one-to-many, and many-to-one relationships between geographic information elements and geographic entities. Attribute value relationships include at least one of the following: numerical mapping, area proportion, attribute value similarity, and attribute value inclusion relationships. During transformation, spatial graphic relationships can be transformed and analyzed.
[0037] In spatial graphical relationships among multiple geographic entities, where geographic information elements are one-to-one or one-to-many with geographic entities, multiple parallel table reading processes are generated, and each table reading process is paired with a table writing process to obtain the two-dimensional and three-dimensional data representation sets of multiple geographic entities in parallel. In cases where the spatial graphical relationship between one or more geographic entities is many-to-one, multiple sequentially executed table reading processes are generated. The results of these sequentially executed table reading processes are written to caches with multiple identical table structures. After the sequentially executed table reading processes have completed, all caches of the target geographic entity are parsed and aggregated into a single physical table of the target geographic entity for storage, thus obtaining the two-dimensional and three-dimensional data representation sets of the target geographic entity. For example, as... Figure 1 As shown, the multi-process can be divided into four scenarios: one-to-one conversion of 3D model data, one-to-one conversion of vector data, one-to-many conversion of vector data, and many-to-one conversion of vector data. In the case of one-to-one conversion of 3D model data, attribute datasets and 3D datasets can be obtained and stored in the database; in the cases of one-to-one conversion of vector data, one-to-many conversion of vector data, and many-to-one conversion of vector data, attribute datasets and 2D datasets can be obtained and stored in the database.
[0038] Further, the target data to be converted is obtained. Based on the spatial graphic relationships, a two-dimensional data representation set and a three-dimensional data representation set of one or more geographic entities corresponding to the geographic information elements in the target data are obtained. The spatial entity relationships of the one or more geographic entities are calculated based on entity relationship operation rules. The longitude and latitude values of the one or more geographic entities are obtained based on spatial information. According to the spatial entity relationships, the longitude and latitude values are converted into strings, and the strings are concatenated according to preset rules to generate unique entity codes for the one or more geographic entities. The unique entity codes of the one or more geographic entities are stored in preset fields of the two-dimensional data representation set and the three-dimensional data representation set, so as to associate the three-dimensional models of the one or more geographic entities with the two-dimensional vectors according to the unique entity codes.
[0039] Based on the attribute dataset, 3D dataset, and 2D dataset obtained in the previous step, the unique entity code of a geographic entity (generating the spatial identity code of the geographic entity) can be obtained through the above steps. Then, through entity relationship operation rules, 2D-to-2D relationship operations are performed to obtain 2D-to-2D relationships recorded in a table. Through the relationship operation rules between 2D and 3D models, spatial identity codes with the same 2D and 3D forms are assigned to the entities, and the 2D-to-3D relationships are recorded in a table. Finally, the attribute datasets of the unique entity codes of geographic entities, the 2D-to-2D relationship tables, and the 2D-to-3D relationship tables are stored in the database, thus forming the logical structure of the geographic entity digital model. That is, the unique entity codes of one or more geographic entities are stored in preset fields of the 2D data representation set and the 3D data representation set, so as to associate the 3D models of one or more geographic entities with 2D vectors according to the unique entity codes.
[0040] The execution entity in this application embodiment can be an application, service, instance, functional module of software, virtual machine (VM), container, or cloud server, or a hardware device (such as a server or terminal device) or hardware chip (such as a CPU, GPU, FPGA, NPU, AI accelerator card, or DPU) with data processing capabilities. The device for implementing geographic entity transformation relationship modeling can be deployed on the computing devices of the application provider offering the corresponding service or on a cloud computing platform providing computing power, storage, and network resources. The cloud computing platform can provide services in the following modes: IaaS (Infrastructure as a Service), PaaS (Platform as a Service), SaaS (Software as a Service), or DaaS (Data as a Service). Taking the platform providing SaaS (Software as a Service) as an example, the cloud computing platform can utilize its own computing resources to provide training for geographic entity transformation relationship modeling or the execution of the geographic entity transformation relationship modeling module. The specific application architecture can be built according to service requirements. For example, the platform can provide building services based on the above model to application users or individuals using platform resources, and further invoke the above model and realize online or offline geographic entity conversion relationship modeling functions based on requests submitted by relevant client or server devices for geographic entity conversion relationship modeling.
[0041] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0042] The technical solution of this application and how it solves the aforementioned technical problems are described in detail below with specific embodiments. The listed specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0043] This application provides a method for modeling geographic entity transformation relationships, such as... Figure 3 The diagram shown is a flowchart of a method 300 for modeling geographic entity transformation relationships according to an embodiment of this application. The method 300 may include:
[0044] In step S301, multiple morphological nodes of a geographic entity are established, along with the two-dimensional and three-dimensional data representations corresponding to each morphological node, and the attribute values of each morphological node are set.
[0045] Since there is currently no unified database structure standard for geographic entity databases, and different regions allow for structural expansion due to varying application needs, this application's embodiment provides an entity specification configuration settings panel to adapt to constantly changing requirements. This panel allows for the definition and setting of multiple subcategories of entities. Each entity category is applicable to the geographic entity digital model, which consists of entity attribute records, two-dimensional graphic sets, three-dimensional graphic sets, entity relationships, and other information. The resulting geographic entity database, generated according to the configuration parameters, meets the logical and physical structural requirements of the geographic entity digital model. The key feature is that the entity specification configuration allows for setting hierarchical classifications of geographic entities. For a single entity category, it allows for specifying forms such as two-dimensional point, line, and polygon representations, three-dimensional white models, and three-dimensional single-unit models. For two-dimensional representations, it allows for setting specific character, numeric, and character attribute descriptions. Similarly, for three-dimensional representations, it allows for setting specific attribute descriptions. Attributes are distinguished between common inherited attributes and extended proprietary attributes. It connects to specific domestic / non-domestic databases, generates physical tables according to configuration parameters, and extends spatial types or model classes, enabling the created database to store vector data, three-dimensional model data, and attribute data.
[0046] In one possible implementation, the two-dimensional data representation includes at least one of two-dimensional point representation, two-dimensional line representation, and two-dimensional polygon representation of a geographic entity; the three-dimensional data representation includes at least one of three-dimensional white model and three-dimensional single-unit model of a geographic entity; and the attribute values include at least one of the name, code, shape, and area of the geographic entity.
[0047] Specifically, secondary and tertiary subcategories of geographic entities can be created at the root node. The leaf nodes of the tree-like entity classification structure represent specific entities, allowing users to set their names, codes, and class codes, and select the required form for each entity from options such as 2D point representation, 2D line representation, 2D polygon representation, 3D white model, and 3D single-unit model. At the entity's specific form node, corresponding attribute structures can be set, allowing for the configuration of specific attribute field descriptions, including type (character, numeric, character, etc.), length, and precision.
[0048] Figure 4 This illustration shows a flowchart of configuring the mapping relationship between geographic information elements and geographic entities in a geographic entity transformation relationship modeling scheme provided in an embodiment of this application. For example... Figure 4As shown, a unified 2D and 3D entity database can be generated according to pre-set parameters, including basic entity attributes, a set of 2D graphics, a set of 3D graphics, and a set of attributes. An entity is represented by its basic attributes; an entity possesses multiple 2D graphics and multiple 3D models; in addition to its basic attributes, an entity also has multiple related extended attributes; entity relationships are subsets of the attribute set and are part of the attribute set. The entity database can store and accommodate entity content, saving attribute data and 2D and 3D data in different formats. First, an attribute set can be obtained based on entity relationships. The entity relationships can include information such as unique code of entity 1, unique code of entity 2, relationship name, relationship description, retrieved attribute, and set attribute. The obtained attribute set can include information such as unique code, extended attribute, attribute addition date, retrieved attribute, and set attribute. This information is then added to the entity's basic attributes (including unique code, entity name, retrieved attribute, and set attribute). In addition, information from two-dimensional graphic sets and three-dimensional model sets can also be added to the entity's basic attributes. The two-dimensional graphic set can include information such as unique code, two-dimensional (point / line / surface), primitive type, topology calculation, and topology representation. The three-dimensional graphic set can include information such as unique code, three-dimensional, topology calculation, and topology representation.
[0049] In some embodiments, the attribute values are expressed using at least one data type selected from character data, numeric data, character data, length data, and precision data; the attribute values are extracted from entity fields, value retrieval methods, source fields, fixed values, and dictionary names in the corresponding data list of the target database.
[0050] In step S302, the mapping relationship between geographic information elements and geographic entities is configured. The mapping relationship includes spatial graphic relationship and attribute value relationship. The spatial graphic relationship includes at least one of one-to-one, one-to-many, and many-to-one relationships between geographic information elements and geographic entities. The attribute value relationship includes at least one of numerical mapping, area ratio, attribute value similarity, and attribute value inclusion relationship.
[0051] After configuring the mapping rules from basic geographic information to geographic entity data models, spatial graphics and attributes can be converted simultaneously. The key features are that the mapping rules can represent one-to-one, one-to-many, and many-to-one conversion relationships from basic geographic information to geographic entities. It also features simple one-to-one rule conversion from source table to target table, and the ability to set filtering conditions in the source table read rules to convert information to multiple target tables (supporting one-to-many), and multiple source tables with read rules that can output to the same target table (supporting many-to-one conversion). When writing data to the target table, it supports changing the physical name of fields, and field value retrieval rules support source table fields, fixed value rules, multi-field concatenation, multi-field calculation, and conversion between old and new dictionaries. Configuring relationship rules between geographic entities allows direct acquisition of descriptive information about entity relationships such as containment, intersection, affiliation, dependency, and connectivity through spatial entity relationship operations. Common spatial entity relationships include spatial containment, spatial intersection, spatial inclusion, spatial adjacency, and spatial crossing; common attribute value relationships include area ratio, attribute value similarity, and attribute value containment. These are the pre-designed operation rules. The entity relationship is described by spatial entity relationship calculation and attribute value calculation. For example, if entity A is contained in entity B, it belongs to the master-slave relationship.
[0052] First, source data and data transformation mapping templates can be read. The source data is loaded into the processing task, and the data transformation mapping template is read to analyze the rules for spatial data transformation, attribute transformation, and relationship calculation, optimizing the execution order of task processing. Second, transformations can be performed to obtain two-dimensional graphic sets, three-dimensional data sets, and attribute sets. Mapping relationships can include layer-to-layer and layer-within-a-layer field-to-target-layer field mapping rule configurations. These can be configured manually or automatically, but manual configuration is more common due to varying layer and field naming conventions across different standards. Different value retrieval methods define and describe rules for transformations from one source layer to one target layer (one-to-one), from one source layer to multiple target layers (one-to-many), and from multiple source layers to one target layer (many-to-one). The final configuration of the entity transformation scheme can be saved locally as a text file or stored in a database. The "mapping template rules" must include spatial graphic transformation rules and attribute conversion rules; entity relationship calculation rules require separate settings.
[0053] In this embodiment of the application, the conversion configuration of one-to-one, one-to-many, and many-to-one relationships between geographic information elements and geographic entities can adopt the following schemes respectively:
[0054] 1) One-to-one and one-to-many transformation configurations for spatial graphics. One geographic information feature corresponds to one basic geographic information feature transformation, such as transformation to RG_FW_A; one geographic information feature corresponds to multiple basic geographic entity feature transformations, such as transformation to GL_ZHENGQU_A and GL_GHKZX_A.
[0055]
[0056] 2) Many-to-one transformation configuration of spatial graphics. Multiple geographic information elements correspond to one basic geographic entity element transformation, such as RG_GZW_A.
[0057] Rule Name Geographic Information Elements Basic geographic entity elements Category Filtering MX_ruler55 JMDJSS_GGFWJSS_A RG_GZW_A GB='230203' MX_ruler56 JMDJSS_GKJSS_A RG_GZW_A GB='230201'
[0058] 3) Configuration of attribute conversion rules. This includes setting various methods such as source field, fixed value, dictionary lookup, and different conversion formats.
[0059]
[0060]
[0061] In step S303, the target data to be converted is obtained, and the two-dimensional data representation set and three-dimensional data representation set of one or more geographic entities corresponding to the geographic information elements in the target data are obtained according to the spatial graphic relationship. The spatial entity relationship of the one or more geographic entities is calculated based on the entity relationship operation rules.
[0062] The conversion process yields a set of two-dimensional graphics and attribute sets. The domestically developed KQGIS platform supports reading most vector data formats on the market. Data not in Shapefile format can be converted to Shapefile format as source data, and it can also read local GDB databases as source data. Therefore, the format of the source data is unrestricted, as long as the file name or layer name in GDB matches the source data name in a "rule" of the mapping template, the conversion can be performed. The process of writing data to the target data table during conversion is optimized. The mapping template rules are automatically analyzed to determine whether the target tables for one-to-one and one-to-many conversions are the same. Cases without write conflicts are grouped together for execution; cases with write conflicts are grouped together for execution. In cases of write conflicts, data is first batch-processed to a cache file before being written to the target table, achieving parallel processing of data conversion and improving write efficiency. A key feature is the optimization of the conversion task order using a parallel processing design. For common DWG format as the conversion source, when there are no requirements to rename the graphic layer names or attribute names, no mapping template configuration is needed; the conversion can be automatically calculated and directly entered into the database. Furthermore, it can generate unique entity codes for entities entering the database, perform entity relationship generation, and save the calculated entity and entity relationship descriptions as part of the attribute set. Its key feature is the use of spatial and attribute calculation algorithms, enabling batch generation of entity and entity relationship records and descriptions, thus improving efficiency.
[0063] In one possible implementation, the aforementioned spatial entity relationships include at least one of spatial inclusion, spatial intersection, spatial containment, spatial adjacency, and spatial traversal relationships among geographic entities. The method of calculating the spatial entity relationships of the one or more geographic entities based on entity relationship operation rules means that the calculation results are output as entity inclusion, entity intersection, entity affiliation, entity dependency, entity connectivity, and other entity relationship description information between one or more geographic entities. In one implementation, this can be achieved by extracting the target 3D data representation and target 2D data representation corresponding to the target geographic entity from the 3D data representation set of the one or more geographic entities; obtaining the ground vector surface of the target geographic entity indicated by the target 2D data representation; calculating the topological relationship between the center point and the ground vector surface based on the center point of the target geographic entity indicated by the target 3D data representation; and obtaining the spatial entity relationship of the target geographic entity based on the topological relationship. Accordingly, in step S305 of this application, storing the unique entity code of one or more geographic entities in the preset fields of the two-dimensional data representation set and the three-dimensional data representation set can be done when the spatial entity relationship is a spatial inclusion relationship, by storing the unique entity code of the target geographic entity in the preset fields of the target two-dimensional data representation set and the target three-dimensional data representation set.
[0064] In some embodiments, when the projection point of the center point indicated by the topological relationship is located within the ground vector plane, the spatial entity relationship is determined to be a spatial containment relationship.
[0065] Figure 5 This illustration shows a schematic diagram of a geographic entity transformation relationship modeling scheme provided in this application, which determines the spatial entity relationship as spatial containment and associates a three-dimensional model with a two-dimensional vector. For example... Figure 5 As shown, it includes three 3D models (3D shapes of entities). The rightmost 3D model represents the center point of the target geographic entity, indicating its 3D data representation. The geometric center point (3D model center point) of this rightmost 3D model is calculated. Simultaneously, Figure 5 The ground vector graphics (two-dimensional form of entities) where the three three-dimensional models are located are the two-dimensional data representations of the target geographic entities. When the projection point of the center point onto the plane is located within the ground vector plane, the spatial entity relationship of the target geographic entity is determined to be a spatial inclusion relationship (inclusion relationship operation).
[0066] Specifically, first, calculate the geometric center point A(x1,y1,z1) of the three-dimensional single-unit model K, then read another plot M(XY,Z2) on the plane, reduce the Z value of the geometric center point to be the same as the Z2 value of the plane, so that they are in the same plane, calculate the inclusion relationship between the shapes of A and M, if it is true, assign the same entity code to the original model K and plot M.
[0067] In step S304, the longitude and latitude values of the one or more geographic entities are obtained based on spatial information. According to the spatial entity relationship, the longitude and latitude values are converted into strings and the strings are concatenated according to preset rules to generate a unique entity code for the one or more geographic entities.
[0068] The preset rules can be the rules of the Beidou grid location code (GB / T 39409-2020), and the string arrangement rules of the generated unique entity code can be in the form of "MA + standard field + extended field".
[0069] In this embodiment, when two-dimensional vector data and three-dimensional data have been stored in the database, the longitude and latitude values can be calculated based on the stored spatial information. According to the spatial entity relationship, the longitude and latitude values are converted into digital strings, i.e., location codes, which meet the requirements of Beidou grid location codes (GB / T 39409-2020). In accordance with the requirements of the "Technical Document Annex-3 Basic Geographic Entity Spatial Identity Coding Rules" of the real-scene 3D industry, the code strings are spliced according to certain rules to form entity spatial identity codes (i.e., entity codes). The code consists of multiple segments, including the MA international identification system for the proprietary identification of basic geographic entities; the "standard field" consists of a 26-bit (two-dimensional) or 44-bit (three-dimensional) location code, a 6-bit classification code, and a 4-bit sequence code; and the "extended field" is a variable-length code.
[0070] When generating a text description from the relationships between two-dimensional and three-dimensional entities, this "unique entity code" is required. This is also required when using the relation records of the physical table to record the relationship between two entities A and B. When generating entity relationships between two-dimensional and three-dimensional models, and using the relation records of the physical table to record that the two-dimensional and three-dimensional forms of entity A represent the same object, the "unique entity code" is also required.
[0071] In step S305, the unique entity code of the one or more geographic entities is stored in a preset field of the two-dimensional data representation set and the three-dimensional data representation set, so as to associate the three-dimensional model of the one or more geographic entities with the two-dimensional vector according to the unique entity code.
[0072] Currently, 3D models are commonly found in OSGB and 3DMax formats, while vector models are commonly found in Shapefile and SDE database formats. This application provides an integrated 2D / 3D spatial database capable of simultaneously storing vector and 3D model data, enabling both 3D and 2D spatial computations. The input 3D model data is entered into the integrated 2D / 3D entity database according to entity specification configuration information and pre-set offsets. The center point of a single 3D model is calculated, and the inclusion relationship between the center point and the entity's vector planar shape is determined. If inclusion exists, the 3D model is assigned the same entity code, ensuring that the 3D and 2D shapes point to the same geographic entity and have the same entity code. This allows for automatic linking and connection between the 3D model and the entity.
[0073] Performs 3D model and 2D vector calculations and generates associated information. See also: Figure 5First, the center point of the 3D single-unit model is calculated. Then, the topological relationship between the model's center point and the bottom vector plane is calculated. The projection point of the model's center point within the bottom plane is considered an inclusion relationship. The 3D model with this inclusion relationship is assigned the same entity code as the 2D bottom plane, and an association record of the 3D model, 2D graphic, and entity code is recorded in the database. This allows for quick retrieval of the 3D model of the entity when querying the 2D form, and vice versa, indicating that the 2D and 3D elements have generated associated information.
[0074] For example, if a query using a unique entity code can find at least one vector data entry and at least one 3D single-unit model, it indicates that the vector and 3D model have been successfully linked.
[0075] Furthermore, a unique entity code can be generated for each entity added to the database, entity relationship generation can be performed, and the calculated entity and entity relationship description information can be saved as part of the attribute set. The calculated entity and entity relationship description information can be in the following form:
[0076]
[0077] In one possible implementation, the above scheme may further include: converting the geographic information elements in the target data into a set of attribute values for multiple geographic entities based on the attribute value relationships; and storing the unique entity codes of the one or more geographic entities in a preset field of the attribute value set.
[0078] That is, when generating a text description by calculating the relationship between two-dimensional and two-dimensional entities, the "unique entity code" can be called to generate it; when generating the relationship between two-dimensional and three-dimensional models, the relationship record of the physical table is used to record that the two-dimensional and three-dimensional forms of geographic entities represent the same thing, and the "unique entity code" is also used to mark it.
[0079] In one possible implementation, the above scheme may further include: when the spatial graphical relationship between multiple geographic entities is one-to-one or one-to-many between geographic information elements and geographic entities, generating multiple parallel table reading processes and pairing each table reading process with a table writing process to obtain the two-dimensional data representation set and the three-dimensional data representation set of multiple geographic entities in parallel; when the spatial graphical relationship between the one or more geographic entities is many-to-one between geographic information elements and geographic entities, generating multiple sequentially executed table reading processes, writing the results of the multiple sequentially executed table reading processes into a cache with multiple identical table structures in sequence, and after the multiple sequentially executed table reading processes have finished, parsing all caches of the target geographic entity and collecting them into a single physical table of the target geographic entity for storage to obtain the two-dimensional data representation set and the three-dimensional data representation set of the target geographic entity.
[0080] This application's embodiments can analyze the read / write differences between the target table and the conversion, design a reasonable parallel conversion method, and improve conversion speed. Analysis of mapping template rules reveals that for one-to-one and one-to-many conversions, where the target tables are different and there are no write conflicts, they are grouped together for execution. Multiple parallel read processes are prepared for the data, with each read process paired with a write process, allowing batch simultaneous conversion. For many-to-one conversions, where the target tables are usually the same and write conflicts exist, they are grouped together for execution. Multiple parallel conversion processes are prepared for the data, and each conversion writes the results to a cache with multiple identical table structures. The cache can be implemented using relational database temporary tables, in-memory databases, or data files (TXT / XML, etc.). The cached results are parsed and aggregated into a single physical table of the target table for storage, completing the many-to-one conversion.
[0081] Figure 6 This illustration shows a parallel processing flow diagram of a geographic entity transformation relationship modeling scheme provided in an embodiment of this application. For example... Figure 6 As shown, after the process begins, for one-to-one and one-to-many data conversion source data reading, the read table process 1-write table process 1, read table process 2-write table process 2, and so on, up to read table process N-write table process N. For many-to-one data conversion source data reading, conversion process 1, conversion process 2, and so on, up to conversion process M, can all be stored in multiple intermediate cache tables with the same structure, and then converted into a single target physical table. Then the entire process ends, completing the conversion.
[0082] In one possible implementation, multiple morphological nodes of a geographic entity in this embodiment are expressed through a tree structure of root nodes, leaf nodes, and leaf nodes, where the root nodes, leaf nodes, and leaf nodes correspond to different levels of the geographic entity.
[0083] For example, the entity sub-class structure refers to establishing hierarchical classifications such as "natural resource entity - mountain - mountain range," which can be flexibly configured according to local requirements at the city and county levels without restrictions. The leaf level code 110100 for mountain ranges is specified by industry standards. Under the mountain range, its storable form can be customized, including two-dimensional points, lines, and surfaces (corresponding to two-dimensional sets), and three-dimensional white films / layered models / three-dimensional single-unit models / single-unit images (corresponding to three-dimensional sets). Selecting the corresponding storage form sub-item can add child nodes. For child nodes of two-dimensional and three-dimensional expressions, further manual configuration is possible, including field names, field aliases, and field types (supporting all types in relational databases). It is also possible to set whether the field level is a basic attribute (common to all expression forms) or an extended attribute (unique to a certain form). Value range settings support string, number, or dictionary items, covering common scenarios in relational databases.
[0084] In some embodiments, the above scheme may further include: based on the different node positions of the root node, leaf node, and leaf node of the tree structure where the morphological nodes of the geographic entities corresponding to the two-dimensional data representation and the three-dimensional data representation are located, the two-dimensional data representation and the three-dimensional data representation are layered and identified, and line fusion, line to surface conversion, surface closure, broken line removal, and centerline extraction are performed, and the processed two-dimensional data representation and the three-dimensional data representation are output as different layers.
[0085] In this embodiment, when using basic geographic information data in DWG format as source data, if there is no requirement to rename the converted result, a mapping conversion template can be omitted. The DWG format data is read, and the data is layered or processed by classification fields according to the data layers. As needed to convert points, lines, and polygons into the final graphic, automated processing such as line fusion, line-to-polygon conversion, polygon closure, broken line removal, and centerline extraction is performed. The processed data is then output in different layers, either as SHP file data or directly to a database for multi-layer storage. During the conversion process, attribute information from the original layers is also converted and saved to the target layer, achieving the conversion of graphics and attributes within a single task without a preset conversion rule template. Multiple processes are generated to batch store the 3D model data in the database.
[0086] For example, when using the common Dwg format as the conversion source, and there are no requirements to rename the graphics layer and attribute names, the feature is that no mapping template needs to be configured, and it can be directly converted into the library. Figure 7 This is a schematic diagram illustrating the process of hierarchical identification and output of two-dimensional data in a geographic entity transformation relationship modeling scheme provided in this application embodiment. For example... Figure 7As shown, the entire process can be as follows: 1) Read in the DWG file. 2) Check if there is a "conversion rule settings" file. Usually, this is either absent or unnecessary. If present, read the source-target layer name specifications and the source-target field name specifications for later use when writing to the final database table (corresponding to name modification). 3) If not, analyze whether there are multiple layers of data in the DWG. If the analysis is a single layer, further analyze whether the single layer of the DWG has categorizable fields. If there are categorizable fields, filter each category as a layer for output, with the same field names for each layer, resulting in multiple target layers. If there are no categorizable fields, output each layer as a layer to the target layer, with the field names for each layer varying depending on the number of source files. If the analysis is multi-layered, then the final output is multiple target layers. 4) If a certain category of the spatial data in the DWG does not match the point, line, or polygon types required by the final output layer, then the operations outlined in the dashed box need to be performed, i.e., automated processing such as line blending, line to polygon conversion, polygon closure, broken line removal, and centerline extraction are performed in memory. If the requirements are met, skip this step. In short, ensure that no program errors occur when writing to the database at the end. 5) Write to the target database as required. First, create a spatial table. If there is no configuration, name it with the original name. If there is a configuration, name it with the target name configured. Generally, write the spatial data first, and then write the corresponding attribute data. This achieves one-time conversion of graphics and attributes. It is processed in one task (writing spatial graphics and attributes to the database. The spatial graphics meet the specific requirements of point, line and surface types).
[0087] The above scheme incorporates information such as target database structure specifications, spatial graphic transformation rules from source data to entities, attribute conversion rules, and entity relationship operation rules into mapping relationship rules. This enables one-click entity transformation with complete information filling, including spatial information transformation, attribute information transformation, entity relationship information calculation, and spatial calculation to link 2D and 3D data, thus filling in all the information required for the entity digital model. Automated analysis and task scheduling, along with multi-process parallel processing for data entry and sequential task execution, significantly improve the efficiency of parallel data entry for graphic and attribute data transformation. This ensures the correct execution of multi-step tasks with pre- and post-constraint conditions, achieving one-click processing. Based on an integrated 2D / 3D data storage design, the scheme automatically calculates and links the 3D model with the entity's 2D data, and batches relationships between entity 2D forms based on spatial entity relationship operations and attribute operations. These automated processes reduce or replace a large amount of manual work in practice, improving the efficiency of entity data production.
[0088] Corresponding to the examples and method embodiments provided in this application, this application also provides an apparatus for modeling geographic entity transformation relationships. For example... Figure 8The diagram shown is a structural block diagram of a geographic entity transformation relationship modeling apparatus 800 according to an embodiment of this application. The apparatus 800 may include: a data representation establishment module 801, used to establish multiple morphological nodes of geographic entities and corresponding two-dimensional and three-dimensional data representations of each morphological node, and to set attribute values for each morphological node; a mapping relationship configuration module 802, used to configure the mapping relationship between geographic information elements and geographic entities, wherein the mapping relationship includes spatial graphic relationships and attribute value relationships, the spatial graphic relationships including at least one of one-to-one, one-to-many, and many-to-one relationships between geographic information elements and geographic entities, and the attribute value relationships including at least one of numerical mapping, area proportion, attribute value similarity, and attribute value inclusion relationships; and a target data acquisition module 803, used to acquire target data to be transformed and obtain the target data based on the spatial graphic relationships. The system uses a two-dimensional data representation set and a three-dimensional data representation set corresponding to one or more geographic entities in the geographic information elements in the target data. Based on entity relationship operation rules, it calculates the spatial entity relationship of the one or more geographic entities. An entity code generation module 804 is used to obtain the longitude and latitude values of the one or more geographic entities based on spatial information. According to the spatial entity relationship, the longitude and latitude values are converted into strings and concatenated according to preset rules to generate a unique entity code for the one or more geographic entities. An entity code storage module 805 is used to store the unique entity code of the one or more geographic entities in preset fields of the two-dimensional data representation set and the three-dimensional data representation set, so as to associate the three-dimensional model of the one or more geographic entities with the two-dimensional vector according to the unique entity code.
[0089] In one possible implementation, the two-dimensional data representation includes at least one of two-dimensional point representation, two-dimensional line representation, and two-dimensional polygon representation of a geographic entity; the three-dimensional data representation includes at least one of three-dimensional white model and three-dimensional single-unit model of a geographic entity; and the attribute values include at least one of the name, code, shape, and area of the geographic entity.
[0090] In one possible implementation, the spatial entity relationship includes at least one of spatial inclusion, spatial intersection, spatial containment, spatial adjacency, and spatial traversal relationships of geographic entities. The target data acquisition module may include: a data representation extraction submodule, used to extract the target three-dimensional data representation and target two-dimensional data representation corresponding to the target geographic entity from the three-dimensional data representation set of the one or more geographic entities; a ground vector surface acquisition submodule, used to acquire the ground vector surface of the target geographic entity indicated by the target two-dimensional data representation; a topology relationship calculation submodule, used to calculate the topology relationship between the center point and the ground vector surface based on the center point of the target geographic entity indicated by the target three-dimensional data representation; and a spatial entity relationship acquisition submodule, used to obtain the spatial entity relationship of the target geographic entity according to the topology relationship. Correspondingly, the entity encoding storage module may include: an entity encoding storage submodule, used to store the unique entity code of the target geographic entity in preset fields of the target two-dimensional data representation set and the target three-dimensional data representation set when the spatial entity relationship is a spatial inclusion relationship.
[0091] In some embodiments, when the projection point of the center point indicated by the topological relationship is located within the ground vector plane, the spatial entity relationship is determined to be a spatial containment relationship.
[0092] In one possible implementation, the above apparatus may further include: an attribute value set conversion module, used to convert geographic information elements in the target data into attribute value sets of multiple geographic entities according to the attribute value relationships; and a unique entity code storage module, used to store the unique entity codes of the one or more geographic entities in a preset field of the attribute value set.
[0093] In one possible implementation, the attribute value is expressed using at least one data type selected from character data, numeric data, character data, length data, and precision data; the attribute value is extracted from entity fields, value retrieval methods, source fields, fixed values, and dictionary names in the corresponding data list of the target database.
[0094] In one possible implementation, the above apparatus may further include: a parallel table reading process generation module, used to generate multiple parallel table reading processes when the spatial graphical relationship between multiple geographic entities is one-to-one or one-to-many between geographic information elements and geographic entities, and to pair each table reading process with a table writing process to obtain the two-dimensional data representation set and the three-dimensional data representation set of multiple geographic entities in parallel; and a sequential execution table reading process generation module, used to generate multiple sequentially executed table reading processes when the spatial graphical relationship between the one or more geographic entities is many-to-one between geographic information elements and geographic entities, to write the results of the multiple sequentially executed table reading processes into a cache with multiple identical table structures in sequence, and after the multiple sequentially executed table reading processes have finished, to parse all the caches of the target geographic entity and collect them into a single physical table of the target geographic entity for storage, so as to obtain the two-dimensional data representation set and the three-dimensional data representation set of the target geographic entity.
[0095] In one possible implementation, multiple morphological nodes of the geographic entity are expressed through a tree structure of root nodes, leaf nodes, and leaf nodes, which correspond to different levels of the geographic entity.
[0096] In some embodiments, the above-mentioned device may further include: a layer recognition module, used to identify the layers of the two-dimensional data representation and the three-dimensional data representation according to the different node positions of the root node, leaf node and leaf node of the tree structure where the morphological nodes of the geographic entities corresponding to the two-dimensional data representation and the three-dimensional data representation are located, and to perform line fusion, line to surface conversion, surface closure, broken line removal and centerline extraction processing, and output the processed two-dimensional data representation and the three-dimensional data representation as different layers.
[0097] The functions of each module in each device in the embodiments of this application can be found in the corresponding description in the above method, and they have corresponding beneficial effects, which will not be repeated here.
[0098] Figure 9 This is a block diagram of an electronic device used to implement embodiments of this application. For example... Figure 9 As shown, the electronic device includes a memory 901 and a processor 902. The memory 901 stores a computer program that can run on the processor 902. When the processor 902 executes the computer program, it implements the method described in the above embodiments. The number of memories 901 and processors 902 can be one or more.
[0099] The electronic device also includes:
[0100] The communication interface 903 is used to communicate with external devices and exchange and transmit data.
[0101] If the memory 901, processor 902, and communication interface 903 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0102] Optionally, in a specific implementation, if the memory 901, processor 902, and communication interface 903 are integrated on a single chip, then the memory 901, processor 902, and communication interface 903 can communicate with each other through an internal interface.
[0103] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method provided in this application.
[0104] This application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the methods provided in any embodiment of this application.
[0105] This application also provides a chip including a processor for calling and executing instructions stored in a memory, causing a communication device with the chip installed to perform the method provided in this application.
[0106] This application also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in this application.
[0107] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.
[0108] Further, optionally, the aforementioned memory may include read-only memory and random access memory. The memory may be volatile memory or non-volatile memory, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0109] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0110] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0111] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0112] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.
[0113] The logic and / or steps described in the flowchart or otherwise herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0114] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.
[0115] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.
[0116] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope described in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for modeling geographic entity transformation relationships, comprising: Establish multiple morphological nodes for geographic entities, as well as the two-dimensional and three-dimensional data representations corresponding to each morphological node, and set the attribute values for each morphological node; Configure the mapping relationship between geographic information elements and geographic entities. The mapping relationship includes spatial graphic relationship and attribute value relationship. The spatial graphic relationship includes at least one of one-to-one, one-to-many, and many-to-one relationship between geographic information elements and geographic entities. The attribute value relationship includes at least one of numerical mapping, area ratio, attribute value similarity, and attribute value inclusion relationship. Obtain the target data to be converted, and obtain the two-dimensional data representation set and three-dimensional data representation set of one or more geographic entities corresponding to the geographic information elements in the target data according to the spatial graphic relationship. Calculate the spatial entity relationship of the one or more geographic entities based on the entity relationship operation rules. Based on spatial information, the longitude and latitude values of one or more geographic entities are obtained. According to the spatial entity relationship, the longitude and latitude values are converted into strings and the strings are concatenated according to preset rules to generate a unique entity code for one or more geographic entities. The unique entity codes of the one or more geographic entities are stored in preset fields of the two-dimensional data representation set and the three-dimensional data representation set, so as to associate the three-dimensional models of the one or more geographic entities with the two-dimensional vectors according to the unique entity codes.
2. The method according to claim 1, wherein, The two-dimensional data representation includes at least one of two-dimensional point representation, two-dimensional line representation, and two-dimensional polygon representation of geographic entities; the three-dimensional data representation includes at least one of three-dimensional white model and three-dimensional single-unit model of geographic entities; the attribute values include at least one of name, code, shape, and area of geographic entities.
3. The method according to claim 1, wherein, The spatial entity relationship includes at least one of the following: spatial containment, spatial intersection, spatial inclusion, spatial adjacency, and spatial traversal relationships of geographic entities. The calculation of the spatial entity relationship of the one or more geographic entities based on the entity relationship operation rules includes: Extract the target three-dimensional data representation and the target two-dimensional data representation corresponding to the target geographic entity from the three-dimensional data representation set of the one or more geographic entities; Obtain the ground vector surface of the target geographic entity as indicated by the target two-dimensional data representation; Based on the center point of the target geographic entity indicated by the target three-dimensional data representation, calculate the topological relationship between the center point and the ground vector surface; The spatial entity relationship of the target geographic entity is obtained based on the topological relationship; The step of storing the unique entity codes of the one or more geographic entities into preset fields of the two-dimensional data representation set and the three-dimensional data representation set includes: When the spatial entity relationship is a spatial inclusion relationship, the unique entity code of the target geographic entity is stored in the preset fields of the target two-dimensional data representation set and the target three-dimensional data representation set.
4. The method according to claim 3, wherein, When the projection point of the center point indicated by the topological relationship is located within the ground vector plane, the spatial entity relationship is determined to be a spatial containment relationship.
5. The method according to claim 1, wherein, The method further includes: Based on the attribute value relationships, the geographic information elements in the target data are converted into a set of attribute values for multiple geographic entities; The unique entity codes of the one or more geographic entities are stored in a preset field of the attribute value set.
6. The method according to claim 1, wherein, The attribute values are expressed using at least one of the following data types: character data, numeric data, character data, length data, and precision data; the attribute values are extracted from entity fields, value retrieval methods, source fields, fixed values, and dictionary names in the corresponding data list of the target database.
7. The method according to claim 1, wherein, The method further includes: When the spatial graphical relationship between multiple geographic entities is one-to-one or one-to-many between geographic information elements and geographic entities, multiple parallel table reading processes are generated, and a table writing process is paired with each table reading process to obtain the two-dimensional data representation set and the three-dimensional data representation set of multiple geographic entities in parallel. When the spatial graphical relationship between one or more geographic entities is many-to-one between geographic information elements and geographic entities, multiple sequentially executed table reading processes are generated. The results of the multiple sequentially executed table reading processes are written into a cache with multiple identical table structures. After the multiple sequentially executed table reading processes are completed, all caches of the target geographic entity are parsed and aggregated into a single physical table of the target geographic entity for storage, so as to obtain the two-dimensional data representation set and the three-dimensional data representation set of the target geographic entity.
8. The method according to claim 1, wherein, The multiple morphological nodes of the geographic entity are expressed through a tree structure of root nodes, leaf nodes, and leaf nodes, which correspond to different levels of the geographic entity.
9. The method according to claim 8, wherein, The method further includes: Based on the different node positions of the root, leaf, and leaf nodes of the tree structure where the morphological nodes of the geographic entities corresponding to the two-dimensional and three-dimensional data representations are located, the two-dimensional and three-dimensional data representations are layered and identified, and then processed by line fusion, line to surface conversion, surface closure, broken line removal, and centerline extraction. The processed two-dimensional and three-dimensional data representations are then output as different layers.
10. An apparatus for modeling geographic entity transformation relationships, comprising: The data representation creation module is used to create multiple morphological nodes of geographic entities and the corresponding two-dimensional and three-dimensional data representations of each morphological node, and to set the attribute values of each morphological node. The mapping relationship configuration module is used to configure the mapping relationship between geographic information elements and geographic entities. The mapping relationship includes spatial graphic relationship and attribute value relationship. The spatial graphic relationship includes at least one of one-to-one, one-to-many, and many-to-one relationships between geographic information elements and geographic entities. The attribute value relationship includes at least one of numerical mapping, area ratio, attribute value similarity, and attribute value inclusion relationship. The target data acquisition module is used to acquire the target data to be converted, obtain the two-dimensional data representation set and the three-dimensional data representation set of one or more geographic entities corresponding to the geographic information elements in the target data according to the spatial graphic relationship, and calculate the spatial entity relationship of the one or more geographic entities based on the entity relationship operation rules. The entity code generation module is used to obtain the longitude and latitude values of one or more geographic entities based on spatial information, convert the longitude and latitude values into strings according to the spatial entity relationship, and concatenate the strings according to preset rules to generate a unique entity code for one or more geographic entities. The entity encoding storage module is used to store the unique entity encoding of the one or more geographic entities into preset fields of the two-dimensional data representation set and the three-dimensional data representation set, so as to associate the three-dimensional model of the one or more geographic entities with the two-dimensional vector according to the unique entity encoding.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method of any one of claims 1-9.
12. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of any one of claims 1-9.
13. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the method of any one of claims 1-9.