Geometry Traits (trait element)
A
的geometry traits supplied are represented as name and value pairs, both of which have expression sequences as their values. They are represented in the xfMap by the
... ...
的optionalrequiredattribute on the trait element defaults totrue, if set tofalsethen the trait is added to the geometry only if the trait value is not the empty string.
的optionalnillableattribute on the trait element defaults to false. If nillable is not specified, or if it is false, FME will interpret an empty trait element as an empty string trait and add it to the geometry. If nillable is true, FME will interpret an empty trait element as a null trait value and add it to the gemetry.
Once again, if the
的following xfMap document, traits.xmp contains a mapping rule which matches a
points1.xml
0.324 0.233 0.596 0.874 0.948 0.554
traits.xmp
<trait> > <trait> >
When the above points1.xml and traits.xmp documents are fed into the XML Reader, the following FME features are constructed:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Feature Type: myPoint_0'
Attribute(string): fme_feature_type' has value myPoint_0'
Attribute(string): fme_geometry' has value fme_point'
Attribute(string): fme_type' has value fme_point'
Attribute(string): xml_type' has value xml_point'
Coordinate System: '
Geometry Type: IFMEPoint
Number of Geometry Traits: 2
GeometryTrait(string): my_geometry_trait' has value sample_value'
GeometryTrait(string): point_num' has value 0'
Coordinate Dimension: 2
(10,0)
============================================================================
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Feature Type: myPoint_1'
Attribute(string): fme_feature_type' has value myPoint_1'
Attribute(string): fme_geometry' has value fme_point'
Attribute(string): fme_type' has value fme_point'
Attribute(string): xml_type' has value xml_point'
Coordinate System: '
Geometry Type: IFMEPoint
Number of Geometry Traits: 2
GeometryTrait(string): my_geometry_trait' has value sample_value'
GeometryTrait(string): point_num' has value 1'
Coordinate Dimension: 2
(5,5)
============================================================================