You can use the AddRelation tag to create a relationship (master/slave in S-57, structure/equipment in S-100) between one feature and any other features that pass a filter.
This is applied to the destination, not the source.
AddRelation has the following attributes:
• Relationship: The relationship codes for S-57 features are described in the table below. Relationship codes for S-100 features are defined in the S-101 catalogue.
• Role: Role indicates the relationship between the source feature and any target features. For S-57 catalogues, the relations and roles are
Relation | Role | Role |
|---|---|---|
masterSlave | isAMasterOf | isASlaveOf |
collection | consistsOf | isAComponentOf |
annotation | isAnnotatedBy | annotates |
• The AddRelation tag requires a <Filter> identify the features to relate to. This filter will be applied on the destination map after all other mappings are completed.
This example maps a BCNLAT feature to BCNCAR, and creates a masterSlave Relation with the BCNAR as the structure to any co-located LIGHTS or DAYMAR which are then added as equipment.
<Object Acronym="BCNLAT"> |
<MapObject> |
<MapObjectAcronym Acronym="BCNCAR" /> |
<AddRelation Relationship="masterSlave" Role="isAMasterOf"> |
<Filter> |
<GeometryEquals> |
<Filter> |
<Or> |
<ObjectAcronymIsEqualTo Acronym="LIGHTS"/> |
<ObjectAcronymIsEqualTo Acronym="DAYMAR"/> |
</Or> |
</Filter> |
</GeometryEquals> |
</Filter> |
</AddRelation> |
</MapObject> |
A masterSlave relationship is created. It would be read as BCNCAR isAMasterOf LIGHTS/DAYMAR.