It turns out that geometry storage is mixed endian; some parts of the file are big-endian, but most are little-endian. The shapefile standard is described here.
Is there an obvious reason for performance, or is it just due to historical background? If so, do you happen to know what that historical background is?
The integers and double-precision integers that make up the data description fields in the
file header (identified below) and record contents in the main file are in little endian (PC or Intel®) byte order. The integers and double-precision floating point numbers that make up the rest of the file and file management are in big endian (Sun® or Motorola®) byte
order.
I am writing a parser for the most common types of geographic data storage, which is a set of Is a “shapefile” file. This is my first project and I had to consider the endianness.
It turns out that the geometry storage is mixed endian; some parts of the file It is big-endian, but most of it is little-endian. The shapefile standard is described here.
Is there an obvious reason for performance, or is it just due to historical background? If so, do you happen to know what that historical background is?
The integers and double-precision integers that make up the data description fields in the
file header (identified below) and record contents in the main file are in little endian (PC or Intel®) byte order. The integers and double-precision floating point numbers that make up the rest of the file and file management are in big endian (Sun® or Motorola®) byte
order.
Although there does not seem to be a clear answer, what I see is ” A mixture of “confusion when trying to create a format that works on all platforms” and “many badly designed formats designed at the time”… More information: https://gis.stackexchange.com/questions/18969/oddities-in -the-shapefile-technical-specification