mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 12:36:31 +00:00
switcher dataset explorer
lat lon -> geopoint correct location for gps if small keypoints number
This commit is contained in:
@@ -18,17 +18,16 @@ public interface IGpsMatcherClient : IDisposable
|
||||
|
||||
public class StartMatchingEvent
|
||||
{
|
||||
public string RouteDir { get; set; } = null!;
|
||||
public string SatelliteImagesDir { get; set; } = null!;
|
||||
public int ImagesCount { get; set; }
|
||||
public double Latitude { get; set; }
|
||||
public double Longitude { get; set; }
|
||||
public int Altitude { get; set; } = 400;
|
||||
public double CameraSensorWidth { get; set; } = 23.5;
|
||||
public double CameraFocalLength { get; set; } = 24;
|
||||
public string RouteDir { get; set; } = null!;
|
||||
public string SatelliteImagesDir { get; set; } = null!;
|
||||
public int ImagesCount { get; set; }
|
||||
public GeoPoint GeoPoint { get; set; } = null!;
|
||||
public int Altitude { get; set; } = 400;
|
||||
public double CameraSensorWidth { get; set; } = 23.5;
|
||||
public double CameraFocalLength { get; set; } = 24;
|
||||
|
||||
public override string ToString() =>
|
||||
$"{RouteDir},{SatelliteImagesDir},{ImagesCount},{Latitude},{Longitude},{Altitude},{CameraSensorWidth},{CameraFocalLength}";
|
||||
$"{RouteDir},{SatelliteImagesDir},{ImagesCount},{GeoPoint.Lat},{GeoPoint.Lon},{Altitude},{CameraSensorWidth},{CameraFocalLength}";
|
||||
}
|
||||
|
||||
public class GpsMatcherClient : IGpsMatcherClient
|
||||
@@ -59,7 +58,6 @@ public class GpsMatcherClient : IGpsMatcherClient
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, e.ToString());
|
||||
throw;
|
||||
}
|
||||
|
||||
_requestAddress = $"tcp://{gpsConfig.Value.ZeroMqHost}:{gpsConfig.Value.ZeroMqPort}";
|
||||
@@ -93,7 +91,7 @@ public class GpsMatcherClient : IGpsMatcherClient
|
||||
break;
|
||||
default:
|
||||
var parts = str.Split(',');
|
||||
if (parts.Length != 5)
|
||||
if (parts.Length != 6)
|
||||
throw new Exception("Matching Result Failed");
|
||||
|
||||
var filename = Path.GetFileNameWithoutExtension(parts[1]);
|
||||
@@ -101,9 +99,9 @@ public class GpsMatcherClient : IGpsMatcherClient
|
||||
{
|
||||
Index = int.Parse(parts[0]),
|
||||
Image = filename,
|
||||
Latitude = double.Parse(parts[2]),
|
||||
Longitude = double.Parse(parts[3]),
|
||||
MatchType = parts[4]
|
||||
GeoPoint = new GeoPoint(double.Parse(parts[2]), double.Parse(parts[3])),
|
||||
KeyPoints = int.Parse(parts[4]),
|
||||
MatchType = Enum.TryParse<MatchTypeEnum>(parts[5], out var type) ? type : MatchTypeEnum.None
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user