I'm working with groups of features and I want minimize the number of blocking transformers in my workflow. Right now I'm using a Sorter to sort features in each group and a PythonCaller to make some attribute manipulation and comparison. Both transformers block the flow so I wanted to get rid of the Sorter and do the feature sorting inside the PythonCaller but I don't see how to do it.
Once I have the list of features, what should I do to sort them by one or any number of attributes?
Thank you!
import fme
import fmeobjects
class FeatureProcessor(object):
def __init__(self):
self.feature_list = []
def input(self, feature):
self.feature_list.append(feature)
def close(self):
pass
def process_group(self):
for feature in self.feature_list:
## ...