/// <summary> /// Loads Gpx data from a file. /// </summary> /// <param name="path">Path to the GPX file.</param> /// <returns>GpxDocument instance with data from GPX file</returns> public static GpxDocument Load(string path) { GpxDocument result = new GpxDocument(); using (GpxReader reader = new GpxReader(path, new GpxReaderSettings() { ReadMetadata = true })) { result.LoadFromReader(reader); } return result; }
/// <summary> /// Loads Gpx data from IGpxReader /// </summary> /// <param name="reader">The reader to read data from</param> /// <returnsGpxDocument instance eith data from GpxReader></returns> public static GpxDocument Load(IGpxReader reader) { if (reader == null) { throw new ArgumentNullException("reader"); } GpxDocument result = new GpxDocument(); result.LoadFromReader(reader); return(result); }
/// <summary> /// Loads Gpx data from a file. /// </summary> /// <param name="path">Path to the GPX file.</param> /// <returns>GpxDocument instance with data from GPX file</returns> public static GpxDocument Load(string path) { GpxDocument result = new GpxDocument(); using (GpxReader reader = new GpxReader(path, new GpxReaderSettings() { ReadMetadata = true })) { result.LoadFromReader(reader); } return(result); }
/// <summary> /// Loads Gpx data from IGpxReader /// </summary> /// <param name="reader">The reader to read data from</param> /// <returnsGpxDocument instance eith data from GpxReader></returns> public static GpxDocument Load(IGpxReader reader) { if (reader == null) { throw new ArgumentNullException("reader"); } GpxDocument result = new GpxDocument(); result.LoadFromReader(reader); return result; }