public enum ClassificationMethod : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Public Enum ClassificationMethod Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
public enum ClassificationMethod : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Public Enum ClassificationMethod Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
Member | Description |
---|---|
DefinedInterval | Defined interval. |
EqualInterval | Equal interval. |
GeometricalInterval | Geometrical interval. |
Manual | Manual. |
NaturalBreaks | Natural breaks. |
Quantile | Quantile. |
StandardDeviation | Standard deviation. |
await QueuedTask.Run(() => { var featureLayerCreationParams = new FeatureLayerCreationParams(new Uri(@"c:\data\countydata.gdb\counties")) { Name = "Population Density (sq mi) Year 2010", RendererDefinition = new GraduatedColorsRendererDefinition("POP10_SQMI") }; LayerFactory.Instance.CreateLayer<FeatureLayer>( featureLayerCreationParams, MapView.Active.Map ); });
string colorBrewerSchemesName = "ColorBrewer Schemes (RGB)"; StyleProjectItem style = Project.Current.GetItems<StyleProjectItem>().First(s => s.Name == colorBrewerSchemesName); string colorRampName = "Greens (Continuous)"; IList<ColorRampStyleItem> colorRampList = await QueuedTask.Run(() => { return style.SearchColorRamps(colorRampName); }); ColorRampStyleItem colorRamp = colorRampList[0]; await QueuedTask.Run(() => { GraduatedColorsRendererDefinition gcDef = new GraduatedColorsRendererDefinition() { ClassificationField = "CROP_ACR07", ClassificationMethod = ArcGIS.Core.CIM.ClassificationMethod.NaturalBreaks, BreakCount = 6, ColorRamp = colorRamp.ColorRamp, SymbolTemplate = SymbolFactory.Instance.ConstructPolygonSymbol( ColorFactory.Instance.GreenRGB, SimpleFillStyle.Solid, null).MakeSymbolReference(), ExclusionClause = "CROP_ACR07 = -99", ExclusionSymbol = SymbolFactory.Instance.ConstructPolygonSymbol( ColorFactory.Instance.RedRGB, SimpleFillStyle.Solid, null).MakeSymbolReference(), ExclusionLabel = "No yield", }; var featureLayerCreationParams = new FeatureLayerCreationParams((new Uri(@"c:\Data\CountyData.gdb\Counties"))) { Name = "Crop", RendererDefinition = gcDef }; LayerFactory.Instance.CreateLayer<FeatureLayer>(featureLayerCreationParams, MapView.Active.Map); });
// applies to TIN layers only var defiendIntervalNodeRendererDef = new TinNodeClassBreaksRendererDefinition(); defiendIntervalNodeRendererDef.ClassificationMethod = ClassificationMethod.DefinedInterval; defiendIntervalNodeRendererDef.IntervalSize = 4; defiendIntervalNodeRendererDef.SymbolTemplate = nodeSymbol.MakeSymbolReference(); if (tinLayer.CanCreateRenderer(defiendIntervalNodeRendererDef)) { CIMTinRenderer renderer = tinLayer.CreateRenderer(defiendIntervalNodeRendererDef); if (tinLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Edges)) tinLayer.SetRenderer(renderer, SurfaceRendererTarget.Edges); }
// applies to TIN layers only var stdDevNodeRendererDef = new TinNodeClassBreaksRendererDefinition(); stdDevNodeRendererDef.ClassificationMethod = ClassificationMethod.StandardDeviation; stdDevNodeRendererDef.DeviationInterval = StandardDeviationInterval.OneHalf; stdDevNodeRendererDef.ColorRamp = ColorFactory.Instance.GetColorRamp("Cyan to Purple"); if (tinLayer.CanCreateRenderer(stdDevNodeRendererDef)) { CIMTinRenderer renderer = tinLayer.CreateRenderer(stdDevNodeRendererDef); if (tinLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Edges)) tinLayer.SetRenderer(renderer, SurfaceRendererTarget.Edges); }
var slopeFaceClassBreaksQuantile = new TinFaceClassBreaksRendererDefinition(TerrainDrawCursorType.FaceSlope); slopeFaceClassBreaksQuantile.ClassificationMethod = ClassificationMethod.Quantile; // accept default breakCount, symbolTemplate, color ramp if (surfaceLayer.CanCreateRenderer(slopeFaceClassBreaksQuantile)) { CIMTinRenderer renderer = surfaceLayer.CreateRenderer(slopeFaceClassBreaksQuantile); if (surfaceLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Surface)) surfaceLayer.SetRenderer(renderer, SurfaceRendererTarget.Surface); }
// applies to LAS dataset layers only var lasPointsClassBreaksRendererDef = new LasPointClassBreaksRendererDefinition(); lasPointsClassBreaksRendererDef.ClassificationMethod = ClassificationMethod.NaturalBreaks; lasPointsClassBreaksRendererDef.ModulateUsingIntensity = true; // increase the symbol size by a factor lasPointsClassBreaksRendererDef.SymbolScaleFactor = 1.0; if (lasDatasetLayer.CanCreateRenderer(lasPointsClassBreaksRendererDef)) { CIMTinRenderer renderer = lasDatasetLayer.CreateRenderer(lasPointsClassBreaksRendererDef); if (lasDatasetLayer.CanSetRenderer(renderer, SurfaceRendererTarget.Points)) lasDatasetLayer.SetRenderer(renderer, SurfaceRendererTarget.Points); }
System.Object
System.ValueType
System.Enum
ArcGIS.Core.CIM.ClassificationMethod
Target Platforms: Windows 11, Windows 10