On Jan 4, 2008 6:11 PM, Gagan <[EMAIL PROTECTED]> wrote:

>
> New Year Greetings to Everyone...
> I was crunching some numbers after reading this article
> http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf
> Everything fits perfectly fine except one thing ....
>
> In the article it states
>
>
> This turns out to be coordinates for Jefferson city.
>
> cdcc cccc cc05 57c0 – X
>
> Since it is in little endian format so it becomes c05705ccccccccdc which
> is -92.09
>
> cdcc cccc cc4c 4340 - Y
>
> Since it is in little endian format so it becomes 4043 4ccc cccc ccdc
> which is 38.60
>
> I cant seem to figure out how is the conversion of HEX is done to X and Y
> coordinates.
>

The values in the shapefile are in IEEE floating point format.  The easiest
way I could come up with to get them into human-readable form was to
interpret the hex value as a 64-bit integer and pass it to Java's
Double.longBitsToDouble() method to reinterpret the bits as IEEE floating
point.

Eric
_______________________________________________
Geowanking mailing list
[email protected]
http://lists.burri.to/mailman/listinfo/geowanking

Reply via email to