Feature Relationships (LNAM)

The S-57 format has a concept of features being related to one another by way of the LNAM subfield of the FFPT (Feature to Feature Object Pointer) field. These relationships are encoded in the LNAM_REFS{} list attribute of FME features when such relationships exist.

In the S-57 format, these relationships are marked as being master, slave, or peer-to-peer. In practice, though, the only values that exist are master-to-slave pointers, so the explicit relationship is not preserved.

Each feature is also tagged with an LNAM value, which is the unique identifier for the feature within a single file.

FME can be used to associate the geometry of slave features with their master, as shown in this example mapping file fragment.

#==================================================================
# Collect geometries for C_AGGR objects.

FACTORY_DEF * TeeFactory 	\
FACTORY_NAME AggrGeomDuplicate 	\
INPUT  FEATURE_TYPE * s57_type s57_point	\
INPUT  FEATURE_TYPE * s57_type s57_line	\
INPUT  FEATURE_TYPE * s57_type s57_polygon	\
OUTPUT FEATURE_TYPE *		\
OUTPUT FEATURE_TYPE GeomSource		\
@KeepAttributes(LNAM,DSNM)

FACTORY_DEF * ReferenceFactory 	\
FACTORY_NAME AggrCollector	\
INPUT REFERENCEE FEATURE_TYPE GeomSource	\
INPUT REFERENCER FEATURE_TYPE C_AGGR 	\
REFERENCEE_FIELDS LNAM 	\
REFERENCER_FIELDS LNAM_REFS{} 	\
REFERENCE_INFO GEOMETRY 	\
GROUP_BY DSNM 		\
AGGREGATE_ONLY 	\
OUTPUT COMPLETE FEATURE_TYPE * 	\
OUTPUT INCOMPLETE FEATURE_TYPE *

Note: In Workbench, use the FeatureMerger transformer. This transformer takes input into two ports – Requestor and Supplier – and merges information from each Supplier onto the Requestor. For more information, open the FeatureMerger in Workbench and click the Help button.