0

My file > https://drive.google.com/open?id=0BzmZiSDoM7l3U2poYWNTbUhBWVU

The problem is that I have this data from a software known as Geomodeller and want to load it in another software known as REDBACK.

In gemododeller, I made a 3D cube and loaded it with data(This data has layers like a cake) and somehow in REDBACK the data shown is only the intersection of the layers in 2D.

I've read the post Python base64 data decode

And implemented the code by https://stackoverflow.com/users/194586/nick-t and i got :

dtgt=base64.b64decode(target)
format=">ff"
for i in range(100):
print struct.unpack_from(format,dtgt,8*i)

(2.350988701644575e-38, 1.1754943508222875e-38) (1.7826336565709476e+29, 6.64613997892458e+35) Traceback (most recent call last): File "", line 2, in error: unpack_from requires a buffer of at least 8 bytes

Can I please have help for this problem?

My supervisor thinks the problem lies in the appended data so he wants to get everything in the appended data out first and then further analyze the problem.

Community
  • 1
  • 1

1 Answers1

1

The AppendedData in your file does not appear to be valid Base64 data - there should be no equals signs except possibly at the very end. If it's really supposed to be composed of multiple individual chunks of encoded data like that, you would have to keep calling the decoder on successive chunks until the entire section of data had been processed. (You're only getting two data points because your decoder gave up at the first "==" in the file.)

Based on the compressor="vtkZLibDataCompressor" in the file header, the data may be in compressed format (this may explain why the two data points you managed to extract had such absurdly large/small values). Hopefully, Python's zlib module is compatible with this compression.

jasonharper
  • 9,450
  • 2
  • 18
  • 42
  • Thank you for the swift answer ! I'll check on the zlib module then try to extract the data – Andi Jan 17 '17 at 04:25