protected override void ReadSections(BinaryReaderWriter br) { // --------- Dateiabschnitte für die Rohdaten bilden --------- Filesections.AddSection((int)InternalFileSections.Mdr1, new DataBlockWithRecordsize(Mdr1)); Filesections.AddSection((int)InternalFileSections.Mdr2, new DataBlockWithRecordsize(Mdr2)); Filesections.AddSection((int)InternalFileSections.Mdr3, new DataBlockWithRecordsize(Mdr3)); Filesections.AddSection((int)InternalFileSections.Mdr4, new DataBlockWithRecordsize(Mdr4)); Filesections.AddSection((int)InternalFileSections.Mdr5, new DataBlockWithRecordsize(Mdr5)); Filesections.AddSection((int)InternalFileSections.Mdr6, new DataBlockWithRecordsize(Mdr6)); Filesections.AddSection((int)InternalFileSections.Mdr7, new DataBlockWithRecordsize(Mdr7)); Filesections.AddSection((int)InternalFileSections.Mdr8, new DataBlockWithRecordsize(Mdr8)); Filesections.AddSection((int)InternalFileSections.Mdr9, new DataBlockWithRecordsize(Mdr9)); Filesections.AddSection((int)InternalFileSections.Mdr10, new DataBlock(Mdr10)); Filesections.AddSection((int)InternalFileSections.Mdr11, new DataBlockWithRecordsize(Mdr11)); Filesections.AddSection((int)InternalFileSections.Mdr12, new DataBlockWithRecordsize(Mdr12)); Filesections.AddSection((int)InternalFileSections.Mdr13, new DataBlockWithRecordsize(Mdr13)); Filesections.AddSection((int)InternalFileSections.Mdr14, new DataBlockWithRecordsize(Mdr14)); Filesections.AddSection((int)InternalFileSections.Mdr15, new DataBlock(Mdr15)); Filesections.AddSection((int)InternalFileSections.Mdr16, new DataBlockWithRecordsize(Mdr16)); Filesections.AddSection((int)InternalFileSections.Mdr17, new DataBlock(Mdr17)); Filesections.AddSection((int)InternalFileSections.Mdr18, new DataBlockWithRecordsize(Mdr18)); // GapOffset und DataOffset setzen SetSpecialOffsetsFromSections((int)InternalFileSections.PostHeaderData); if (GapOffset > HeaderOffset + Headerlength) // nur möglich, wenn extern z.B. auf den nächsten Header gesetzt { PostHeaderDataBlock = new DataBlock(HeaderOffset + Headerlength, GapOffset - (HeaderOffset + Headerlength)); Filesections.AddSection((int)InternalFileSections.PostHeaderData, PostHeaderDataBlock); } // Datenblöcke einlesen Filesections.ReadSections(br); }
void Decode_ContentsBlock(BinaryReaderWriter br, DataBlock block) { if (br != null && block != null && block.Length > 0) { br.Seek(block.Offset); DescriptionBlock = new DataBlock(br); CharacterLookupTableBlock = new DataBlock(br); Filesections.AddSection((int)InternalFileSections.DescriptionBlock, DescriptionBlock); Filesections.AddSection((int)InternalFileSections.CharacterLookupTableBlock, CharacterLookupTableBlock); } }
protected override void ReadSections(BinaryReaderWriter br) { // --------- Dateiabschnitte für die Rohdaten bilden --------- // der gesamte Rest der Datei sind MAR-Daten Filesections.AddSection((int)InternalFileSections.RawData, new DataBlock(DataOffset, (uint)br.Length - DataOffset)); if (GapOffset > HeaderOffset + Headerlength) // nur möglich, wenn extern z.B. auf den nächsten Header gesetzt { Filesections.AddSection((int)InternalFileSections.PostHeaderData, HeaderOffset + Headerlength, GapOffset - (HeaderOffset + Headerlength)); } // Datenblöcke einlesen Filesections.ReadSections(br); SetSpecialOffsetsFromSections((int)InternalFileSections.PostHeaderData); }
protected override void ReadSections(BinaryReaderWriter br) { // --------- Dateiabschnitte für die Rohdaten bilden --------- Filesections.AddSection((int)InternalFileSections.Nod1, Nod1Nodes); Filesections.AddSection((int)InternalFileSections.Nod2, Nod2RoadData); Filesections.AddSection((int)InternalFileSections.Nod3, Nod3BoundaryNodes); Filesections.AddSection((int)InternalFileSections.Nod4, Nod4HighClassBoundary); Filesections.AddSection((int)InternalFileSections.Nod5, Nod5); Filesections.AddSection((int)InternalFileSections.Nod6, Nod6); if (GapOffset > HeaderOffset + Headerlength) // nur möglich, wenn extern z.B. auf den nächsten Header gesetzt { Filesections.AddSection((int)InternalFileSections.PostHeaderData, HeaderOffset + Headerlength, GapOffset - (HeaderOffset + Headerlength)); } // Datenblöcke einlesen Filesections.ReadSections(br); SetSpecialOffsetsFromSections((int)InternalFileSections.PostHeaderData); }
protected override void ReadSections(BinaryReaderWriter br) { // --------- Dateiabschnitte für die Rohdaten bilden (nur NT) --------- Filesections.AddSection((int)InternalFileSections.NT_PointDatablock, new DataBlock(NT_PointDatablock)); Filesections.AddSection((int)InternalFileSections.NT_PointDatabtable, new DataBlock(NT_PointTableBlock)); Filesections.AddSection((int)InternalFileSections.NT_PointLabelblock, new DataBlock(NT_PointLabelblock)); Filesections.AddSection((int)InternalFileSections.NT_LabelblockTable1, new DataBlock(NT_LabelblockTable1)); Filesections.AddSection((int)InternalFileSections.NT_LabelblockTable2, new DataBlock(NT_LabelblockTable2)); if (GapOffset > HeaderOffset + Headerlength) // nur möglich, wenn extern z.B. auf den nächsten Header gesetzt { Filesections.AddSection((int)InternalFileSections.PostHeaderData, HeaderOffset + Headerlength, GapOffset - (HeaderOffset + Headerlength)); } // Datenblöcke einlesen Filesections.ReadSections(br); SetSpecialOffsetsFromSections((int)InternalFileSections.PostHeaderData); br.SetEncoding(Codepage); }
protected override void ReadSections(BinaryReaderWriter br) { // --------- Dateiabschnitte für die Rohdaten bilden --------- Filesections.AddSection((int)InternalFileSections.ContentsBlock, new DataBlock(ContentsBlock)); // GapOffset und DataOffset setzen SetSpecialOffsetsFromSections((int)InternalFileSections.PostHeaderData); if (GapOffset > HeaderOffset + Headerlength) // nur möglich, wenn extern z.B. auf den nächsten Header gesetzt { PostHeaderDataBlock = new DataBlock(HeaderOffset + Headerlength, GapOffset - (HeaderOffset + Headerlength)); Filesections.AddSection((int)InternalFileSections.PostHeaderData, PostHeaderDataBlock); } // Datenblöcke einlesen Filesections.ReadSections(br); // Pos. der anderen beiden Datenblöcke ermitteln ... Decode_ContentsBlock(Filesections.GetSectionDataReader((int)InternalFileSections.ContentsBlock), new DataBlock(0, Filesections.GetLength((int)InternalFileSections.ContentsBlock))); // ... und einlesen Filesections.Read((int)InternalFileSections.DescriptionBlock, br); Filesections.Read((int)InternalFileSections.CharacterLookupTableBlock, br); }