Exemple #1
0
 public TranslatedChanges Translate(ZipArchiveEntry entry, IEnumerator <ShapeRecord> records, TranslatedChanges changes)
 {
     if (entry == null)
     {
         throw new ArgumentNullException(nameof(entry));
     }
     if (records == null)
     {
         throw new ArgumentNullException(nameof(records));
     }
     if (changes == null)
     {
         throw new ArgumentNullException(nameof(changes));
     }
     while (records.MoveNext())
     {
         var record = records.Current;
         if (record != null && record.Content is PolyLineMShapeContent content)
         {
             if (changes.TryTranslateToRoadSegmentId(record.Header.RecordNumber, out var id))
             {
                 if (changes.TryFindAddRoadSegment(id, out var change))
                 {
                     changes = changes.Replace(change, change.WithGeometry(GeometryTranslator.ToGeometryMultiLineString(content.Shape)));
                 }
             }
         }
     }
     return(changes);
 }