Skip to main content
I am trying to work on python script but not able to correctly get what exactly is required. I know how to use it in ArcGIS 10.0 (Xp machine). In ArcGIS, there are two options

 

a) Pre logic script code

 

d = {}

 

def find_duplicates (valX , valY):

 

d/( valX, valY)] = d.setdefault ( ( valX , valY) , -1) +1

 

return du ( valX , valY) ]

 

 

b) Field_name] = 

 

find_duplicates ( iX_Coordina] , rY_Coordina]

 

 

But here in FME that type of Scripting is not working. Can anyone help me with the same. I used PythonCaller, PythonCreator, but didn't get the expected result. Is it possible to write ArcGIS type of python Scripting in FME?

 

Hi,

 

 

Definition of "find_duplicates" looks like standard Python code, but the 2nd code maybe is ArcGIS specific style.

 

I think you can achieve your purpose after reading these articles.

 

http://fmepedia.safe.com/articles/How_To/Python-and-FME-Basics

 

http://fmepedia.safe.com/articles/How_To/New-Python-FME-Objects-API-in-FME-2012

 

 

If any question would remain after learning them, let us know again.

 

 

Takashi
BTW, it seems that the Matcher and the Counter can do the same thing.

 

If there is not specific reason for using Python script, use Transformers. That's the FME style, I think 🙂

Reply