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

@@ -107,7 +107,7 @@ namespace FarmmapsApi.Services
}
// Create taskmap based on width, height and direction
public async Task<Item> CreateTaskmap(Item cropfieldItem, Item tiffItem, string cellWidth, string cellHeight, string startPoint, string endPoint = null, string angle = null)
public async Task<Item> CreateTaskmap(Item cropfieldItem, Item tiffItem, string cellWidth, string cellHeight, string startPoint, string centered = "false", string endPoint = null, string angle = null)
{
var taskmapRequest = new TaskRequest { TaskType = TASKMAP_TASK };
taskmapRequest.attributes["inputCode"] = tiffItem.Code;
@@ -115,6 +115,7 @@ namespace FarmmapsApi.Services
taskmapRequest.attributes["cellWidth"] = cellWidth; //metres
taskmapRequest.attributes["cellHeight"] = cellHeight; //metres
taskmapRequest.attributes["startPoint"] = startPoint; // Coordinates WGS84
taskmapRequest.attributes["centered"] = centered;
if (angle == null) taskmapRequest.attributes["endPoint"] = endPoint; // Coordinates WGS84
if (endPoint == null) taskmapRequest.attributes["angle"] = angle; // degrees between 0.0 and 360.0