private UserHeaderLabel ReadUHL(BinaryReader br) { char[] header = br.ReadChars(4); if (new string(header) != "UHL1") throw new Exception("Wrong UHL header"); UserHeaderLabel uhl = new UserHeaderLabel(); uhl.Longitude = ReadGeoAngle(br, 3, 2); uhl.Latitude = ReadGeoAngle(br, 3, 2); uhl.LonInterval = ReadInterval(br); uhl.LatInterval = ReadInterval(br); char[] accuracy = br.ReadChars(4); char[] classification = br.ReadChars(3); char[] uniqueRef = br.ReadChars(12); uhl.Accuracy = new string(accuracy); uhl.Classification = new string(classification); uhl.UniqueRef = new string(uniqueRef); uhl.LongitudeLines = ReadInt(br, 4); uhl.LatitudePoints = ReadInt(br, 4); uhl.MultipleAccuracy = br.ReadChar() == '1'; char[] reserved = br.ReadChars(24); return uhl; }
public void Read(Stream input) { using (BinaryReader br = new BinaryReader(input)) { m_uhl = ReadUHL(br); ReadDSI(br); ReadACC(br); ReadElevationData(br); } }