Example #1
0
        private static void AreEqual(XmlNode tlgNode, string currentPath, OperationData operationData)
        {
            var isoSpatialRecords = GetIsoSpatialRecords(tlgNode.Attributes["A"].Value, currentPath).ToList();
            var adaptSpatialRecords = operationData.GetSpatialRecords().ToList();

            var sections = operationData.GetAllSections();
            var meters = sections.SelectMany(x => x.GetWorkingDatas()).ToList();

            SpatialRecordAssert.AreEqual(isoSpatialRecords, adaptSpatialRecords, meters);
        }
Example #2
0
        private TLG Map(OperationData operationData, string taskDataPath, TaskDocumentWriter taskDocumentWriter)
        {
            var tlgId = operationData.Id.FindIsoId() ?? "TLG" + operationData.Id.ReferenceId;
            taskDocumentWriter.Ids.Add(tlgId, operationData.Id);

            var tlg = new TLG { A = tlgId};
            var sections = operationData.GetAllSections();
            var meters = sections.SelectMany(x => x.GetWorkingDatas()).ToList();
            var spatialRecords = operationData.GetSpatialRecords != null ? operationData.GetSpatialRecords() : null;

            var timHeader = _timHeaderMapper.Map(meters);
            _xmlReader.WriteTlgXmlData(taskDataPath, tlg.A + ".xml", timHeader);

            var binFilePath = Path.Combine(taskDataPath, tlg.A + ".bin");
            _binaryWriter.Write(binFilePath, meters, spatialRecords);

            return tlg;
        }