Ejemplo n.º 1
0
        /// <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");
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
        /// <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);
        }
Ejemplo n.º 4
0
        /// <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);
        }
Ejemplo n.º 5
0
        /// <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);
        }
Ejemplo n.º 6
0
        /// <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());
        }
Ejemplo n.º 7
0
        /// <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);
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
        /// <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);
        }
Ejemplo n.º 10
0
        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);
        }