Runs but broken
This commit is contained in:
@ -245,7 +245,7 @@ internal abstract class Location
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static List<Models.Location> GetLocations(List<LocationContainer> locationContainers, List<Models.Face> faces, List<MappingFromPhotoPrism> mappingFromPhotoPrismCollection, float rectangleIntersectMinimum)
|
||||
internal static List<Models.Location> GetLocations(List<Models.Face> faces, List<MappingFromPhotoPrism> mappingFromPhotoPrismCollection, float rectangleIntersectMinimum)
|
||||
{
|
||||
List<Models.Location> results = [];
|
||||
bool any;
|
||||
@ -266,12 +266,6 @@ internal abstract class Location
|
||||
outputResolution ??= face.OutputResolution;
|
||||
}
|
||||
int before = results.Count;
|
||||
foreach (LocationContainer locationContainer in locationContainers)
|
||||
{
|
||||
if (locationContainer.Location is null)
|
||||
continue;
|
||||
results.Add(locationContainer.Location);
|
||||
}
|
||||
foreach (MappingFromPhotoPrism mappingFromPhotoPrism in mappingFromPhotoPrismCollection)
|
||||
{
|
||||
if (outputResolution is null)
|
||||
@ -289,19 +283,6 @@ internal abstract class Location
|
||||
location = GetLocation(mappingFromPhotoPrism.DatabaseFile, marker, prismRectangle.Value);
|
||||
if (location is null)
|
||||
break;
|
||||
foreach (LocationContainer locationContainer in locationContainers)
|
||||
{
|
||||
if (any)
|
||||
continue;
|
||||
if (locationContainer.Rectangle is null)
|
||||
continue;
|
||||
percent = GetIntersectPercent(prismRectangle.Value, prismArea, locationContainer.Rectangle.Value);
|
||||
if (percent is null || percent < rectangleIntersectMinimum)
|
||||
continue;
|
||||
if (!any)
|
||||
any = true;
|
||||
break;
|
||||
}
|
||||
foreach (Models.Face face in faces)
|
||||
{
|
||||
if (any)
|
||||
@ -329,7 +310,7 @@ internal abstract class Location
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static List<Models.Face> FilterByIntersect(Models.Face[] faces, float rectangleIntersectMinimum, int wholePercentages)
|
||||
internal static List<Models.Face> FilterByIntersect(List<Models.Face> faces, float rectangleIntersectMinimum, int wholePercentages)
|
||||
{
|
||||
List<Models.Face> results = [];
|
||||
float? percent;
|
||||
|
Reference in New Issue
Block a user