[gdal-dev] ARM platform compatibility

Adriano C Naspolini adriano at arvus.com.br
Mon Feb 16 13:53:35 EST 2009


Hi,
I developed an application and it runs perfectly over X86. However, when 
i try to run it on ARM it stops reading shapefiles (actually it reads 
wrong coordinates). I wrote a simple program to tell just the first 
"point" coordinates.

On X86:
x=: -53.1275 y= -31.8682

On ARM:
x=: -1.00226e-13 y= -1.76938e+52


Looking for the problem here, i found a thread from Etienne Dube on 
(2004-04-07 05:12:55 GMT), saying it's a byte ordering problem.
"Each 32-bit word in the 64-bit double value is stored little-endian, 
but the most significative 32-bit word comes last in memory 
("big-wordian")."

Changing the word-order for the first feature inside the ".shp" ("11 36 
3c bd 52 90 4a c0" to "52 90 4a c0 11 36 3c bd") and running it again:

under X86:
x=: -1.00226e-13 y= -31.8682

under ARM
x=: -53.1275 y= -1.76938e+52

So, clearly, i have the same problem then Etienne. He sent a patch, but 
didn't made many tests...
Is there a "final"solution for the problem? I couldn't see any answer to 
him.

Regards,

Adriano


More information about the gdal-dev mailing list