[Geowanking] ESRI Shapefile pdf document

Eric Fischer enf at pobox.com
Fri Jan 4 18:21:50 PST 2008


On Jan 4, 2008 6:11 PM, Gagan <gaganarora23 at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geowanking.org/pipermail/geowanking_geowanking.org/attachments/20080104/f4f2220f/attachment-0003.html>


More information about the Geowanking mailing list