added project to only download some data

This commit is contained in:
Riepma
2021-05-11 15:03:08 +02:00
parent 462e66baea
commit bea4d207d0
10 changed files with 401 additions and 5 deletions

View File

@@ -81,6 +81,7 @@ namespace FarmmapsVRApoten
_logger.LogInformation($"CropfielditemCode: {cropfieldItem.Code}");
//Downloading shadowMap for own interpretation
if (useShadow) {
_logger.LogInformation("Calculate shadow map for field");
@@ -142,6 +143,9 @@ namespace FarmmapsVRApoten
_logger.LogInformation($"Converting shape to geotiff");
geotiffItem = await _generalService.ShapeToGeotiff(shapeItem);
_logger.LogInformation($"ShapeToGeotiff_GeotiffItemcode: {geotiffItem.Code}");
if (geotiffItem == null) {
_logger.LogError("Something went wrong with shape to geotiff transformation");
return;
@@ -193,7 +197,7 @@ namespace FarmmapsVRApoten
taskmap = await _generalService.CreateTaskmap(cropfieldItem: cropfieldItem, tiffItem: applianceMapItem, outputType: input.OutputType, cellWidth: input.CellWidth,
cellHeight: input.CellHeight, startPoint: input.StartPoint.ToString(Formatting.None), ddiCode: input.DdiCode, centered: input.Centered,
endPoint: input.EndPoint.ToString(Formatting.None), angle: input.Angle, precision: input.Precision,
cropTypeName: null, costumerName: null, ProductGroupName: null, productName : null, resolution: null, unitScale: null, maximumClasses: input.MaximumClasses);
cropTypeName: null, costumerName: null, ProductGroupName: null, productName : null, resolution: "3", unitScale: null, maximumClasses: input.MaximumClasses);
} else
{
@@ -212,7 +216,10 @@ namespace FarmmapsVRApoten
_logger.LogInformation("Downloading taskmap");
await _farmmapsApiService.DownloadItemAsync(taskmap.Code,
Path.Combine(DownloadFolder, $"VRApoten_taskmap_{input.OutputFileName}.zip"));
Path.Combine(DownloadFolder, $"VRApoten_taskmap_{input.OutputFileName}_isoxml.zip"));
}
}
}