arcEngine 10.1与arcEngine 10.2中smoothline的区别
直接上代码吧!大家需要的拿去,这是arcEngine 两个版本之间的区别。
10.1版本中
using ESRI.ArcGIS.Geoprocessor; using ESRI.ArcGIS.esriSystem; using ESRI.ArcGIS.Geodatabase; using ESRI.ArcGIS.AnalysisTools; using ESRI.ArcGIS.SpatialAnalyst; using ESRI.ArcGIS.GeoAnalyst; using ESRI.ArcGIS.CartographyTools; //平滑曲线 public void SmoothLine(IFeatureClass pFeaClass, string strOutput) { try { Geoprocessor pGp = new Geoprocessor(); SmoothLine smoothLine = new SmoothLine(); smoothLine.in_features = pFeaClass; smoothLine.out_feature_class = strOutput; smoothLine.tolerance = 5; pGp.Execute(smoothLine, null); } catch(Exception e) { XMLOperation.LogManager.WriteLog(e.Message); return; } }
10.2版本中
using ESRI.ArcGIS.Geoprocessor;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.AnalysisTools;
using ESRI.ArcGIS.SpatialAnalyst;
using ESRI.ArcGIS.GeoAnalyst;
using ESRI.ArcGIS.CartographyTools;
using ESRI.ArcGIS.Server;
using ESRI.ArcGIS.Geoprocessing;
//平滑曲线
public void SmoothLine(IFeatureClass pFeaClass, string strOutput)
{
try
{
Geoprocessor pGp = new Geoprocessor();
SmoothLine smoothLine = new SmoothLine();
smoothLine.in_features = pFeaClass;
smoothLine.out_feature_class = strOutput;
smoothLine.tolerance = 5;
pGp.Execute(smoothLine, null);
}
catch(Exception e)
{
XMLOperation.LogManager.WriteLog(e.Message);
return;
}
}
两个版本的区别仅限于dll程序集的依赖关系。10.3版本与10.2版本估计是一样的问题,大家可以试一下。
另外,10.1版本中的license初始化与10.3license方法一致,但是10.3总是提示license未初始化。 如果高手知道答案,非常感谢您能跟我说一声,谢谢!!
以上如有其它问题,欢迎指教,共同进步!
转载自:https://blog.csdn.net/YingHuoChongarl/article/details/55260295