forked from ddrilling/AsbCloudServer
Проверка, что точек при построении траектории должно быть минимум 2
This commit is contained in:
parent
a1b4b1b9bb
commit
b659cbc934
@ -3,6 +3,7 @@ using AsbCloudApp.Repositories;
|
|||||||
using AsbCloudApp.Services;
|
using AsbCloudApp.Services;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@ -46,6 +47,9 @@ namespace AsbCloudInfrastructure.Services.Trajectory
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private List<TrajectoryVisualizationDto> GetTrajectoryVisualisation(TrajectoryDto[] geoCoordinates)
|
private List<TrajectoryVisualizationDto> GetTrajectoryVisualisation(TrajectoryDto[] geoCoordinates)
|
||||||
{
|
{
|
||||||
|
if(geoCoordinates.Length < 2)
|
||||||
|
return new List<TrajectoryVisualizationDto>();
|
||||||
|
|
||||||
var cartesianCoordinates = new List<TrajectoryVisualizationDto>(geoCoordinates.Length) {
|
var cartesianCoordinates = new List<TrajectoryVisualizationDto>(geoCoordinates.Length) {
|
||||||
new (),
|
new (),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user