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> /// Gets list of data types supported by driver according to metadata. /// </summary> public static IEnumerable<string> GetCreationDataTypes(this DatasourceDriver driver) { string s = driver.get_Metadata(GdalDriverMetadata.CreationDataTypes); IList<string> result; if (string.IsNullOrWhiteSpace(s)) { result = GdalHelper.GetRasterDataTypes(); } else { result = s.Split(new[] { ' ' }).ToList(); } result.Insert(0, SameAsInputDataType); return result; }