Skip to main content
Solved

1st parameter `XZJ' is not a floating point number

  • December 15, 2019
  • 1 reply
  • 3 views

charry
Supporter
Forum|alt.badge.img+5

Execution error? 1st parameter `XZJ' is not a floating point number?BUT I can't XZJ type

Best answer by takashi

Hi @charry, the performFunction method requires a string representing a complete FME function call as its parameter. If the FME function (@Rotate2D in your case) requires a numeric value as a parameter, it should be a numeric representation, should not be any attribute name (string).

e.g.

    feature.performFunction('@Rotate2D(45,0,0)')

 

If you want to pass feature attribute values to the FME function, you will have to build the FME function call string containing appropriate values as formatted strings.

e.g.

    a = float(feature.getAttribute('_angle'))
    x = float(feature.getAttribute('_x'))
    y = float(feature.getAttribute('_y'))
    feature.performFunction('@Rotate2D(%f,%f,%f)' % (a, x, y))

 

By the way, why not use the Rotator transformer?

View original
Did this help you find an answer to your question?

1 reply

takashi
Evangelist
  • Best Answer
  • December 15, 2019

Hi @charry, the performFunction method requires a string representing a complete FME function call as its parameter. If the FME function (@Rotate2D in your case) requires a numeric value as a parameter, it should be a numeric representation, should not be any attribute name (string).

e.g.

    feature.performFunction('@Rotate2D(45,0,0)')

 

If you want to pass feature attribute values to the FME function, you will have to build the FME function call string containing appropriate values as formatted strings.

e.g.

    a = float(feature.getAttribute('_angle'))
    x = float(feature.getAttribute('_x'))
    y = float(feature.getAttribute('_y'))
    feature.performFunction('@Rotate2D(%f,%f,%f)' % (a, x, y))

 

By the way, why not use the Rotator transformer?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings