From 3ad594d83fe1cf1114914e9d1d8bb315f4b0247a Mon Sep 17 00:00:00 2001 From: Riepma Date: Tue, 16 Feb 2021 09:46:50 +0100 Subject: [PATCH] Created separate project for areaConversion VRA poten Updated VRA poten sample code --- FarmmapsPoten/FarmmapsPoten.csproj | 3 + FarmmapsPoten/Models/PotenInput.cs | 3 +- FarmmapsPoten/PotenApplication.cs | 27 +- FarmmapsPoten/PotenInput.json | 5 +- FarmmapsPoten/PotenService.cs | 59 +--- .../Data/PlantingSampleDataLutum.json | 302 ++++++++++++++++++ .../Data/PlantingSampleDataLutum.zip | Bin 0 -> 5865 bytes .../FarmmapsPoten_AVRapi.csproj | 24 ++ FarmmapsPoten_AVRapi/Models/PotenInputAVR.cs | 27 ++ FarmmapsPoten_AVRapi/PotenApplicationAVR.cs | 228 +++++++++++++ FarmmapsPoten_AVRapi/PotenInputAVR.json | 41 +++ FarmmapsPoten_AVRapi/PotenServiceAVR.cs | 120 +++++++ FarmmapsPoten_AVRapi/Program.cs | 23 ++ FarmmapsPoten_AVRapi/appsettings.json | 10 + 14 files changed, 783 insertions(+), 89 deletions(-) create mode 100644 FarmmapsPoten_AVRapi/Data/PlantingSampleDataLutum.json create mode 100644 FarmmapsPoten_AVRapi/Data/PlantingSampleDataLutum.zip create mode 100644 FarmmapsPoten_AVRapi/FarmmapsPoten_AVRapi.csproj create mode 100644 FarmmapsPoten_AVRapi/Models/PotenInputAVR.cs create mode 100644 FarmmapsPoten_AVRapi/PotenApplicationAVR.cs create mode 100644 FarmmapsPoten_AVRapi/PotenInputAVR.json create mode 100644 FarmmapsPoten_AVRapi/PotenServiceAVR.cs create mode 100644 FarmmapsPoten_AVRapi/Program.cs create mode 100644 FarmmapsPoten_AVRapi/appsettings.json diff --git a/FarmmapsPoten/FarmmapsPoten.csproj b/FarmmapsPoten/FarmmapsPoten.csproj index f76d9da..fd6dc18 100644 --- a/FarmmapsPoten/FarmmapsPoten.csproj +++ b/FarmmapsPoten/FarmmapsPoten.csproj @@ -12,6 +12,9 @@ Always + + PreserveNewest + diff --git a/FarmmapsPoten/Models/PotenInput.cs b/FarmmapsPoten/Models/PotenInput.cs index dc97b6b..52bda2d 100644 --- a/FarmmapsPoten/Models/PotenInput.cs +++ b/FarmmapsPoten/Models/PotenInput.cs @@ -5,6 +5,7 @@ namespace FarmmapsPoten.Models { public class PotenInput { + public string File { get; set; } public string OutputFileName { get; set; } public string FieldName { get; set; } @@ -12,8 +13,6 @@ namespace FarmmapsPoten.Models public string MeanDensity { get; set; } public string Variation { get; set; } public bool UseShadow { get; set; } - public bool ConvertToCountPerArea { get; set; } - public float Rijbreedte_m { get; set; } public JObject GeometryJson { get; set; } public bool GenerateTaskmap { get; set; } diff --git a/FarmmapsPoten/PotenApplication.cs b/FarmmapsPoten/PotenApplication.cs index b3dad38..637b9c3 100644 --- a/FarmmapsPoten/PotenApplication.cs +++ b/FarmmapsPoten/PotenApplication.cs @@ -58,8 +58,6 @@ namespace FarmmapsVRApoten var variation = input.Variation; var fieldName = input.FieldName; bool useShadow = input.UseShadow; - bool convertToCountPerArea = input.ConvertToCountPerArea; - float rijBreedte_m = input.Rijbreedte_m; var myDrive = roots.SingleOrDefault(r => r.Name == "My drive"); if (myDrive == null) { @@ -93,18 +91,6 @@ namespace FarmmapsVRApoten Path.Combine(DownloadFolder, $"{input.OutputFileName}.shadow.zip")); } - //Calculating AHN map - _logger.LogInformation("retreiving AHN map for field"); - var AHNItem = await _generalService.RunAhnTask(cropfieldItem); - if (AHNItem == null) - { - _logger.LogError("Something went wrong while obtaining the AHN map"); - return; - } - _logger.LogInformation("Downloading AHN map"); - await _farmmapsApiService.DownloadItemAsync(AHNItem.Code, - Path.Combine(DownloadFolder, $"{input.OutputFileName}_AHN.zip")); - _logger.LogInformation("Looking for local data to use"); var localDataAvailable = input.File; @@ -185,23 +171,14 @@ namespace FarmmapsVRApoten ? "Download application map completed." : "Something went wrong while downloading."); - - // if convertToCountPerArea == True, than recalculate pootafstand in cm to # of poters/m2 from the geotiffItem with the use of the zoneringsTask - if (convertToCountPerArea) - { - applianceMapItem = - await _potenService.ConvertToCountPerAreaTroughZonering(cropfieldItem, applianceMapItem, input.Rijbreedte_m); - - } - //GEOTIFF TO Taskmap _logger.LogInformation($"Converting geotiff to taskmap"); - var taskmap = await _generalService.CreateTaskmap(applianceMapItem, input.CellWidth, input.CellHeight, input.StartPoint.ToString(Formatting.None), + var taskmap = await _generalService.CreateTaskmap(cropfieldItem, applianceMapItem, input.CellWidth, input.CellHeight, input.StartPoint.ToString(Formatting.None), input.EndPoint.ToString(Formatting.None), input.Angle); if (taskmap == null) { - _logger.LogError("Something went wrong with geotiff to shape transformation"); + _logger.LogError("Something went wrong with geotiff to taskmap transformation"); return; } diff --git a/FarmmapsPoten/PotenInput.json b/FarmmapsPoten/PotenInput.json index 7fb8b26..70691fd 100644 --- a/FarmmapsPoten/PotenInput.json +++ b/FarmmapsPoten/PotenInput.json @@ -1,15 +1,12 @@ [ { "File": "PlantingSampleDataLutum.zip", - //"File": "Lutum_SampleDataPlanting.zip", - "OutputFileName": "20210212_vraPoten_SampleData_TASKMAP_ENDPOINT", + "OutputFileName": "20210216_vraPoten_SampleData", "FieldName": "lutum", "PlantingYear": 2020, "MeanDensity": "30", "Variation": "20", "UseShadow": false, - "ConvertToCountPerArea": false, - "Rijbreedte_m": 0.75, "geometryJson": { "type": "Polygon", "coordinates": [ diff --git a/FarmmapsPoten/PotenService.cs b/FarmmapsPoten/PotenService.cs index c77f393..02acda9 100644 --- a/FarmmapsPoten/PotenService.cs +++ b/FarmmapsPoten/PotenService.cs @@ -25,24 +25,13 @@ namespace FarmmapsVRApoten _generalService = generalService; } - public async Task CalculateApplicationMapAsync(Item cropfieldItem, Item inputItem,string meanDensity, string variation) + public async Task CalculateApplicationMapAsync(Item cropfieldItem, Item inputItem, string meanDensity, string variation) { var potenApplicationMapRequest = new TaskRequest() { TaskType = VRAPLANTING_TASK }; if (inputItem != null) {potenApplicationMapRequest.attributes["inputCode"] = inputItem.Code; } potenApplicationMapRequest.attributes["meanDensity"] = meanDensity; potenApplicationMapRequest.attributes["variation"] = variation; - //var taskCode = await _farmmapsApiService.QueueTaskAsync(cropfieldItem.Code, potenApplicationMapRequest); - //await PollTask(TimeSpan.FromSeconds(3), async (tokenSource) => - //{ - // _logger.LogInformation("Checking VRAPoten task status"); - // var itemTaskStatus = await _farmmapsApiService.GetTaskStatusAsync(cropfieldItem.Code, taskCode); - // // Code - // if (itemTaskStatus.IsFinished) - // tokenSource.Cancel(); - //}); - - var taskCode = await _farmmapsApiService.QueueTaskAsync(cropfieldItem.Code, potenApplicationMapRequest); _logger.LogInformation($"itemTaskCode: {taskCode}"); @@ -50,8 +39,6 @@ namespace FarmmapsVRApoten _logger.LogInformation($"potenTaskmapRequest type: {potenApplicationMapRequest.TaskType}"); _logger.LogInformation($"cropfieldItemCode: {cropfieldItem.Code}"); - - await PollTask(TimeSpan.FromSeconds(5), async (tokenSource) => { var itemTaskStatus = await _farmmapsApiService.GetTaskStatusAsync(cropfieldItem.Code, taskCode); _logger.LogInformation($"Waiting on calculation of application map; Status: {itemTaskStatus.State}"); @@ -60,7 +47,6 @@ namespace FarmmapsVRApoten }); - var itemTask = await _farmmapsApiService.GetTaskStatusAsync(cropfieldItem.Code, taskCode); if (itemTask.State == ItemTaskState.Error) { @@ -84,49 +70,6 @@ namespace FarmmapsVRApoten } - - // Extra task making use of the zonering task to convert the planting distance in cm to number of seeds per m2 - public async Task ConvertToCountPerAreaTroughZonering(Item cropfieldItem, Item geotiffItem, float rijBreedte_m) - { - var zoneringTaskRequest = new TaskRequest() { TaskType = VRAZONERING_TASK }; - zoneringTaskRequest.attributes["formula"] = $"((100/[0])/{rijBreedte_m.ToString()})"; - zoneringTaskRequest.attributes["output"] = "{\"Name\":\"CountPerAreaConversion\",\"Quantity\":\"CountPerArea\",\"Unit\":\"#/m2\"}"; - zoneringTaskRequest.attributes["inputs"] = $"{{\"ItemCode\":{geotiffItem.Code},\"LayerName\":null\"}}"; - - var taskCode = await _farmmapsApiService.QueueTaskAsync(cropfieldItem.Code, zoneringTaskRequest); - - await PollTask(TimeSpan.FromSeconds(5), async (tokenSource) => - { - var itemTaskStatus = await _farmmapsApiService.GetTaskStatusAsync(cropfieldItem.Code, taskCode); - _logger.LogInformation($"Waiting on convertion to Count per area through zoneringTast; Status: {itemTaskStatus.State}"); - if (itemTaskStatus.IsFinished) - tokenSource.Cancel(); - }); - - var itemTask = await _farmmapsApiService.GetTaskStatusAsync(cropfieldItem.Code, taskCode); - if (itemTask.State == ItemTaskState.Error) - { - _logger.LogError($"Something went wrong with task execution: {itemTask.Message}"); - return null; - } - - var itemName = $"VRAZonering"; - var applianceMapItem = await _generalService.FindChildItemAsync(cropfieldItem.Code, - GEOTIFF_PROCESSED_ITEMTYPE, itemName, - //i => i.Updated >= itemTask.Finished.GetValueOrDefault(DateTime.UtcNow) && - // i.Name.ToLower().Contains(itemName.ToLower())); - i => - i.Name.ToLower().Contains(itemName.ToLower())); - if (applianceMapItem == null) - { - _logger.LogError("Could not find the converted to count per area geotiff child item under cropfield"); - return null; - } - - return applianceMapItem; - } - - } } diff --git a/FarmmapsPoten_AVRapi/Data/PlantingSampleDataLutum.json b/FarmmapsPoten_AVRapi/Data/PlantingSampleDataLutum.json new file mode 100644 index 0000000..7414170 --- /dev/null +++ b/FarmmapsPoten_AVRapi/Data/PlantingSampleDataLutum.json @@ -0,0 +1,302 @@ +{ +"type": "FeatureCollection", +"name": "PlantingSampleDataLutum", +"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, +"features": [ +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669006678383711, 52.529290221274948 ] } }, +{ "type": "Feature", "properties": { "lutum": 13 }, "geometry": { "type": "Point", "coordinates": [ 5.669006104248043, 52.529200349555097 ] } }, +{ "type": "Feature", "properties": { "lutum": 13 }, "geometry": { "type": "Point", "coordinates": [ 5.669005530115061, 52.529110477833399 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669004955984766, 52.529020606109889 ] } }, +{ "type": "Feature", "properties": { "lutum": 13 }, "geometry": { "type": "Point", "coordinates": [ 5.669004381857157, 52.528930734384545 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669003807732236, 52.528840862657354 ] } }, +{ "type": "Feature", "properties": { "lutum": 12 }, "geometry": { "type": "Point", "coordinates": [ 5.66900323361, 52.528750990928309 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669002659490453, 52.528661119197444 ] } }, +{ "type": "Feature", "properties": { "lutum": 14 }, "geometry": { "type": "Point", "coordinates": [ 5.669002085373592, 52.528571247464789 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669001511259415, 52.528481375730252 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669000937147927, 52.528391503993873 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669000363039124, 52.52830163225569 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669154039708354, 52.529289871032709 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669153465272641, 52.529199999313761 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669152890839613, 52.529110127592965 ] } }, +{ "type": "Feature", "properties": { "lutum": 13 }, "geometry": { "type": "Point", "coordinates": [ 5.669152316409275, 52.529020255870378 ] } }, +{ "type": "Feature", "properties": { "lutum": 14 }, "geometry": { "type": "Point", "coordinates": [ 5.669151741981626, 52.528930384145944 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669151167556664, 52.528840512419642 ] } }, +{ "type": "Feature", "properties": { "lutum": 13 }, "geometry": { "type": "Point", "coordinates": [ 5.66915059313439, 52.528750640691563 ] } }, +{ "type": "Feature", "properties": { "lutum": 14 }, "geometry": { "type": "Point", "coordinates": [ 5.669150018714802, 52.528660768961629 ] } }, +{ "type": "Feature", "properties": { "lutum": 13 }, "geometry": { "type": "Point", "coordinates": [ 5.669149444297904, 52.528570897229841 ] } }, +{ "type": "Feature", "properties": { "lutum": 13 }, "geometry": { "type": "Point", "coordinates": [ 5.669148869883696, 52.528481025496269 ] } }, +{ "type": "Feature", "properties": { "lutum": 14 }, "geometry": { "type": "Point", "coordinates": [ 5.669148295472175, 52.528391153760822 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.66914772106334, 52.528301282023527 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669147146657193, 52.528211410284435 ] } }, +{ "type": "Feature", "properties": { "lutum": 14 }, "geometry": { "type": "Point", "coordinates": [ 5.669146572253736, 52.528121538543502 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669145997852967, 52.528031666800764 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669145423454884, 52.527941795056144 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669301401030309, 52.529289520607428 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.66930082629455, 52.52919964888941 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669300251561478, 52.529109777169573 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669299676831097, 52.529019905447882 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669299102103404, 52.528930033724393 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669298527378404, 52.528840161999021 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669297952656091, 52.528750290271873 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669297377936467, 52.528660418542835 ] } }, +{ "type": "Feature", "properties": { "lutum": 14 }, "geometry": { "type": "Point", "coordinates": [ 5.669296803219534, 52.528570546811963 ] } }, +{ "type": "Feature", "properties": { "lutum": 14 }, "geometry": { "type": "Point", "coordinates": [ 5.669296228505289, 52.528480675079251 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669295653793735, 52.528390803344763 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669295079084868, 52.52830093160842 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669294504378692, 52.528211059870216 ] } }, +{ "type": "Feature", "properties": { "lutum": 14 }, "geometry": { "type": "Point", "coordinates": [ 5.669293929675204, 52.528121188130193 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669293354974407, 52.528031316388351 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669292780276298, 52.527941444644689 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669448762349575, 52.529289169999203 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669448187313771, 52.529199298282116 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669447612280653, 52.529109426563181 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.669447037250229, 52.529019554842385 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669446462222496, 52.52892968311982 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669445887197454, 52.528839811395386 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669445312175103, 52.528749939669105 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.669444737155444, 52.528660067941011 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669444162138473, 52.528570196211071 ] } }, +{ "type": "Feature", "properties": { "lutum": 15 }, "geometry": { "type": "Point", "coordinates": [ 5.669443587124193, 52.528480324479311 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669443012112604, 52.528390452745711 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669442437103707, 52.528300581010306 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669441862097501, 52.528210709273012 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669441287093983, 52.52812083753394 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669440712093158, 52.528030965793008 ] } }, +{ "type": "Feature", "properties": { "lutum": 16 }, "geometry": { "type": "Point", "coordinates": [ 5.669440137095023, 52.527941094050242 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669596123666151, 52.529288819207963 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.6695955483303, 52.5291989474918 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669594972997138, 52.529109075773768 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669594397666672, 52.529019204053945 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669593822338896, 52.52892933233224 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.669593247013813, 52.528839460608751 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669592671691423, 52.528749588883372 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669592096371725, 52.528659717156224 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.66959152105472, 52.528569845427207 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669590945740404, 52.528479973696371 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669590370428786, 52.528390101963666 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669589795119855, 52.528300230229171 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669589219813616, 52.528210358492849 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669588644510072, 52.528120486754638 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669588069209219, 52.52803061501465 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.669587493911057, 52.527940743272772 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669743484980033, 52.52928846823373 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.669742909344135, 52.529198596518491 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669742333710931, 52.529108724801389 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669741758080422, 52.529018853082476 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669741182452603, 52.528928981361695 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.669740606827482, 52.528839109639122 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.669740031205053, 52.528749237914688 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.669739455585318, 52.528659366188421 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669738879968274, 52.528569494460349 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669738304353925, 52.528479622730416 ] } }, +{ "type": "Feature", "properties": { "lutum": 17 }, "geometry": { "type": "Point", "coordinates": [ 5.66973772874227, 52.528389750998656 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.66973715313331, 52.528299879265084 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669736577527043, 52.528210007529651 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.669736001923469, 52.528120135792392 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669735426322587, 52.528030264053307 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669890846291222, 52.529288117076518 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.669890270355278, 52.529198245362174 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.669889694422031, 52.529108373646018 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669889118491477, 52.529018501928007 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.669888542563618, 52.528928630208178 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.669887966638455, 52.528838758486494 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.669887390715987, 52.528748886762969 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.669886814796213, 52.528659015037654 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669886238879136, 52.528569143310477 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669885662964753, 52.528479271581489 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669885087053065, 52.528389399850646 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669884511144072, 52.528299528117998 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.669883935237774, 52.528209656383481 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.66988335933417, 52.528119784647131 ] } }, +{ "type": "Feature", "properties": { "lutum": 18 }, "geometry": { "type": "Point", "coordinates": [ 5.669882783433263, 52.528029912908977 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.670038207599717, 52.529287765736285 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.670037631363726, 52.529197894022879 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670037055130432, 52.529108022307639 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.670036478899838, 52.529018150590574 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.670035902671936, 52.528928278871632 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.670035326446734, 52.528838407150914 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.670034750224229, 52.528748535428306 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.670034174004417, 52.528658663703865 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.670033597787302, 52.528568791977627 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.670033021572887, 52.528478920249526 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670032445361164, 52.528389048519642 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.670031869152139, 52.528299176787897 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.670031292945811, 52.528209305054318 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.670030716742176, 52.528119433318885 ] } }, +{ "type": "Feature", "properties": { "lutum": 19 }, "geometry": { "type": "Point", "coordinates": [ 5.670030140541242, 52.52802956158164 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.670186145444245, 52.529377285923772 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.670185568905514, 52.52928741421308 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.670184992369477, 52.52919754250059 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.670184415836139, 52.529107670786267 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.670183839305502, 52.529017799070111 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.670183262777561, 52.528927927352115 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.670182686252317, 52.528838055632299 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.670182109729772, 52.528748183910643 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.670181533209922, 52.52865831218714 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670180956692772, 52.528568440461825 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.670180380178322, 52.528478568734663 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670179803666567, 52.52838869700566 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670179227157511, 52.528298825274803 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.670178650651151, 52.528208953542183 ] } }, +{ "type": "Feature", "properties": { "lutum": 20 }, "geometry": { "type": "Point", "coordinates": [ 5.67017807414749, 52.528119081807688 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.670177497646527, 52.528029210071367 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.670333507047393, 52.529376934216629 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670332930208612, 52.529287062506896 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670332353372531, 52.529197190795308 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670331776539151, 52.52910731908193 ] } }, +{ "type": "Feature", "properties": { "lutum": 21 }, "geometry": { "type": "Point", "coordinates": [ 5.670331199708469, 52.529017447366684 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670330622880485, 52.528927575649611 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670330046055202, 52.528837703930698 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670329469232617, 52.528747832209973 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670328892412731, 52.528657960487401 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670328315595544, 52.528568088762988 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.67032773878106, 52.528478217036756 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670327161969271, 52.528388345308677 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670326585160184, 52.528298473578765 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670326008353794, 52.52820860184702 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.670325431550103, 52.528118730113469 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670324854749113, 52.528028858378079 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.67048086864784, 52.529376582326506 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670480291509012, 52.529286710617704 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670479714372884, 52.529196838907055 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670479137239461, 52.529106967194558 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670478560108735, 52.529017095480263 ] } }, +{ "type": "Feature", "properties": { "lutum": 22 }, "geometry": { "type": "Point", "coordinates": [ 5.670477982980711, 52.5289272237641 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670477405855387, 52.528837352046096 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670476828732764, 52.528747480326295 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.67047625161284, 52.528657608604661 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670475674495618, 52.528567736881193 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670475097381098, 52.528477865155843 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670474520269277, 52.528387993428701 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670473943160156, 52.528298121699713 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670473366053738, 52.52820824996892 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670472788950019, 52.528118378236279 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670472211849, 52.528028506501805 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.670628230245586, 52.529376230253412 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.670627652806711, 52.529286358545527 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670627075370538, 52.529196486835779 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670626497937069, 52.529106615124242 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670625920506301, 52.52901674341085 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670625343078235, 52.528926871695603 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.670624765652872, 52.528836999978552 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670624188230208, 52.528747128259667 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670623610810248, 52.528657256538921 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.670623033392991, 52.528567384816377 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.670622455978436, 52.528477513091964 ] } }, +{ "type": "Feature", "properties": { "lutum": 23 }, "geometry": { "type": "Point", "coordinates": [ 5.670621878566583, 52.528387641365747 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670621301157429, 52.52829776963771 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.67062072375098, 52.528207897907812 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670620146347232, 52.528118026176088 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670619568946186, 52.528028154442524 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670775591840631, 52.529375877997303 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670775014101707, 52.529286006290334 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670774436365489, 52.529196134581525 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670773858631976, 52.529106262870911 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.670773280901165, 52.52901639115845 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670772703173058, 52.52892651944412 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670772125447654, 52.528836647727985 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.670771547724952, 52.528746776010017 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670770970004954, 52.528656904290216 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670770392287662, 52.528567032568581 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.670769814573072, 52.528477160845142 ] } }, +{ "type": "Feature", "properties": { "lutum": 24 }, "geometry": { "type": "Point", "coordinates": [ 5.670769236861187, 52.528387289119834 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670768659152, 52.528297417392693 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670768081445522, 52.528207545663754 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670767503741745, 52.528117673932925 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670766926040671, 52.528027802200249 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.67092295343297, 52.529375525558216 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.670922375394001, 52.52928565385217 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.670921797357738, 52.529195782144292 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.670921219324179, 52.529105910434581 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.670920641293326, 52.529016038723007 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670920063265176, 52.528926167009637 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.670919485239732, 52.528836295294447 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670918907216992, 52.52874642357736 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670918329196958, 52.528656551858511 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670917751179629, 52.528566680137807 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.670917173165005, 52.52847680841527 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670916595153083, 52.528386936690872 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.67091601714387, 52.528297064964669 ] } }, +{ "type": "Feature", "properties": { "lutum": 25 }, "geometry": { "type": "Point", "coordinates": [ 5.670915439137358, 52.528207193236646 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.670914861133554, 52.528117321506784 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.670914283132454, 52.528027449775095 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.671070315022605, 52.529375172936099 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.671069736683591, 52.529285301230992 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.671069158347279, 52.529195429524037 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.671068580013677, 52.529105557815264 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.671068001682782, 52.529015686104621 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.671067423354591, 52.52892581439216 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.671066845029107, 52.528835942677908 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.67106626670633, 52.528746070961773 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.671065688386258, 52.528656199243834 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.671065110068891, 52.528566327524032 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.671064531754232, 52.528476455802441 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.67106395344228, 52.528386584078959 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.671063375133032, 52.528296712353679 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.671062796826493, 52.528206840626574 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.671062218522659, 52.528116968897628 ] } }, +{ "type": "Feature", "properties": { "lutum": 26 }, "geometry": { "type": "Point", "coordinates": [ 5.671061640221531, 52.528027097166849 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.671217676609535, 52.529374820131018 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671217097970472, 52.52928494842682 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.671216519334117, 52.529195076720818 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671215940700469, 52.529105205012932 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.67121536206953, 52.529015333303256 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.671214783441298, 52.52892546159174 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671214204815774, 52.528835589878348 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.67121362619296, 52.528745718163179 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.671213047572849, 52.528655846446135 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671212468955447, 52.528565974727286 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.671211890340752, 52.528476103006554 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671211311728769, 52.52838623128406 ] } }, +{ "type": "Feature", "properties": { "lutum": 27 }, "geometry": { "type": "Point", "coordinates": [ 5.67121073311949, 52.528296359559697 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671210154512919, 52.528206487833543 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.671209575909057, 52.528116616105528 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671208997307901, 52.528026744375651 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.671365038193755, 52.529374467142929 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.671364459254646, 52.529284595439655 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.671363880318245, 52.529194723734562 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.671363301384553, 52.529104852027658 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.671362722453573, 52.529014980318877 ] } }, +{ "type": "Feature", "properties": { "lutum": 28 }, "geometry": { "type": "Point", "coordinates": [ 5.671362143525299, 52.528925108608256 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671361564599734, 52.528835236895866 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671360985676879, 52.528745365181578 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.671360406756732, 52.528655493465472 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.671359827839296, 52.528565621747525 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.671359248924568, 52.528475750027788 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.671358670012548, 52.528385878306167 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.671358091103239, 52.528296006582757 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.671357512196637, 52.528206134857442 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671356933292747, 52.528116263130357 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.671512399775269, 52.529374113971883 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.671511820536112, 52.529284242269519 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671511241299665, 52.529194370565364 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.67151066206593, 52.52910449885934 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.671510082834905, 52.529014627151504 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.67150950360659, 52.528924755441842 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.671508924380984, 52.528834883730326 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.671508345158092, 52.528745012016955 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671507765937908, 52.528655140301815 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.671507186720435, 52.528565268584806 ] } }, +{ "type": "Feature", "properties": { "lutum": 33 }, "geometry": { "type": "Point", "coordinates": [ 5.671506607505673, 52.528475396865979 ] } }, +{ "type": "Feature", "properties": { "lutum": 33 }, "geometry": { "type": "Point", "coordinates": [ 5.671506028293621, 52.528385525145282 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.67150544908428, 52.528295653422774 ] } }, +{ "type": "Feature", "properties": { "lutum": 29 }, "geometry": { "type": "Point", "coordinates": [ 5.671504869877649, 52.52820578169846 ] } }, +{ "type": "Feature", "properties": { "lutum": 33 }, "geometry": { "type": "Point", "coordinates": [ 5.671504290673729, 52.528115909972264 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.671658602278375, 52.52919401721315 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.671658022744594, 52.529104145508029 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.671657443213525, 52.529014273801138 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.67165686368517, 52.528924402092414 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.671656284159525, 52.52883453038185 ] } }, +{ "type": "Feature", "properties": { "lutum": 34 }, "geometry": { "type": "Point", "coordinates": [ 5.671655704636593, 52.528744658669403 ] } }, +{ "type": "Feature", "properties": { "lutum": 34 }, "geometry": { "type": "Point", "coordinates": [ 5.671655125116374, 52.528654786955173 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671654545598865, 52.528564915239095 ] } }, +{ "type": "Feature", "properties": { "lutum": 31 }, "geometry": { "type": "Point", "coordinates": [ 5.671653966084067, 52.528475043521155 ] } }, +{ "type": "Feature", "properties": { "lutum": 30 }, "geometry": { "type": "Point", "coordinates": [ 5.671653386571983, 52.528385171801425 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.67165280706261, 52.528295300079861 ] } }, +{ "type": "Feature", "properties": { "lutum": 32 }, "geometry": { "type": "Point", "coordinates": [ 5.67165222755595, 52.528205428356415 ] } }, +{ "type": "Feature", "properties": { "lutum": 33 }, "geometry": { "type": "Point", "coordinates": [ 5.671651648051999, 52.528115556631185 ] } }, +{ "type": "Feature", "properties": { "lutum": 34 }, "geometry": { "type": "Point", "coordinates": [ 5.671800165038228, 52.528294946553906 ] } }, +{ "type": "Feature", "properties": { "lutum": 33 }, "geometry": { "type": "Point", "coordinates": [ 5.671799585231536, 52.528205074831419 ] } }, +{ "type": "Feature", "properties": { "lutum": 34 }, "geometry": { "type": "Point", "coordinates": [ 5.671799005427561, 52.528115203107113 ] } } +] +} diff --git a/FarmmapsPoten_AVRapi/Data/PlantingSampleDataLutum.zip b/FarmmapsPoten_AVRapi/Data/PlantingSampleDataLutum.zip new file mode 100644 index 0000000000000000000000000000000000000000..2c83115cb64bab668290cae81db59ccfceafedec GIT binary patch literal 5865 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 L2ZfRr{x$m_igikE literal 0 HcmV?d00001 diff --git a/FarmmapsPoten_AVRapi/FarmmapsPoten_AVRapi.csproj b/FarmmapsPoten_AVRapi/FarmmapsPoten_AVRapi.csproj new file mode 100644 index 0000000..edb3d3c --- /dev/null +++ b/FarmmapsPoten_AVRapi/FarmmapsPoten_AVRapi.csproj @@ -0,0 +1,24 @@ + + + + Exe + netcoreapp3.1 + + + + + Always + + + Always + + + PreserveNewest + + + + + + + + diff --git a/FarmmapsPoten_AVRapi/Models/PotenInputAVR.cs b/FarmmapsPoten_AVRapi/Models/PotenInputAVR.cs new file mode 100644 index 0000000..0bb2876 --- /dev/null +++ b/FarmmapsPoten_AVRapi/Models/PotenInputAVR.cs @@ -0,0 +1,27 @@ +using System; +using Newtonsoft.Json.Linq; + +namespace FarmmapsPoten_AVRapi.Models +{ + public class PotenInputAVR + { + public string File { get; set; } + public string OutputFileName { get; set; } + public string FieldName { get; set; } + public int PlantingYear { get; set; } + public string MeanDensity { get; set; } + public string Variation { get; set; } + public bool UseShadow { get; set; } + public bool ConvertToCountPerArea { get; set; } + public string Rijbreedte_m { get; set; } + public JObject GeometryJson { get; set; } + + public bool GenerateTaskmap { get; set; } + public string CellWidth { get; set; } + public string CellHeight { get; set; } + public JObject StartPoint { get; set; } + public JObject EndPoint { get; set; } + public string Angle { get; set; } + + } +} \ No newline at end of file diff --git a/FarmmapsPoten_AVRapi/PotenApplicationAVR.cs b/FarmmapsPoten_AVRapi/PotenApplicationAVR.cs new file mode 100644 index 0000000..295ad21 --- /dev/null +++ b/FarmmapsPoten_AVRapi/PotenApplicationAVR.cs @@ -0,0 +1,228 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using FarmmapsApi; +using FarmmapsApi.Models; +using FarmmapsApi.Services; +using FarmmapsPoten_AVRapi.Models; +using Microsoft.Extensions.Logging; +using Newtonsoft.Json; +using static FarmmapsApiSamples.Constants; + + +namespace FarmmapsVRApoten +{ + public class PotenApplicationAVR : IApplication + { + private const string DownloadFolder = "Downloads"; + + private readonly ILogger _logger; + private readonly FarmmapsApiService _farmmapsApiService; + private readonly PotenServiceAVR _potenService; + private readonly GeneralService _generalService; + + + public PotenApplicationAVR(ILogger logger, FarmmapsApiService farmmapsApiService, + GeneralService generalService, PotenServiceAVR potenService) + { + _logger = logger; + _farmmapsApiService = farmmapsApiService; + _generalService = generalService; + _potenService = potenService; + } + + public async Task RunAsync() + { + // read field data from separate json file + var VRAPotenInputJson = File.ReadAllText("PotenInputAVR.json"); + List potenInputs = JsonConvert.DeserializeObject>(VRAPotenInputJson); + + + if (!Directory.Exists(DownloadFolder)) + Directory.CreateDirectory(DownloadFolder); + + // !! this call is needed the first time an api is called with a fresh clientid and secret !! + await _farmmapsApiService.GetCurrentUserCodeAsync(); + var roots = await _farmmapsApiService.GetCurrentUserRootsAsync(); + + foreach (var input in potenInputs) + { + try + { + await Process(roots, input); + } + catch (Exception ex) + { + _logger.LogError(ex.Message); + } + } + } + + private async Task Process(List roots, PotenInputAVR input) + { + var meanDensity = input.MeanDensity; + var variation = input.Variation; + var fieldName = input.FieldName; + bool useShadow = input.UseShadow; + bool convertToCountPerArea = input.ConvertToCountPerArea; + string rijBreedte_m = input.Rijbreedte_m; + + var myDrive = roots.SingleOrDefault(r => r.Name == "My drive"); + if (myDrive == null) + { + _logger.LogError("Could not find a needed root item"); + return; + } + + var uploadedRoot = roots.SingleOrDefault(r => r.Name == "Uploaded"); + if (uploadedRoot == null) + { + _logger.LogError("Could not find a needed root item"); + return; + } + + _logger.LogInformation("Creating cropfield"); + + var cropfieldItem = await _generalService.CreateCropfieldItemAsync(myDrive.Code, + $"VRA Poten cropfield {input.OutputFileName}", input.PlantingYear, + input.GeometryJson.ToString(Formatting.None)); + + //Calculating shadow map + if (useShadow) + { + _logger.LogInformation("Calculate shadow map for field"); + var shadowItem = await _generalService.RunShadowTask(cropfieldItem); + if (shadowItem == null) + { + _logger.LogError("Something went wrong while obtaining the shadow map"); + return; + } + + _logger.LogInformation("Downloading shadow map"); + await _farmmapsApiService.DownloadItemAsync(shadowItem.Code, + Path.Combine(DownloadFolder, $"{input.OutputFileName}.shadow.zip")); + } + + _logger.LogInformation("Looking for local data to use"); + var localDataAvailable = input.File; + var geotiffItem = (Item)null; + + + if (String.IsNullOrEmpty(localDataAvailable)) + { + _logger.LogInformation("Could not find item for uploaded data, using BOFEK"); + + //Retreiving BOFEK + _logger.LogInformation("Get BOFEK for field"); + var bofekItem = await _generalService.RunBofekTask(cropfieldItem); + if (bofekItem == null) + { + _logger.LogError("Something went wrong while obtaining the BOFEK data"); + return; + } + + _logger.LogInformation("Downloading Bofek map"); + await _farmmapsApiService.DownloadItemAsync(bofekItem.Code, + Path.Combine(DownloadFolder, $"{input.OutputFileName}.BOFEK.zip")); + } + else if (input.File.Contains(".tif") || input.File.Contains(".geotiff")) + { + _logger.LogInformation("input = tiff data"); + var dataPath = Path.Combine("Data", input.File); + geotiffItem = await _generalService.UploadDataAsync(uploadedRoot, GEOTIFF_PROCESSED_ITEMTYPE, dataPath, + Path.GetFileNameWithoutExtension(input.File)); + + if (geotiffItem == null) + { + _logger.LogError("Could not find item for uploaded data"); + return; + } + } + else + { + var isGeoJson = input.File.Contains("json"); + var dataPath = Path.Combine("Data", input.File); + var shapeItem = isGeoJson + ? await _generalService.UploadDataAsync(uploadedRoot, SHAPE_PROCESSED_ITEMTYPE, dataPath, + Path.GetFileNameWithoutExtension(input.File)) + : await _generalService.UploadZipWithShapeAsync(uploadedRoot, dataPath, + Path.GetFileNameWithoutExtension(input.File)); + + if (shapeItem == null) + { + _logger.LogError("Something went wrong while searching for the shape file"); + return; + } + + // transform shape to geotiff as VRA poten only supports tiff input item + _logger.LogInformation($"Converting shape to geotiff"); + + geotiffItem = await _generalService.ShapeToGeotiff(shapeItem); + if (geotiffItem == null) + { + _logger.LogError("Something went wrong with shape to geotiff transformation"); + return; + } + + _logger.LogInformation("Downloading geotiff file"); + await _farmmapsApiService.DownloadItemAsync(geotiffItem.Code, + Path.Combine(DownloadFolder, $"VRApoten_inputGeotiff_{input.OutputFileName}.zip")); + } + + + + // create appliance map + _logger.LogInformation("Calculating application map"); + + // INPUT IS NEEDED as GEOTIFF + var applianceMapItem = + await _potenService.CalculateApplicationMapAsync(cropfieldItem, geotiffItem, meanDensity, variation); + + if (applianceMapItem == null) + { + return; + } + + _logger.LogInformation("Downloading application map"); + await _farmmapsApiService.DownloadItemAsync(applianceMapItem.Code, + Path.Combine(DownloadFolder, $"VRApoten_appliancemap_{input.OutputFileName}.zip")); + + string finalOutput = Path.Combine(DownloadFolder, $"VRApoten_appliancemap_{input.OutputFileName}.zip"); + _logger.LogInformation(File.Exists(finalOutput) + ? "Download application map completed." + : "Something went wrong while downloading."); + + + // if convertToCountPerArea == True, than recalculate pootafstand in cm to # of poters/m2 from the geotiffItem with the use of the zoneringsTask + if (convertToCountPerArea) + { + applianceMapItem = + await _potenService.ConvertToCountPerAreaTroughZonering(cropfieldItem, applianceMapItem, input.Rijbreedte_m); + + } + + + //Appliancemap (GEOTIFF) TO Taskmap + if (input.GenerateTaskmap == true) + { + _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); + if (taskmap == null) + { + _logger.LogError("Something went wrong with geotiff to shape transformation"); + return; + } + + + _logger.LogInformation("Downloading taskmap"); + await _farmmapsApiService.DownloadItemAsync(taskmap.Code, + Path.Combine(DownloadFolder, $"VRApoten_taskmap_{input.OutputFileName}.zip")); + } + + + } + } +} \ No newline at end of file diff --git a/FarmmapsPoten_AVRapi/PotenInputAVR.json b/FarmmapsPoten_AVRapi/PotenInputAVR.json new file mode 100644 index 0000000..757844a --- /dev/null +++ b/FarmmapsPoten_AVRapi/PotenInputAVR.json @@ -0,0 +1,41 @@ +[ + { + "File": "PlantingSampleDataLutum.zip", + "OutputFileName": "20210216_SampleData_CovertArea", + "FieldName": "lutum", + "PlantingYear": 2021, + "MeanDensity": "30", + "Variation": "20", + "UseShadow": false, + "ConvertToCountPerArea": true, + "Rijbreedte_m": "0.75", //as string + "geometryJson": { + "type": "Polygon", + "coordinates": [ + [ + [ 5.66886041703652044, 52.52929999060298627 ], + [ 5.6716230923214912, 52.52946316399909676 ], + [ 5.67185376229668581, 52.5280565894154563 ], + [ 5.66903207841337231, 52.52790646510525363 ], + [ 5.66886041703652044, 52.52929999060298627 ] + ] + ] + }, + + // if taskmap is not generated, output is only geotiff + "GenerateTaskmap": true, + "CellWidth": "3", + "CellHeight": "10", + "StartPoint": { + "type": "Point", + "coordinates": [ 5.66886041703652044, 52.52929999060298627 ] + }, + "EndPoint": { + "type": "Point", + "coordinates": [ 5.6716230923214912, 52.52946316399909676 ] + } // if no angle + + //"Angle": "317.0" // if no endpoint + } + +] diff --git a/FarmmapsPoten_AVRapi/PotenServiceAVR.cs b/FarmmapsPoten_AVRapi/PotenServiceAVR.cs new file mode 100644 index 0000000..42ec93e --- /dev/null +++ b/FarmmapsPoten_AVRapi/PotenServiceAVR.cs @@ -0,0 +1,120 @@ +using System; +using System.Globalization; +using System.Threading.Tasks; +using FarmmapsApi.Models; +using FarmmapsApi.Services; +using Microsoft.Extensions.Logging; +using Newtonsoft.Json; +using static FarmmapsApi.Extensions; +using static FarmmapsApiSamples.Constants; + + +namespace FarmmapsVRApoten +{ + public class PotenServiceAVR + { + private readonly ILogger _logger; + private readonly FarmmapsApiService _farmmapsApiService; + private readonly GeneralService _generalService; + + public PotenServiceAVR(ILogger logger, FarmmapsApiService farmmapsApiService, + GeneralService generalService) + { + _logger = logger; + _farmmapsApiService = farmmapsApiService; + _generalService = generalService; + } + + public async Task CalculateApplicationMapAsync(Item cropfieldItem, Item inputItem, string meanDensity, string variation) + { + var potenApplicationMapRequest = new TaskRequest() { TaskType = VRAPLANTING_TASK }; + if (inputItem != null) { potenApplicationMapRequest.attributes["inputCode"] = inputItem.Code; } + potenApplicationMapRequest.attributes["meanDensity"] = meanDensity; + potenApplicationMapRequest.attributes["variation"] = variation; + + var taskCode = await _farmmapsApiService.QueueTaskAsync(cropfieldItem.Code, potenApplicationMapRequest); + _logger.LogInformation($"itemTaskCode: {taskCode}"); + _logger.LogInformation($"potenTaskmapRequest: {potenApplicationMapRequest}"); + _logger.LogInformation($"potenTaskmapRequest type: {potenApplicationMapRequest.TaskType}"); + _logger.LogInformation($"cropfieldItemCode: {cropfieldItem.Code}"); + + + + await PollTask(TimeSpan.FromSeconds(5), async (tokenSource) => + { + var itemTaskStatus = await _farmmapsApiService.GetTaskStatusAsync(cropfieldItem.Code, taskCode); + _logger.LogInformation($"Waiting on calculation of application map; Status: {itemTaskStatus.State}"); + if (itemTaskStatus.IsFinished) + tokenSource.Cancel(); + }); + + + + var itemTask = await _farmmapsApiService.GetTaskStatusAsync(cropfieldItem.Code, taskCode); + if (itemTask.State == ItemTaskState.Error) + { + _logger.LogError($"Something went wrong with task execution: {itemTask.Message}"); + return null; + } + + var itemName = $"VRAPoten"; + var applianceMapItem = await _generalService.FindChildItemAsync(cropfieldItem.Code, + GEOTIFF_PROCESSED_ITEMTYPE, itemName, + i => i.Updated >= itemTask.Finished.GetValueOrDefault(DateTime.UtcNow) && + i.Name.ToLower().Contains(itemName.ToLower())); + + if (applianceMapItem == null) + { + _logger.LogError("Could not find the VRAPoten geotiff child item under cropfield"); + return null; + } + + return applianceMapItem; + + } + + + // Extra task making use of the zonering task to convert the planting distance in cm to number of seeds per m2 !!! mind the hardcoded values !!! + public async Task ConvertToCountPerAreaTroughZonering(Item cropfieldItem, Item geotiffItem, string rijBreedte_m) + { + var zoneringTaskRequest = new TaskRequest() { TaskType = VRAZONERING_TASK }; + zoneringTaskRequest.attributes["formula"] = $"((100/[0])/{rijBreedte_m})"; + zoneringTaskRequest.attributes["output"] = "{\"Name\":\"CountPerAreaConversion\",\"Quantity\":\"CountPerArea\",\"Unit\":\"#/m2\"}"; + zoneringTaskRequest.attributes["inputs"] = $"[{{\"ItemCode\":\"{geotiffItem.Code}\",\"LayerName\":\"Appliancemap\"}}]"; + + var taskCode = await _farmmapsApiService.QueueTaskAsync(cropfieldItem.Code, zoneringTaskRequest); + + await PollTask(TimeSpan.FromSeconds(5), async (tokenSource) => + { + var itemTaskStatus = await _farmmapsApiService.GetTaskStatusAsync(cropfieldItem.Code, taskCode); + _logger.LogInformation($"Waiting on convertion to Count per area through zoneringTast; Status: {itemTaskStatus.State}"); + if (itemTaskStatus.IsFinished) + tokenSource.Cancel(); + }); + + var itemTask = await _farmmapsApiService.GetTaskStatusAsync(cropfieldItem.Code, taskCode); + if (itemTask.State == ItemTaskState.Error) + { + _logger.LogError($"Something went wrong with task execution: {itemTask.Message}"); + return null; + } + + var applianceMapItem = await _generalService.FindChildItemAsync(cropfieldItem.Code, + GEOTIFF_PROCESSED_ITEMTYPE, "CountPerAreaConversion", + i => i.Updated >= itemTask.Finished.GetValueOrDefault(DateTime.UtcNow) && + i.Name.ToLower().Contains("CountPerAreaConversion".ToLower())); + + if (applianceMapItem == null) + { + _logger.LogError("Could not find the converted to count per area geotiff child item under cropfield"); + return null; + } + + return applianceMapItem; + } + + + } +} + + diff --git a/FarmmapsPoten_AVRapi/Program.cs b/FarmmapsPoten_AVRapi/Program.cs new file mode 100644 index 0000000..1003080 --- /dev/null +++ b/FarmmapsPoten_AVRapi/Program.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using FarmmapsApi; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; + +namespace FarmmapsVRApoten +{ + class Program : FarmmapsProgram + { + private static async Task Main(string[] args) + { + await new Program().Start(args); + } + + protected override void Configure(IServiceCollection serviceCollection) + { + serviceCollection.AddLogging(opts => opts + .AddConsole() + .AddFilter("System.Net.Http", LogLevel.Warning)) + .AddTransient(); + } + } +} \ No newline at end of file diff --git a/FarmmapsPoten_AVRapi/appsettings.json b/FarmmapsPoten_AVRapi/appsettings.json new file mode 100644 index 0000000..3e75982 --- /dev/null +++ b/FarmmapsPoten_AVRapi/appsettings.json @@ -0,0 +1,10 @@ +{ + "Authority": "https://accounts.test.farmmaps.eu/", + "Endpoint": "https://test.farmmaps.eu/", + "BasePath": "api/v1", + "DiscoveryEndpointUrl": "https://accounts.test.farmmaps.eu/.well-known/openid-configuration", + "RedirectUri": "http://example.nl/api", + "ClientId": "", + "ClientSecret": "", + "Scopes": [ "api" ] +} \ No newline at end of file