From 7c5bbf0fbe4decd9c0645cd5e8ee54bbf67f6d69 Mon Sep 17 00:00:00 2001 From: Sijbrandij Date: Wed, 9 Jun 2021 11:53:14 +0200 Subject: [PATCH] small update for finding shape taskmap --- FarmmapsApi/Services/GeneralService.cs | 6 +- FarmmapsNbs/NitrogenInput.json | 2 +- FarmmapsPoten/PotenInput.json | 92 +++++++++++++------------- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/FarmmapsApi/Services/GeneralService.cs b/FarmmapsApi/Services/GeneralService.cs index dd2a637..98199a4 100644 --- a/FarmmapsApi/Services/GeneralService.cs +++ b/FarmmapsApi/Services/GeneralService.cs @@ -167,7 +167,7 @@ namespace FarmmapsApi.Services else if (outputType== "shape") { taskMapItem = await FindChildItemAsync(tiffItem.ParentCode, - SHAPE_PROCESSED_ITEMTYPE, itemName); + SHAPE_PROCESSED_ITEMTYPE, outputType); } else { @@ -178,7 +178,7 @@ namespace FarmmapsApi.Services if (taskMapItem == null) { - _logger.LogError("Could not find the shape/isoxml taskmap as a child item under the input"); + _logger.LogError("Could not find the shape/isoxml taskmap as a child item under the cropfield"); return null; } @@ -218,7 +218,7 @@ namespace FarmmapsApi.Services dataItem = uploadedFilesChildren.FirstOrDefault(func); if (dataItem != null || tries == maxTries) { source.Cancel(); - } + } tries++; }); diff --git a/FarmmapsNbs/NitrogenInput.json b/FarmmapsNbs/NitrogenInput.json index 064956d..559db17 100644 --- a/FarmmapsNbs/NitrogenInput.json +++ b/FarmmapsNbs/NitrogenInput.json @@ -62,7 +62,7 @@ //}, { - "UseCreatedCropfield": true, + "UseCreatedCropfield": false, "file": "", // keep emptpy to use satellite image "inputVariable": "wdvi", "InputLayerName": "wdvi", diff --git a/FarmmapsPoten/PotenInput.json b/FarmmapsPoten/PotenInput.json index 6753abd..ef46910 100644 --- a/FarmmapsPoten/PotenInput.json +++ b/FarmmapsPoten/PotenInput.json @@ -1,53 +1,53 @@ [ - { - "File": "PlantingSampleDataLutumANDec.zip", - "InputLayerName": "EC0-60", - "OutputFileName": "2021.05.11_vraPoten_SampleDataMultipleLayers", - "FieldName": "lutum", - "PlantingYear": 2021, - "MeanDensity": "30", - "Variation": "20", - "UseShadow": false, - "CountPerArea": true, // don't forget to change ddi if isoxml is created - "geometryJson": { - "type": "Polygon", - "coordinates": [ - [ - [ 5.66886041703652044, 52.52929999060298627 ], - [ 5.6716230923214912, 52.52946316399909676 ], - [ 5.67185376229668581, 52.5280565894154563 ], - [ 5.66903207841337231, 52.52790646510525363 ], - [ 5.66886041703652044, 52.52929999060298627 ] - ] - ] - }, + { + "File": "PlantingSampleDataLutum.zip", + //"InputLayerName": "EC0-60", + "OutputFileName": "2021.06.09_vraPoten_SampleData", + "FieldName": "lutum", + "PlantingYear": 2021, + "MeanDensity": "30", + "Variation": "20", + "UseShadow": false, + "CountPerArea": true, // don't forget to change ddi if isoxml is created + "geometryJson": { + "type": "Polygon", + "coordinates": [ + [ + [ 5.66886041703652044, 52.52929999060298627 ], + [ 5.6716230923214912, 52.52946316399909676 ], + [ 5.67185376229668581, 52.5280565894154563 ], + [ 5.66903207841337231, 52.52790646510525363 ], + [ 5.66886041703652044, 52.52929999060298627 ] + ] + ] + }, - "GenerateTaskmap": true, - "OutputType": "isoxml", // "shape" or "isoxml" if isoxml also add ddiCode - "Precision": "2", - "MaximumClasses": "5", - "DdiCode": "0016", - "CellWidth": "3", - "CellHeight": "10", - "Centered": "true", - "StartPoint": { - "type": "Point", - //"coordinates": [ 5.66886041703652044, 52.52929999060298627 ] // 1 - //"coordinates": [ 5.6716230923214912, 52.52946316399909676 ] // 2 - //"coordinates": [ 5.67185376229668581, 52.5280565894154563 ] // 3 - "coordinates": [ 5.66903207841337231, 52.52790646510525363 ] // 4 - }, - "EndPoint": { - "type": "Point", - "coordinates": [ 5.66886041703652044, 52.52929999060298627 ] // 1 - //"coordinates": [ 5.6716230923214912, 52.52946316399909676 ] // 2 - //"coordinates": [ 5.67185376229668581, 52.5280565894154563 ] // 3 - //"coordinates": [ 5.66903207841337231, 52.52790646510525363 ] // 4 - } // if no angle + "GenerateTaskmap": true, + "OutputType": "shape", // "shape" or "isoxml" if isoxml also add ddiCode + "Precision": "2", + "MaximumClasses": "5", + "DdiCode": "0016", // DDI 0011 for count per area; DDI 0016 for distance (CM) + "CellWidth": "3", + "CellHeight": "10", + "Centered": "true", + "StartPoint": { + "type": "Point", + //"coordinates": [ 5.66886041703652044, 52.52929999060298627 ] // 1 + //"coordinates": [ 5.6716230923214912, 52.52946316399909676 ] // 2 + //"coordinates": [ 5.67185376229668581, 52.5280565894154563 ] // 3 + "coordinates": [ 5.66903207841337231, 52.52790646510525363 ] // 4 + }, + "EndPoint": { + "type": "Point", + "coordinates": [ 5.66886041703652044, 52.52929999060298627 ] // 1 + //"coordinates": [ 5.6716230923214912, 52.52946316399909676 ] // 2 + //"coordinates": [ 5.67185376229668581, 52.5280565894154563 ] // 3 + //"coordinates": [ 5.66903207841337231, 52.52790646510525363 ] // 4 + } // if no angle - //"Angle": "317.0" // if no endpoint - } + //"Angle": "317.0" // if no endpoint + } ]