Build Relationships
Instructions for Use
Building relationships between created entities is a crucial step in constructing a knowledge graph.
SuperMap iDesktopX provides the following two types of methods for building relationships.
- When entities contain spatial attributes, relationships can be built through spatial relationships (such as contain, contained by, intersect, adjacent).
- Building relationships by matching property fields, which can be further divided into two methods:
- Matching based on connection fields with identical values between the source and target entities.
- Matching via a third association table.
Functional Entry
- Knowledge Graph tab -> Build ->: Build Relationships.
- Toolbox -> Knowledge Graph -> Build Relationships: Double-click, or drag the tool into the model builder window, then double-click its functional icon.
A simple model for implementing knowledge graph construction using GPA is:

Parameter Description
- Connect the Graph Database: Set graph database connection information, including graph database type, database address, username, password, etc. Click the "Join" button after filling.
- Source Entity: Set the parent entity type.
- Target Entity: Set the child entity type. For example, if a building belongs to a parcel, the building is the source entity, and the parcel is the target entity. The relationship name could be "belongs to," and the relationship direction is from the source entity to the target entity.
- Building Way: Provides methods for building relationships through spatial topological operations, such as contain, contained by, intersect, adjacent, as well as methods for match field and association matching. Note: If building via spatial relationships, the "contains spatial objects" parameter must be set during Create an Entity.
- Relation: Set the name of the relationship type.
- Matches the Source Field: This must be set when the build relationships method is match field or association matching. This field is the connection field in the source entity used to establish a link with the target entity. The association is established when the data values in this connection field are identical. When connecting to Yukon, this field must be in lowercase letters.
- Match the Target Field: This must be set when the build relationships method is match field or association matching. This field is the connection field in the target entity used to establish a link with the source entity. The association is established when the data values in this connection field are identical. When connecting to Yukon, this field must be in lowercase letters.
- Datasource: This needs to be set when the build relationships method is association matching, i.e., the data source containing the association table.
- Association Table: Set the dataset containing the association table.
- Source Entity Association Field Name: Corresponds to "Matches the source field".
- Target Entity Association Field Name: Corresponds to "Match the target field".
- Click the Execute button to perform the prepared analysis function. After the execution is completed, the output window will indicate whether the result was successful or failed.