private void processAbsLine(string line) { string[] cols = line.Split(LDLSeperators.ABSOLUTE_DATA_COL_SEPERATOR); if (cols.GetUpperBound(0) < 4) { return; } if (cols[0].Trim() != POS_LINE_MARKER) { return; } string nodeStr = cols[1].Trim(); string offsetStr = cols[2].Trim(); string latStr = cols[3].Trim(); string longStr = cols[4].Trim(); double offset = Convert.ToDouble(offsetStr); float lat = float.Parse(latStr); float longitude = float.Parse(longStr); if ((lat == 0) && (longitude == 0)) { return; //quite a lot of items in there without a position? } ILDL_GPSLocated track = GetTrack(nodeStr); if (track == null) { return; } LDLGPSPoint point = new LDLGPSPoint(lat, longitude, offset); track.Locations.Add(point); //absoluteLocations.Add(track); }
private ILDL_GPSLocated GetTrack(string id) { LDLBOBase nodeAsBase; if (parsedObjects.TryGetValue(id, out nodeAsBase)) { ILDL_GPSLocated node = nodeAsBase as ILDL_GPSLocated; return(node); } return(null); }