Changed ShapeToGeotiff

This commit is contained in:
Mark van der Wal 2021-03-03 12:59:21 +01:00
parent ee70322ddf
commit a94fb260c8

View File

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