master #16

Merged
mark merged 70 commits from :master into master 2025-01-10 15:39:26 +00:00
3 changed files with 5 additions and 12 deletions
Showing only changes of commit 59f9ef4743 - Show all commits

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; }