Transforming tiff to shape

This commit is contained in:
jits 2020-11-13 16:15:59 +01:00
parent b47c9880f2
commit d1f95a039d

View File

@ -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"));
}