I've got a question about integrating ArcPy in FME. It would appear that FME won't let me to read in multiple features and process them using ArcPy functions through PythonCaller. This can be easily done outside FME with one line of code such as:

arcpy.LocateFeaturesAlongRoutes_lr(feats, rts, rid, tol, tbl, props)

What I would hope to achieve with PythonCaller is that it can be used just like one of the transformers like clipper and buffer. Not sure anybody else has experienced the same issue?


There are two ways this transformer can operate: on a single feature or a group. From the documentation:

The PythonCaller can interface with a Python script in two different ways: by function or by a class:

Use the Function Interface when you intend to process a single feature at a time.

Use the Class Interface for more flexibility. The Class Interface is useful when you want to operate on a group of features together, such as collecting all the features received and then outputting them in a specific sort order. Another common use case is to accumulate all the features, perform an operation on the whole set, and then output all of the features with a calculated value as a new attribute.

Does that make sense? The documentation is surely useful here, with a couple of examples. Another good example is the custom FuzzyStringComparer on the FME Hub, and yet more info can be found on the FME knowledgebase.

  • Hi Mark, thank you for providing the information. Maybe I used the term "features" wrong, what I really meant is Feature Types or data sets. In the python example I listed above, "feats" and "rts" represent 2 different feature classes and they are gracefully being processed through an arcpy function. I am not sure if FME's Python Caller can handle multiple feature types at a time? Thanks. – Jonathan Aug 14 '17 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.