Added project FarmmapsBulkSatDownload
This commit is contained in:
		| @@ -388,6 +388,29 @@ namespace FarmmapsApi.Services | ||||
|             return selectedSatelliteItem; | ||||
|         } | ||||
|  | ||||
|         public async Task<List<Item>> FindSatelliteItemsAll(Item cropfieldItem, string satelliteTaskCode) | ||||
|         { | ||||
|  | ||||
|             var taskStatus = await _farmmapsApiService.GetTaskStatusAsync(cropfieldItem.Code, satelliteTaskCode); | ||||
|  | ||||
|  | ||||
|             // find ndvi or wdvi satellite data geotiffs | ||||
|             var temporalItem = await FindChildItemAsync(cropfieldItem.Code, TEMPORAL_ITEMTYPE, | ||||
|                 "Cropfield Satellite items", item => item.SourceTask == SATELLITE_TASK && | ||||
|                                                                  taskStatus.Finished >= item.Created && | ||||
|                                                                  taskStatus.Finished <= item.Created.Value.AddHours(1)); | ||||
|  | ||||
|  | ||||
|             if (temporalItem == null) | ||||
|             { | ||||
|                 _logger.LogError("Temporal item not found"); | ||||
|  | ||||
|             } | ||||
|  | ||||
|             var satelliteTiffs = await _farmmapsApiService.GetItemChildrenAsync(temporalItem.Code); | ||||
|  | ||||
|             return satelliteTiffs; | ||||
|         } | ||||
|         //VanDerSat | ||||
|         public async Task<string> RunVanDerSatTask(Item cropfieldItem) { | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user