From d1f95a039d4329f0335d70e88e62ce7357f65ebc Mon Sep 17 00:00:00 2001 From: jits Date: Fri, 13 Nov 2020 16:15:59 +0100 Subject: [PATCH] Transforming tiff to shape --- FarmmapsNbs/NbsApplication.cs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/FarmmapsNbs/NbsApplication.cs b/FarmmapsNbs/NbsApplication.cs index 72fd55e..23c4ce0 100644 --- a/FarmmapsNbs/NbsApplication.cs +++ b/FarmmapsNbs/NbsApplication.cs @@ -241,25 +241,25 @@ namespace FarmmapsNbs Path.Combine(DownloadFolder, $"{input.OutputFileName}.application.zip")); _logger.LogInformation("Application map can be found in {0}", Path.Combine(DownloadFolder, $"{input.OutputFileName}.application.zip")); - // //transforming tiff to shape - // var tiffItem = applicationMapItem; + //transforming tiff to shape + var tiffItem = applicationMapItem; - // if (tiffItem == null) - // { - // _logger.LogError("Could not find item for uploaded data"); - // return; - // } - // _logger.LogInformation($"Converting geotiff to shape"); - // var taskmap = await _generalService.GeotiffToShape(tiffItem); - // if (taskmap == null) - // { - // _logger.LogError("Something went wrong with geotiff to shape transformation"); - // return; - // } + if (tiffItem == null) + { + _logger.LogError("Could not find item for uploaded data"); + return; + } + _logger.LogInformation($"Converting geotiff to shape"); + var taskmap = await _generalService.GeotiffToShape(tiffItem); + 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, $"{input.OutputFileName}.taskmap.zip")); + _logger.LogInformation("Downloading taskmap"); + await _farmmapsApiService.DownloadItemAsync(taskmap.Code, + Path.Combine(DownloadFolder, $"{input.OutputFileName}.taskmap.zip")); }