当前位置: 首页>>代码示例>>C#>>正文


C# IView.getLayer方法代码示例

本文整理汇总了C#中IView.getLayer方法的典型用法代码示例。如果您正苦于以下问题:C# IView.getLayer方法的具体用法?C# IView.getLayer怎么用?C# IView.getLayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IView的用法示例。


在下文中一共展示了IView.getLayer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: StrataOnTunnel

        // tunnelX, tunnelZ is the coordinate of tunnel crown
        // h is the height of tunnel
        //
        public static List<Result> StrataOnTunnel(double tunnelX, double tunnelZ, double h,
            IView profileView, string stLayerID, Setting setting)
        {
            IGraphicsLayer gLayerSt = profileView.getLayer(stLayerID);
            if (gLayerSt == null)
                return null;

            List<Result> results = new List<Result>();

            Project prj = Globals.project;
            Domain geology = prj.getDomain(DomainType.Geology);
            DGObjectsCollection stratum = geology.getObjects("Stratum");
            var stratumList = stratum.merge();
            foreach (DGObject obj in stratumList)
            {
                Stratum strata = obj as Stratum;
                IGraphicCollection gc = gLayerSt.getGraphics(strata);

                if (gc == null)
                    continue;

                Result result = StratumOnTunnel(tunnelX, tunnelZ, h, gc, profileView.spatialReference);
                if (result != null)
                {
                    result.StratumObj = gLayerSt.getObject(gc[0]);
                    if (result.Depth > 0 || setting.AllStrata)
                        results.Add(result);
                }
            }
            return results;
        }
开发者ID:iS3-Project,项目名称:iS3,代码行数:34,代码来源:StratumMappingUtility.cs

示例2: getDemoLayer

 //获取新建图层
 IGraphicsLayer getDemoLayer(IView view, string layerID)
 {
     IGraphicsLayer gLayer = view.getLayer(layerID);
     if (gLayer == null)
     {
         gLayer = Runtime.graphicEngine.newGraphicsLayer(
             layerID, layerID);
         var sym_fill = GraphicsUtil.GetDefaultFillSymbol();
         var renderer = Runtime.graphicEngine.newSimpleRenderer(sym_fill);
         gLayer.setRenderer(renderer);
         gLayer.Opacity = 0.9;
         view.addLayer(gLayer);
     }
     return gLayer;
 }
开发者ID:iS3-Project,项目名称:iS3,代码行数:16,代码来源:DemoWindow.xaml.cs

示例3: StratumTop

        // Get strata top coordinate at the specified location
        //
        public static double? StratumTop(double tunnelX, IView profileView, string stLayerID)
        {
            IGraphicsLayer gLayerSt = profileView.getLayer(stLayerID);
            if (gLayerSt == null)
                return null;

            List<double> results = new List<double>();

            Project prj = Globals.project;
            Domain geology = prj.getDomain(DomainType.Geology);
            DGObjectsCollection stratum = geology.getObjects("Stratum");
            List<DGObject> stratumList = stratum.merge();
            foreach (DGObject obj in stratumList)
            {
                Stratum strata = obj as Stratum;
                IGraphicCollection gc = gLayerSt.getGraphics(strata);

                if (gc == null)
                    continue;

                double? top = StratumTop(tunnelX, gc, profileView.spatialReference);
                if (top != null)
                {
                    results.Add(top.Value);
                }
            }
            if (results.Count == 0)
                return null;

            results.Sort();
            return results[results.Count - 1];
        }
开发者ID:iS3-Project,项目名称:iS3,代码行数:34,代码来源:StratumMappingUtility.cs

示例4: getBoreholeLayer

 IGraphicsLayer getBoreholeLayer(IView view, string layerID)
 {
     IGraphicsLayer gLayerBh = view.getLayer(layerID);
     if (gLayerBh == null)
     {
         gLayerBh = Runtime.graphicEngine.newGraphicsLayer(
             layerID, layerID);
         var sym_fill = GraphicsUtil.GetDefaultFillSymbol();
         var renderer = Runtime.graphicEngine.newSimpleRenderer(sym_fill);
         gLayerBh.setRenderer(renderer);
         view.addLayer(gLayerBh);
     }
     return gLayerBh;
 }
开发者ID:iS3-Project,项目名称:iS3,代码行数:14,代码来源:SimpleProfileAnalysisWindow.xaml.cs


注:本文中的IView.getLayer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。