in reply to Re^2: Geo Package files
in thread Geo Package files

n versus v is determined by the byte order. In the https://libgeos.org/specifications/wkb/ specification mentioned by swl, there is a section on Byte Order which mentions a flag stating the order used, and http://www.geopackage.org/spec120/#gpb_format says this flag is the lowest bit in the "flags" field (second C in the unpack template), so this determines whether to use big-endian (n and N) or big-endian (v and V). Luckily, this flag is a single byte, so that it itself isn't affected by byte-order ;-)

Looking further at the flag byte, I see the the next three bits tell you how many doubles (probably f format, from Perl 5.10 upwards you can distinguish between big-endian "f>" and little-endian "f<") are in the double[] envelope array at the end of the GeoPackageBinaryHeader.

Sorry I'm not really into this, so I can't dive very deep into it. Depending on what information comes up in the discussion, it might trigger me to go looking deeper, but don't bet on it :-)

Replies are listed 'Best First'.
Re^4: Geo Package files
by Marshall (Canon) on Mar 04, 2022 at 22:46 UTC
    Yes, this format tells us at the beginning how to interpret the following bytes. In my post here, we need to know the value of YY, the critical flag byte. I am not sure exactly what that byte says.