comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Binary file with different DATA_TYPES
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Binary file with different DATA_TYPES [message #47040] Mon, 16 January 2006 19:15
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
rafaloos@gmail.com writes:

> Is there a way to open a BINARY file specifying different types of data
> ?
> I know that the binary file contains information such as "easting",
> "northing", "altitude" and four other different fields ...
> The problem is that the first 3 fields are formated as LONG data ...
> the 4th field is unsigned integer ... the 5th is a string and 6th and
> 7th fields double.
> I tried with READ_BINARY but it only allows me to specify one
> "DATA_TYPE" ... If I try with long the first 3 fields work fine but not
> the other ones ...
> What should I do ?

I would try creating a template of the data that is in
your file with BINARY_TEMPLATE. Then pass that template
to READ_BINARY. The only tricky thing is knowing how many
bytes your string is.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Binary file with different DATA_TYPES
Next Topic: Re: landscan data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 05:59:06 PDT 2025

Total time taken to generate the page: 1.52222 seconds