switcher dataset explorer

lat lon -> geopoint
correct location for gps if small keypoints number
This commit is contained in:
Alex Bezdieniezhnykh
2025-06-23 20:47:28 +03:00
parent c5e72669c5
commit 253f811125
31 changed files with 469 additions and 192 deletions
+12 -14
View File
@@ -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;
}