Skip to main content
Question

How to use python caller and use neighborhood finder in python caller

  • June 19, 2023
  • 3 replies
  • 25 views

I have 100 neighborhood finder, in each neighborhood finder the two input are matched and umatched from the first transformation and the two output are used as inputs in the next transformation, i want to used python caller for solve this problem

3 replies

david_r
Celebrity
  • 8391 replies
  • June 19, 2023

You can't really use the NeighborFinder transformer inside the PythonCaller, but it shouldn't be very difficult to roll your own Python code that does something similar, and loop over it accordingly. E.g.

https://medium.com/analytics-vidhya/finding-nearest-pair-of-latitude-and-longitude-match-using-python-ce50d62af546


  • Author
  • 1 reply
  • June 19, 2023

cannot create a pyhton script and use this transformation ?


david_r
Celebrity
  • 8391 replies
  • June 20, 2023

cannot create a pyhton script and use this transformation ?

The fmeobjects interface only offers a very limited subset of the regular transformers, unfortunately.

https://docs.safe.com/fme/html/fmepython/api/fmeobjects/_feature/fmeobjects.FMEFeature.html

But it's not very difficult to replicate the functionality of the NeighborFinder in Python.