improved shapetogeotiff method
This commit is contained in:
		| @@ -66,10 +66,15 @@ namespace FarmmapsApi.Services | ||||
|                      i.Name.ToLower().Contains(itemName.ToLower())); ; | ||||
|         } | ||||
|  | ||||
|         public async Task<Item> ShapeToGeotiff(Item shapeItem) | ||||
|         public async Task<Item> ShapeToGeotiff(Item shapeItem, int resolution = 1, params string[] inputLayerNames) | ||||
|         { | ||||
|             var startUpload = DateTime.UtcNow.AddSeconds(-3); | ||||
|             await RunAndWaitForTask(shapeItem, "vnd.farmmaps.task.shapetogeotiff"); | ||||
|             await RunAndWaitForTask(shapeItem, "vnd.farmmaps.task.shapetogeotiff", request => | ||||
|             { | ||||
|                 request.attributes["resolution"] = resolution.ToString(); | ||||
|                 if(inputLayerNames.Length > 0) | ||||
|                     request.attributes["inputLayers"] = $"[{string.Join(",", inputLayerNames)}]"; | ||||
|             }); | ||||
|  | ||||
|             return await FindChildItemAsync(shapeItem.ParentCode, GEOTIFF_PROCESSED_ITEMTYPE, shapeItem.Name, | ||||
|                 i => i.Created >= startUpload && | ||||
|   | ||||
		Reference in New Issue
	
	Block a user