zoukankan      html  css  js  c++  java
  • Engine中执行gp工具返回的要素图层如何获取?

    来自:http://zhihu.esrichina.com.cn/?/question/12087

    Engine中执行gp工具返回的【解决办法】:
    需要用gpUtils.DecodeFeatureLayer方法将gp工具生成的图层先读取出来,如:

    // Intialize the geoprocessor.
    Geoprocessor GP = new Geoprocessor();
    
    // Intialize the MakeFeatureLayer tool.
    MakeFeatureLayer makefeaturelayer = new MakeFeatureLayer();
    
    // Set up the GP tool parameters and run the tool.
    makefeaturelayer.in_features = @C:gp
    fld.gdbwells;
    makefeaturelayer.out_layer = Wells_Lyr;
    makefeaturelayer.where_clause = WELL_YIELD > 150;
    
    IGeoProcessorResult result = (IGeoProcessorResult)GP.Execute(makefeaturelayer, null);
    
    IFeatureClass fc;
    IQueryFilter qf;
    
    IGPUtilities gpUtils = new GPUtilitiesClass();
    gpUtils.DecodeFeatureLayer(result.GetOutput(0), out fc, out qf);
    
    IFeatureCursor cursor = fc.Insert(true);

    要素图层如何获取?比如make query layer工具

  • 相关阅读:
    JSON
    FBV & CBV
    django Tips
    Django2.2
    cookie & session
    ajax请求
    视图函数
    模板语法
    模板继承、组件
    python之路-----多线程与多进程
  • 原文地址:https://www.cnblogs.com/gisoracle/p/5209124.html
Copyright © 2011-2022 走看看