Exemple #1
0
 private async Task Export(MemoryActivity activity)
 {
     using (var output = await TestFileHelper.OpenForWriteAsync(GetExportedFileName()))
     {
         var exporter = new GpxExporter(activity);
         await exporter.SaveAsync(output);
     }
 }
Exemple #2
0
        static void Main(string[] args)
        {
            var inputFile  = @"C:\Users\Епишкин Дмитрий\Desktop\ВЛУ\keyPoints3.gpx";
            var outputFile = @"C:\Users\Епишкин Дмитрий\Desktop\ВЛУ\000.gpx";

            var importer = new GpxImporter();
            var exporter = new GpxExporter();

            var keyPoints = importer.ImportWaypoints(inputFile);

            var profile = ProfileFactory.CreateWithFixedStep(keyPoints, 200, i => "000-" + (i + 1).ToString("D3"));

            //var profile = GridFactory.CreateRectangle(keyPoints[0], 500, 100, 10000, 5000, Math.PI / 4);

            exporter.ExportWaypoints(outputFile, profile);

            System.Console.WriteLine(@"Готово");
            System.Console.ReadKey();
        }
        /// <summary>
        /// Exports the QuickRouteJpegExtensionData object to a GPX file.
        /// </summary>
        /// <param name="stream">The stream to export the gpx file to.backbuffer</param>
        public void ToGpx(Stream stream)
        {
            var gpxExporter = new GpxExporter(Sessions[0], stream);

            gpxExporter.Export();
        }