Minor, but this repeated `axisOrientation` dependent point serialization code could go in its own function.