update poten app with centered and countPerArea

This commit is contained in:
Riepma
2021-03-01 16:31:31 +01:00
parent 3ad594d83f
commit 39a2024718
6 changed files with 29 additions and 10 deletions

View File

@@ -58,6 +58,7 @@ namespace FarmmapsVRApoten
var variation = input.Variation;
var fieldName = input.FieldName;
bool useShadow = input.UseShadow;
bool countPerArea = input.CountPerArea;
var myDrive = roots.SingleOrDefault(r => r.Name == "My drive");
if (myDrive == null) {
@@ -156,7 +157,7 @@ namespace FarmmapsVRApoten
// INPUT IS NEEDED as GEOTIFF
var applianceMapItem =
await _potenService.CalculateApplicationMapAsync(cropfieldItem, geotiffItem, meanDensity, variation);
await _potenService.CalculateApplicationMapAsync(cropfieldItem, geotiffItem, meanDensity, variation, countPerArea);
if (applianceMapItem == null) {
return;
@@ -174,8 +175,8 @@ namespace FarmmapsVRApoten
//GEOTIFF TO Taskmap
_logger.LogInformation($"Converting geotiff to taskmap");
var taskmap = await _generalService.CreateTaskmap(cropfieldItem, applianceMapItem, input.CellWidth, input.CellHeight, input.StartPoint.ToString(Formatting.None),
input.EndPoint.ToString(Formatting.None), input.Angle);
var taskmap = await _generalService.CreateTaskmap(cropfieldItem, applianceMapItem, input.CellWidth, input.CellHeight, input.StartPoint.ToString(Formatting.None),
input.Centered, input.EndPoint.ToString(Formatting.None), input.Angle);
if (taskmap == null)
{
_logger.LogError("Something went wrong with geotiff to taskmap transformation");