You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
853 B
26 lines
853 B
using System;
|
|
|
|
namespace Pingchuan.BeijingSafeguard.Model
|
|
{
|
|
public class RealPoint
|
|
{
|
|
public DateTime DateTime { get; set; }
|
|
public int Height { get; set; }
|
|
public decimal Longitude { get; set; }
|
|
public decimal Latitude { get; set; }
|
|
|
|
public static RealPoint Parse(string row)
|
|
{
|
|
string[] segments = row.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
|
if (segments.Length != 4)
|
|
return null;
|
|
|
|
RealPoint point = new RealPoint();
|
|
point.DateTime = DateTime.ParseExact(segments[0], "yyyy-MM-dd HH:mm", null);
|
|
point.Height = int.Parse(segments[1]);
|
|
point.Longitude = decimal.Parse(segments[2]);
|
|
point.Latitude = decimal.Parse(segments[3]);
|
|
return point;
|
|
}
|
|
}
|
|
}
|
|
|