Hi @annachong, as far as I know, there is no transformer to transform a TriangleFan to Polygons by a single step. Probably you need to use a series of some transformers.
I found two possible ways.
Triangulator -> GeometryCoercer->GeometryPartExtractor
GeometryExtractor -> GeometryReplacer -> AreaBuilder
And a Python script.
# PythonCaller Script Example
# Transform a TriangleFan or a TriangleStrip to Polygons.
import fmeobjects
class FeatureProcessor(object):
def input(self, feature):
geom = feature.getGeometry()
if isinstance(geom, fmeobjects.FMETriangleFan) \
or isinstance(geom, fmeobjects.FMETriangleStrip):
for i in range(geom.numParts()):
polygon = geom.getAsFaceAt(i).getAsArea()
feature.setGeometry(polygon)
self.pyoutput(feature)
else:
self.pyoutput(feature)
Hope this helps.
Thank you, Takashi.
The second method works.
Now I have to solve a new problem at the end of my workspace