added inputLayerName to CreateTaskmap

This commit is contained in:
Mark van der Wal 2021-07-01 12:54:06 +02:00
parent 6a3baeb8ad
commit fa2075cbc6
2 changed files with 4 additions and 3 deletions

View File

@ -119,13 +119,14 @@ namespace FarmmapsApi.Services
// Create taskmap based on width, height and direction // Create taskmap based on width, height and direction
public async Task<Item> CreateTaskmap(Item cropfieldItem, Item tiffItem, string outputType, string cellWidth, string cellHeight, public async Task<Item> CreateTaskmap(Item cropfieldItem, Item tiffItem, string outputType, string cellWidth, string cellHeight,
string startPoint, string ddiCode = "0001", string centered = "false", string endPoint = null, string angle = null, string precision = null, string startPoint, string inputLayerName = null, string ddiCode = "0001", string centered = "false", string endPoint = null, string angle = null, string precision = null,
string cropTypeName = null, string costumerName = null, string ProductGroupName = null, string productName = null, string cropTypeName = null, string costumerName = null, string ProductGroupName = null, string productName = null,
string resolution = "3", string unitScale = null, string maximumClasses = null) string resolution = "3", string unitScale = null, string maximumClasses = null)
{ {
var taskmapRequest = new TaskRequest { TaskType = TASKMAP_TASK }; var taskmapRequest = new TaskRequest { TaskType = TASKMAP_TASK };
taskmapRequest.attributes["inputLayerName"] = inputLayerName;
taskmapRequest.attributes["inputCode"] = tiffItem.Code; taskmapRequest.attributes["inputCode"] = tiffItem.Code;
taskmapRequest.attributes["operation"] = outputType; // Currently onlye "shape" supported, if ISOXML is supported this should be an input taskmapRequest.attributes["operation"] = outputType; // Currently onlye "shape" supported, if ISOXML is supported this should be an input
taskmapRequest.attributes["cellWidth"] = cellWidth; //metres taskmapRequest.attributes["cellWidth"] = cellWidth; //metres

View File

@ -289,7 +289,7 @@ namespace FarmmapsNbs
} }
taskmap = await _generalService.CreateTaskmap(cropfieldItem: cropfieldItem, tiffItem: applianceMapItem, outputType: input.OutputType, cellWidth: input.CellWidth, taskmap = await _generalService.CreateTaskmap(cropfieldItem: cropfieldItem, tiffItem: applianceMapItem, outputType: input.OutputType, cellWidth: input.CellWidth,
cellHeight: input.CellHeight, startPoint: input.StartPoint.ToString(Formatting.None), ddiCode: input.DdiCode, centered: input.Centered, cellHeight: input.CellHeight, startPoint: input.StartPoint.ToString(Formatting.None), inputLayerName: input.InputLayerName, ddiCode: input.DdiCode, centered: input.Centered,
endPoint: input.EndPoint.ToString(Formatting.None), angle: input.Angle, precision: input.Precision, endPoint: input.EndPoint.ToString(Formatting.None), angle: input.Angle, precision: input.Precision,
cropTypeName: null, costumerName: null, ProductGroupName: null, productName: null, resolution: null, unitScale: null, maximumClasses: input.MaximumClasses); cropTypeName: null, costumerName: null, ProductGroupName: null, productName: null, resolution: null, unitScale: null, maximumClasses: input.MaximumClasses);
@ -297,7 +297,7 @@ namespace FarmmapsNbs
else else
{ {
taskmap = await _generalService.CreateTaskmap(cropfieldItem: cropfieldItem, tiffItem: applianceMapItem, outputType: input.OutputType, cellWidth: input.CellWidth, taskmap = await _generalService.CreateTaskmap(cropfieldItem: cropfieldItem, tiffItem: applianceMapItem, outputType: input.OutputType, cellWidth: input.CellWidth,
cellHeight: input.CellHeight, startPoint: input.StartPoint.ToString(Formatting.None), centered: input.Centered, cellHeight: input.CellHeight, startPoint: input.StartPoint.ToString(Formatting.None), inputLayerName: input.InputLayerName, centered: input.Centered,
endPoint: input.EndPoint.ToString(Formatting.None), angle: input.Angle, precision: input.Precision, maximumClasses: input.MaximumClasses); endPoint: input.EndPoint.ToString(Formatting.None), angle: input.Angle, precision: input.Precision, maximumClasses: input.MaximumClasses);
} }