[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [DebianGIS] problem with gdalinfo



On 11/24/05, Didrik Pinte <dpinte@itae.be> wrote:
> Hi Frank,
>
> I've checked everything carrefully :
>
> [1] I've tested the data set after a "dos2unix -a *" on the original
> data,. It gives the same error.

Didrik,

You cannot dos2unix to undo the damage of a unix to dos
file conversion on a binary file.

> Then i've tried the same on the other sens "dos2unix -ua *" on the
> original data giving the following :

I have run things in the debugger and examined the file
w001001x.adf file, and conclusively determined that the
file has been through unix2dos conversion, corrupting it.

The header looks like:


       0: 0000270D 0AFFFFFC 14000000 00000000 ~~'~~~~~~~~~~~~~
      16: 00000000 00000000 00000012 1EE80300 ~~~~~~~~~~~~~~~~
      32: 00050000 0076F3BD 1BCA871E 410000A8 ~~~~~v~~~~~~A~~~
      48: 758F154F 41BB19A3 0E695621 410040BD u~~OA~~~~iV!A~@~

The 0D0A at offset byte 3 should just be 0A, and is the result
of text translation somewhere.   If you compare the lengths of
the binary files between your linux and win32 system I suspect
they will be a few bytes different.

In any event, you need to retransfer the data from windows to
unix carefully.  I suggest you avoid ftp'ing it, or at least be
careful to put things in binary mode.

I sympathize with how easy it is for this to happen, but
I have been receiving bug reports for well over a decade
with folks accidentally applying dos/unix text conversion to
binary files, and I am getting a bit weary about it.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



Reply to: