zoukankan      html  css  js  c++  java
  • Delphi ArcEngine 创建点密度专题方法


    function DotDensityRenderer(pLayer: ILayer; sField: string; iDotSize: Integer; pRgbColor: IRgbColor; dDotValue:  Double): Boolean;

    //参数说明 ,按顺序 指定的图层,字段  ,点大小,颜色,每个点代表的值
    var
       pGeoLayer: IGeoFeatureLayer;
       pRenderer: IDotDensityRenderer;
       pMarkerSymbol: ISimpleMarkerSymbol;
       pRendererFields: IRendererFields;
       pDotDensitySymbol: IDotDensityFillSymbol;

       pSymbolArray: ISymbolArray;
    begin
       //创建点密度渲染对象
       pRenderer := CoDotDensityRenderer.Create as IDotDensityRenderer;
       pRendererFields := pRenderer as IRendererFields;

       //创建点密度符号
       pDotDensitySymbol := CoDotDensityFillSymbol.Create as IDotDensityFillSymbol;
       pDotDensitySymbol.DotSize := iDotSize;
       pDotDensitySymbol.BackgroundColor := pRgbColor;

       //创建点符号,用于点密度渲染
       pMarkerSymbol := CoSimpleMarkerSymbol.Create as ISimpleMarkerSymbol;
       pMarkerSymbol.Color := getRGB(0, 0, 255, 255);
       pMarkerSymbol.Style := esriSMSCircle;

       pSymbolArray := pDotDensitySymbol as ISymbolArray;
       pSymbolArray.AddSymbol(pMarkerSymbol as ISymbol);

       pRenderer.DotDensitySymbol := pDotDensitySymbol;
       pRenderer.DotValue := dDotValue;
       pRenderer.CreateLegend;

       if pRenderer <> nil then
       begin
          pGeoLayer := pLayer as IGeoFeatureLayer;
          pGeoLayer.Renderer := pRenderer as IFeatureRenderer;
          Result := True;
       end
       else
       begin
          Result := False;
       end;
    end;

  • 相关阅读:
    布隆过滤器(Bloom Filter) 未完待续
    [面试]future模式
    R语言入门(2)-数据对象
    R语言入门(1)-初识R语言
    [面试] Java GC (未整理完)
    [面试]StringBuilder StringBuffer源码粘贴(并非源码分析, 请绕道)
    [面试]synchronized
    [面试]volatile类型修饰符/内存屏障/处理器缓存
    [面试]死锁-最简单的死锁demo
    [面试]Actor模型
  • 原文地址:https://www.cnblogs.com/chinacodegear/p/1418270.html
Copyright © 2011-2022 走看看