public void Build(List <Waypoint> points) { var group = new ProfileGroup(ProfileName); var wps = ProfileFactory.CreateWithFixedStep(points, StepMeters, SelectedNamingScheme.GetWaypointName); wps.ForEach(p => { WaypointsService.Waypoints.Add(p); group.Children.Add(p); }); GroupsService.Groups.Add(group); }
public void Apply() { var group = new Group(ProfileName); var wps = ProfileFactory.CreateWithFixedStep(StartPoint, LengthMeters, StepMeters, AngleDeg / 180.0 * Math.PI, SelectedNamingScheme.GetWaypointName); wps.ForEach(p => { WaypointsService.Waypoints.Add(p); group.Children.Add(p); }); GroupsService.Groups.Add(group); }
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(); }