/// <summary> /// Adds tool configuration which can be used for generation of the UI for tool. /// </summary> protected override void Configure(IAppContext context, ToolConfiguration configuration) { base.Configure(context, configuration); configuration.Get <ImportLayerTool>() .AddComboList(t => t.Database, context.Repository.Connections) .SetDefault(t => t.NewLayerName, "{input}_imported"); }
/// <summary> /// Adds tool configuration which can be used for generation of the UI for tool. /// </summary> protected override void Configure(IAppContext context, ToolConfiguration configuration) { base.Configure(context, configuration); configuration.Get <AggregateShapesTool>() .AddField(t => t.InputLayer, t => t.FieldIndex) .AddField(t => t.InputLayer, t => t.GroupOperations); }
/// <summary> /// Adds tool configuration which can be used for generation of the UI for tool. /// </summary> protected override void Configure(IAppContext context, ToolConfiguration configuration) { base.Configure(context, configuration); configuration.Get <DissolveTool>() .AddField(t => t.Input, t => t.FieldIndex) .AddField(t => t.Input, t => t.GroupOperations); }
/// <summary> /// Adds tool configuration which can be used for generation of the UI for tool. /// </summary> /// <param name="context"></param> /// <param name="configuration"></param> protected override void Configure(IAppContext context, ToolConfiguration configuration) { base.Configure(context, configuration); configuration.Get <RandomPointsTool>() .SetDefault(t => t.NumPoints, 500) .SetRange(t => t.NumPoints, 1, 1000000); }
/// <summary> /// Adds tool configuration which can be used for generation of the UI for tool. /// </summary> /// <param name="context"></param> /// <param name="configuration"></param> protected override void Configure(IAppContext context, ToolConfiguration configuration) { base.Configure(context, configuration); var resampling = new[] { "", "nearest", "average", "gauss", "cubic", "cubicspline", "lanczos", "average_mp", "average_magphase", "mode" }; configuration.Get <AddOverviewsTool>() .AddComboList(t => t.Resampling, resampling); }
/// <summary> /// Configures the specified context. /// </summary> protected override void Configure(IAppContext context, ToolConfiguration configuration) { base.Configure(context, configuration); var resolutions = new[] { "", "highest", "lowest", "average", "user" }; configuration.Get <BuildVrtTool>() .AddComboList(t => t.Resolution, resolutions) .AddComboList(t => t.Resampling, GdalHelper.GetRasterResampling()); }
/// <summary> /// Configures the specified context. /// </summary> protected override void Configure(IAppContext context, ToolConfiguration configuration) { base.Configure(context, configuration); var drivers = GetDrivers().ToList(); var gtiff = drivers.FirstOrDefault(f => f.Name.ToLower() == GdalFormats.GTiff); configuration.Get <GdalRasterTool>() .AddComboList(t => t.OutputFormat, drivers) .SetDefault(t => t.OutputFormat, gtiff); }
protected override void Configure(IAppContext context, ToolConfiguration configuration) { base.Configure(context, configuration); var dataTypes = GdalHelper.GetRasterDataTypes().ToList(); dataTypes.Insert(0, "<autodetect>"); configuration.Get <WarpRasterTool>() .AddComboList(t => t.DstResampling, GdalHelper.GetRasterResampling()) .AddComboList(t => t.WorkingPixelsType, dataTypes); }
/// <summary> /// Adds tool configuration which can be used for generation of the UI for tool. /// </summary> protected override void Configure(IAppContext context, ToolConfiguration configuration) { Output = new OutputLayerInfo() { SkipValidation = true }; var formats = EnumHelper.GetValues <GridProxyFormat>(); var colors = EnumHelper.GetValues <PredefinedColors>(); configuration.Get <CreateGridProxyTool>() .AddComboList(t => t.ProxyFormat, formats) .AddComboList(t => t.ColorScheme, colors); }
protected override void Configure(IAppContext context, ToolConfiguration configuration) { base.Configure(context, configuration); configuration.Get <BufferTool>().SetDefault(t => t.BufferDistance, 50).SetDefault(t => t.NumSegments, 30); }