資源描述:
《arcengine 專題圖制作》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫(kù)。
1、ArcEngine專題圖制作(C#)上一篇/下一篇?2010-06-2408:28:50/個(gè)人分類:ArcEngine查看(413)/評(píng)論(0)/評(píng)分(0/0)點(diǎn)密度圖、分層設(shè)色圖/等級(jí)圖、單值圖、柱狀圖、餅狀圖的實(shí)現(xiàn)代碼?C#?privatevoid點(diǎn)密度圖ToolStripMenuItem_Click(objectsender,EventArgse)???????{???????????//獲取當(dāng)前圖層,并把它設(shè)置成IGeoFeatureLayer的實(shí)例???????????IMappMap=axMapC
2、ontrol1.Map;???????????ILayerpLayer=pMap.get_Layer(0)asIFeatureLayer;???????????IFeatureLayerpFeatureLayer=pLayerasIFeatureLayer;???????????IGeoFeatureLayerpGeoFeatureLayer=pLayerasIGeoFeatureLayer;???????????//獲取圖層上的feature???????????IFeatureClasspFeatureC
3、lass=pFeatureLayer.FeatureClass;???????????IFeatureCursorpFeatureCursor=pFeatureClass.Search(null,false);???????????IFeaturepFeature=pFeatureCursor.NextFeature();???????????///////////////////////?????????????????????////////////////////////////////////////
4、///////////////////////////???????????//定義點(diǎn)密度圖渲染組件???????????IDotDensityRendererDotDensityRenderer=newDotDensityRendererClass();???????????//定義點(diǎn)密度圖渲染組件對(duì)象的渲染字段對(duì)象???????????IRendererFieldsflds=(IRendererFields)DotDensityRenderer;???????????flds.AddField("FID"
5、,"FID");???????????//flds.AddField("Shape","Shape");???????????//定義點(diǎn)密度圖渲染得符號(hào)對(duì)象???????????IDotDensityFillSymbolddSym=newDotDensityFillSymbolClass();???????????IRgbColorBackColor=newRgbColorClass();???????????BackColor.Red=234;???????????BackColor.Blue=128;??
6、?????????BackColor.Green=220;???????????IRgbColorSymbolColor=newRgbColorClass();???????????SymbolColor.Red=234;???????????SymbolColor.Blue=128;???????????SymbolColor.Green=220;???????????////點(diǎn)密度圖渲染背景顏色???????????//ddSym.BackgroundColor=BackColor;???????????
7、ddSym.DotSize=8;???????????ddSym.FixedPlacement=true;???????????//ddSym.Color=SymbolColor;???????????ILineSymbolpLineSymbol=newCartographicLineSymbolClass();???????????ddSym.Outline=pLineSymbol;???????????//定義符號(hào)數(shù)組???????????ISymbolArraysymArray=(ISymbolArra
8、y)ddSym;???????????//添加點(diǎn)密度圖渲染的點(diǎn)符號(hào)到符號(hào)數(shù)組中去???????????ISimpleMarkerSymbolpMarkerSymbol=newSimpleMarkerSymbolClass();???????????pMarkerSymbol.Style.=esriSimpleMarkerStyle.esriSMSCircle;???????????pMarkerSy