import clr clr.AddReference('DHI.Solutions.GISManager.Tools.Temporal') from DHI.Solutions.GISManager.Tools.Temporal import * from System import DateTime def TimeSeriesToTemporalRaterTool(): """ """ gisManager = app.Modules.Get("GIS Manager") inputItem = gisManager.FeatureClassList.Fetch('/weather_forecast') tool = app.Tools.CreateNew('Time Series to Temporal Raster') tool.InputItems.Add(inputItem) tool.UseAssociation = False tool.TsNameFeatureAttributeName = 'pointid' tool.TSNamePattern = '(.*)_rainfall' tool.RasterName = 'TemporalForecastedRaster' tool.TSGroupName = '/Aladin/FullTS' tool.RasterGroup = '/Rainfall' tool.AutoScale = True tool.MissingValue = -9999 # rasterDefinition = TsToTempRasterRasterDefinition() # tool.RasterDefinition = rasterDefinition tool.StartTime = DateTime(2018,3,25, 9, 00, 00) tool.EndTime = DateTime(2018,3,30, 8, 00, 00) tool.TimeStep = 1 tool.Execute() return tool.OutputItems