forked from FarmMaps/FarmMapsApiClient
Updated Blight and Zonering
This commit is contained in:
@@ -73,7 +73,7 @@ namespace FarmmapsZonering
|
||||
return;
|
||||
}
|
||||
|
||||
bool useCreatedCropfield = true;
|
||||
bool useCreatedCropfield = false;
|
||||
bool GetWatBal = input.GetWatBal;
|
||||
bool getVanDerSat = input.GetVanDerSat;
|
||||
bool StoreVanDerSatStatistics = input.storeVanDerSatStatistics;
|
||||
@@ -102,11 +102,6 @@ namespace FarmmapsZonering
|
||||
_settings.CropfieldName = cropfieldItem.Name;
|
||||
_settings.CropfieldItemCode = cropfieldItem.Code;
|
||||
SaveSettings(settingsfile);
|
||||
|
||||
cropfieldItem = await _generalService.CreateCropfieldItemAsync(myDrive.Code, "Cropfield VRA Zonering", 2020,
|
||||
@"{ ""type"": ""Polygon"", ""coordinates"": [ [ [ 5.670991253771027, 52.796788997702613 ], [ 5.671526456638633, 52.797291618546666 ], [ 5.671275936147413, 52.797422436717852 ], [ 5.671959173850738, 52.798269302728798 ], [ 5.670649634919365, 52.798778791408822 ], [ 5.671503682048522, 52.799591206957416 ], [ 5.675159003761311, 52.798193567415474 ], [ 5.673029579585948, 52.796024727480535 ], [ 5.670991253771027, 52.796788997702613 ] ] ] }");
|
||||
_settings.CropfieldItemCode = cropfieldItem.Code;
|
||||
SaveSettings(settingsfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -163,7 +158,7 @@ namespace FarmmapsZonering
|
||||
|
||||
var outputItem = await _zoneringService.CreateApplicationMapAsync(cropfieldItem, input.Formula, new Output()
|
||||
{
|
||||
Name = input.LayerName,
|
||||
Name = input.CalculatedLayerName,
|
||||
Quantity = input.CalculatedQuantity,
|
||||
Unit = input.CalculatedUnit,
|
||||
|
||||
@@ -175,17 +170,18 @@ namespace FarmmapsZonering
|
||||
},
|
||||
new InputParameter()
|
||||
{
|
||||
ItemCode = inputOneItem.Code,
|
||||
LayerName = inputOneItem.Data["layers"][0]["name"].ToString()
|
||||
ItemCode = inputTwoItem.Code,
|
||||
LayerName = inputTwoItem.Data["layers"][0]["name"].ToString()
|
||||
});
|
||||
|
||||
_logger.LogInformation("Downloading output");
|
||||
|
||||
|
||||
|
||||
_logger.LogInformation("Downloading output");
|
||||
_logger.LogInformation($"outputitem: {outputItem} with code {outputItem.Code} and date {outputItem.DataDate}");
|
||||
//_logger.LogInformation($"Data: {outputItem.Data}");
|
||||
|
||||
await _farmmapsApiService.DownloadItemAsync(outputItem.Code,
|
||||
|
||||
Path.Combine(DownloadFolder, $"{input.OutputFileName}.zip"));
|
||||
Path.Combine(DownloadFolder, $"{input.OutputFileName}.zoning.zip"));
|
||||
|
||||
}
|
||||
|
||||
// Functions to save previously created cropfields
|
||||
|
Reference in New Issue
Block a user