I try to convert the binary value
01000000 10001010 10111011 10001100
to the value 4.33.
Also see the example:
Reproducable on this site:
http://binaryconvert.com/result_float.html?hexadecimal=408ABB8C
Is this doable in FME? And how?
Thanks!
I try to convert the binary value
01000000 10001010 10111011 10001100
to the value 4.33.
Also see the example:
Reproducable on this site:
http://binaryconvert.com/result_float.html?hexadecimal=408ABB8C
Is this doable in FME? And how?
Thanks!
Best answer by ebygomm
If you don't mind python, struct is a standard library I think
import fme
import fmeobjects
import struct
def processFeature(feature):
binary = feature.getAttribute('value').replace(" ","")
float = struct.unpack('f', struct.pack('I', int(binary,2)))[0]
feature.setAttribute("float",float)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.