Skip to main content
Question

I have some raw binary files from a multibeam sonar system, I would like to try and read the header information out of these files.

  • September 5, 2018
  • 5 replies
  • 158 views

I thought I could use the data file input and a binary decoder, but I need some help!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • September 5, 2018
A sample of the file would probably help.

 

 


  • Author
  • 5 replies
  • September 5, 2018

Here is a small sample file!

0090-20171026-222219-fk171005-em302.zip


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • September 5, 2018

There are a couple of different things you can do.

 

If you know the structure of the file, I highly recommend the FileRawDataFetcher custom transformer.

 

For example an interpretation specifier of '22, string(9);32,string(7)' would return

 

_rawdata{0}.value' has value `WLZ=0.566'

 

_rawdata{1}.value' has value `SMH=105

 

or

'26, string(5);36,string(3)' would return

 

`_rawdata{0}.value' has value `0.566'

 

`_rawdata{1}.value' has value `105'

 

and you could rename _rawdata{0} to WLZ and _rawdata{1} to SMH

If you don't, assuming the header information you want is all on line one, you could use the DataFile reader, set the Max Features to Read to 1 and then use an AttributeSplitter (,) on the data_file_data, which would return

 

`_list{0}' has value 'b????I.É3ñÌZ??i??????WLZ=0.566'

 

`_list{1}' has value `SMH=105'

 

`_list{2}' has value `STC=0'

 

etc.

You would need to cleanup the first and last elements of the list


Forum|alt.badge.img
  • 29 replies
  • September 6, 2018

Hi , there are a couple of ways on how to extract data and by viewing the supplied file i would select to the simplest; read it as a csv file and select to read only the first line. Then u would get a complete list of the header data:

The u can select which element to extract or explode all elements to unique features etc.

regards

andre


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2940 replies
  • November 13, 2018

There are a couple of different things you can do.

 

If you know the structure of the file, I highly recommend the FileRawDataFetcher custom transformer.

 

For example an interpretation specifier of '22, string(9);32,string(7)' would return

 

_rawdata{0}.value' has value `WLZ=0.566'

 

_rawdata{1}.value' has value `SMH=105

 

or

'26, string(5);36,string(3)' would return

 

`_rawdata{0}.value' has value `0.566'

 

`_rawdata{1}.value' has value `105'

 

and you could rename _rawdata{0} to WLZ and _rawdata{1} to SMH

If you don't, assuming the header information you want is all on line one, you could use the DataFile reader, set the Max Features to Read to 1 and then use an AttributeSplitter (,) on the data_file_data, which would return

 

`_list{0}' has value 'b????I.É3ñÌZ??i??????WLZ=0.566'

 

`_list{1}' has value `SMH=105'

 

`_list{2}' has value `STC=0'

 

etc.

You would need to cleanup the first and last elements of the list

Learned something new today, thanks @jdh!