예제 #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");
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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());
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }