Exemplo n.º 1
0
        /// <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;
        }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
        /// <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);
        }
Exemplo n.º 4
0
        /// <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;
        }