Changed ShapeToGeotiff

pull/10/head
Mark van der Wal 2021-03-03 12:59:21 +01:00
parent ee70322ddf
commit a94fb260c8
1 changed files with 4 additions and 3 deletions

View File

@ -71,11 +71,12 @@ namespace FarmmapsApi.Services
public async Task<Item> ShapeToGeotiff(Item shapeItem)
{
var startUpload = DateTime.UtcNow.AddSeconds(-3);
await RunAndWaitForTask(shapeItem, "vnd.farmmaps.task.shapetogeotiff");
// the parent of the shape item is now the tiff item
shapeItem = await _farmmapsApiService.GetItemAsync(shapeItem.Code);
return await _farmmapsApiService.GetItemAsync(shapeItem.ParentCode);
return await FindChildItemAsync(shapeItem.ParentCode, GEOTIFF_PROCESSED_ITEMTYPE, shapeItem.Name,
i => i.Created >= startUpload &&
i.Name.ToLower().Contains(shapeItem.Name.ToLower()));
}