<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.2.5">
</HEAD>
<BODY>
In your example the input should be a (double)longitude followed by a (double)<BR>
latitude (both in local binary).<BR>
<BR>
An example I often use in checking projections is where the data is passed<BR>
by binary through a pipe:<BR>
<BR>
proj +proj=test [+other_opts] -o | proj +proj=test [+other_opts] -I -i<BR>
<BR>
where the sysin input to the first program is ASCII, the output piped to the second is<BR>
binary and input to the second which sysout's ASCII.<BR>
<BR>
Note that proj uses<BR>
<BR>
fread(&amp;data, sizeof(UV), 1, fid)<BR>
<BR>
for binary input and equivalent fwrite for binary output where<BR>
<BR>
typedef struct { double u, v; } UV;<BR>
<BR>
Unless order flipping options are used, u=longitude and v=latitude.<BR>
<BR>
On Fri, 2005-08-19 at 10:39 -0700, pw wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hello,</FONT>

<FONT COLOR="#000000">The documentation for proj states binary input is</FONT>
<FONT COLOR="#000000">expected to be system byte order and double.</FONT>

<FONT COLOR="#000000">I am getting invalid results with binary</FONT>
<FONT COLOR="#000000">input, yet if I manually enter lonlats asking</FONT>
<FONT COLOR="#000000">for binary output I get the expected output.</FONT>

<FONT COLOR="#000000">Right my data is double precision floating point (64bit)</FONT>
<FONT COLOR="#000000">organized as a series of lonlats (x then y).</FONT>

<FONT COLOR="#000000">Byte order appears to be OK since the program chokes if I</FONT>
<FONT COLOR="#000000">reverse the byte order.</FONT>

<FONT COLOR="#000000">What format does my binary input file (binary_file.bin)</FONT>
<FONT COLOR="#000000">need to be in for the following  conversion?</FONT>

<FONT COLOR="#000000">proj +proj=utm +zone=18 +ellps=WGS84 -i binary_file.bin</FONT>
</PRE>
</BLOCKQUOTE>
        ...<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
-- 
_____________________________________________________________
Jerry and the Low Riders: Daisy Mae and Joshua
&quot;The most certain test by which we judge whether a country is
really free is the amount of security enjoyed by minorities&quot;
---Lord Acton, 1907 
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>