private CompactionProfileResult <CompactionProfileVertex> ConvertProfileResult(MemoryStream ms) { log.LogDebug("Converting profile result"); var profileResult = new CompactionProfileResult <CompactionProfileVertex>(); var pdsiProfile = new DesignProfile(); pdsiProfile.ReadFromStream(ms); profileResult.results = pdsiProfile.vertices.ConvertAll(dpv => new CompactionProfileVertex { cellType = dpv.elevation >= VelociraptorConstants.NO_HEIGHT ? ProfileCellType.Gap : ProfileCellType.Edge, elevation = dpv.elevation >= VelociraptorConstants.NO_HEIGHT ? float.NaN : dpv.elevation, station = dpv.station }); profileResult.gridDistanceBetweenProfilePoints = pdsiProfile.GridDistanceBetweenProfilePoints; FixGaps(profileResult.results); return(profileResult); }