Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Hex dump (was: Re^6: Geo Package files)

by pryrt (Abbot)
on Mar 11, 2022 at 20:49 UTC ( [id://11142010]=note: print w/replies, xml ) Need Help??


in reply to Hex dump (was: Re^6: Geo Package files)
in thread Geo Package files

At least the envelope on that one makes more sense.

I get a decoding of the first 8 bites plus envelope of:

0x4750 v=0 f=00000101 srsid=27700 envelope#2 -> 6 elements, mode=little-endian => 'd<6' 339881.51, 340581.897, 442566.608999999, 443257.832, 0, 0
And the minx,miny are smaller than maxx,maxy -- so whether that's a good thing or not, I don't know.

The main takeaways of my input is that you need to use the < for litte-endian and > for big-endian, and that way you won't be guessing in the future whether your system and/or perl have native big- or little-endianness. (Also, even if you'll always be on the same processor, having those directions explicit in the code will make future development/maintenance so much easier.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11142010]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-20 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found