nu kan er van de gegeven input een cropfield wordern gemaakt, en hier kunnen vervolgens KPIs over berekend worden. Volgende stap is het strippen van de KPIinput om te kijken wat het minimale is dat nodig is om de kpis te berekenen. verder nu eem aantal inputs die niet nodig waren verwijdertInput aangepast,

master
Abel Hoeven, van 2023-04-25 16:14:43 +02:00
parent 7149086ce2
commit 59f9ef4743
3 changed files with 5 additions and 12 deletions

View File

@ -96,13 +96,13 @@ namespace FarmmapsKPI
return;
}
// Use already created cropfield or create new one
// Use already created cropfield or create new one, added a Data input, with field specific data for the KPI calculation
Item cropfieldItem;
if (useCreatedCropfield == false || string.IsNullOrEmpty(_settings.CropfieldItemCode))
if (useCreatedCropfield == true || string.IsNullOrEmpty(_settings.CropfieldItemCode))
{
_logger.LogInformation("Creating cropfield");
cropfieldItem = await _generalService.CreateCropfieldItemAsync(myDriveRoot.Code,
$"DataCropfield {input.OutputFileName}", cropYear, input.GeometryJson.ToString(Formatting.None));
$"DataCropfield {input.OutputFileName}", cropYear, input.GeometryJson.ToString(Formatting.None), input.Data.ToString(Formatting.None));
_settings.CropfieldItemCode = cropfieldItem.Code;
SaveSettings(settingsfile);
}
@ -143,8 +143,6 @@ namespace FarmmapsKPI
}
// Get KPI data for saving it in a file
_logger.LogInformation($"Trying to get the cropfielditem: {cropfieldItem}");
var KPIItem = await _generalService.GetKpiItemsForCropField(cropfieldItem);

View File

@ -1,6 +1,6 @@
[
{
"UseCreatedCropfield": true,
"UseCreatedCropfield": false,
"outputFileName": "TestData",
"fieldName": "TestField",
"DownloadFolder": "Downloads", //"C:\\workdir\\groenmonitor\\", // "Downloads", -> if you just put "Downloads" the program will download to somewhere in ..\FarmMapsApiClient_WURtest\FarmmapsDataDownload\bin\Debug\netcoreapp3.1\Downloads\

View File

@ -12,14 +12,9 @@ namespace FarmmapsKPI.Models
public string DownloadFolder { get; set; }
public int CropYear { get; set; }
public JObject GeometryJson { get; set; }
public JObject Data { get; set; }
public string InputLayerName { get; set; }
public string fieldName { get; set; }
//public bool GetSatelliteData { get; set; }
// public bool GetVanDerSatData { get; set; }
// public string SatelliteBand { get; set; }
// public bool StoreSatelliteStatisticsSingleImage { get; set; }
// public bool StoreSatelliteStatisticsCropYear { get; set; }
//public bool StoreVanDerSatStatistics { get; set; }
public bool GetShadowData { get; set; }
public bool GetCropRecordings { get; set; }
public string CrprecItem { get; set; }