当前位置: 首页 > news >正文

河东做网站郑州网站排名推广

河东做网站,郑州网站排名推广,wordpress 标题翻译,南阳做网站多少钱由等高线等生成TIN并生成坡度图的代码。在softline代码段对错误信息作了处理,不再使用“软线”,“软性线”,“柔性线”,“软断线”等固定翻译编写代码。需要添加的引用ESRI.ArcGIS.ADF;ESRI.ArcGIS.Analyst3DTools;ESRI.ArcGIS.Ca…

由等高线等生成TIN并生成坡度图的代码。在softline代码段对错误信息作了处理,不再使用“软线”,“软性线”,“柔性线”,“软断线”等固定翻译编写代码。

需要添加的引用

ESRI.ArcGIS.ADF;

ESRI.ArcGIS.Analyst3DTools;

ESRI.ArcGIS.Carto;

ESRI.ArcGIS.DataSourcesFile;

ESRI.ArcGIS.DataSourcesGDB;

ESRI.ArcGIS.esriSystem;

ESRI.ArcGIS.Geodatabase;

ESRI.ArcGIS.Geoprocessing;

ESRI.ArcGIS.Geoprocessor;

///

/// 创建TIN

///

///

privatebool Createtin()

{(转载请注明出自博客园)

string mdbPath = @"D:\TESTDATA\spacial data.mdb";

string layerName = "DGX";

string gcField = "BSGC";高程字段名

string TinPath = @"D:\TESTDATA\TIN";目标TIN路径

bool result = false;

IWorkspaceFactory pWorkspaceFactory = new AccessWorkspaceFactoryClass();

if (pWorkspaceFactory != null)

{

pWorkspace = pWorkspaceFactory.OpenFromFile(mdbPath, 0);

异常来自HRESULT:0x80040228解决办法:加license控件!!

}

IFeatureClass pFeatureClass_DGX = null;

IFeatureWorkspace pFeatureWorkspace = pWorkspace as IFeatureWorkspace;

try

{

pFeatureClass_DGX = pFeatureWorkspace.OpenFeatureClass(layerName);

}

catch

{

pFeatureClass_DGX = null;

}

if (pFeatureClass_DGX == null)

{

return result;

}

CreateTin createTinProcess = new CreateTin();

createTinProcess.out_tin = TinPath;

createTinProcess.spatial_reference = (pFeatureClass_DGX as IGeoDataset).SpatialReference;

if (Directory.Exists(TinPath))

{删除已经存在的TIN

Directory.Delete(TinPath, true);

}

else

{创建存放TIN的文件夹

string parentPath = Directory.GetParent(TinPath).FullName;

if (!Directory.Exists(parentPath))

{

Directory.CreateDirectory(parentPath);

}

}

string message = "";

if (Execute(createTinProcess, out message))

{

IFeatureLayer layer = new FeatureLayerClass();

layer.FeatureClass = pFeatureClass_DGX;

layer.Name = pFeatureClass_DGX.AliasName;

GPUtilitiesClass gpUtil = new GPUtilitiesClass();

gpUtil.AddInternalLayer(layer as ILayer);

int index = -1;

index = pFeatureClass_DGX.Fields.FindField(gcField);

if (index >= 0)

{

IField field = pFeatureClass_DGX.Fields.get_Field(index);

string in_featuresPortion1 = layer.Name + " " + field.AliasName + " ";

string in_featuresPortion2 = "softline";

EditTin editTinProcess = new EditTin();

editTinProcess.in_tin = TinPath;

for (int i = 0; i < 2; i++)

{

string in_features = in_featuresPortion1 + in_featuresPortion2 + " false ";

editTinProcess.in_features = in_features;

if (Execute(editTinProcess, out message))

{

result = true;创建TIN成功

break;

}

else

{

string[] subMessages = message.Split(new char[] { '\n' });

string rightParaInfo = "ERROR 000800: The value is not a member of %s.";

if (subMessages[3] == rightParaInfo)

{

if (subMessages[4] == rightParaInfo)

{

if (subMessages[5] == rightParaInfo)

{

if (subMessages[6] == rightParaInfo)

{

}

else

{

参数4错误

}

}

else

{

处理由于中文环境或其他语言环境中softline翻译不同带来的问题

string paras = subMessages[5];

paras = paras.Replace("ERROR 000800: The value is not a member of", string.Empty).Trim(new char[] { '.' });

string[] parameters = paras.Split(new char[] { '|' });

if (parameters.Length == 3)

{

in_featuresPortion2 = parameters[2].Trim();

continue;

}

else

{

未知错误

result = false;

throw new Exception(message);

}

}

}

else

{

高程字段名称错误

}

}

else

{

图层名称错误

}

result = false;

throw new Exception(message);

}

}

}

else

{

result = false;

}

}

else

{

result = false;

}

return result;

}

///

/// 创建坡度图

///

///

privatebool CreateSlope()

{(转载请注明出自博客园)

string tinPath = @"D:\TESTDATA\tin";TIN路径

string classBreaksTablePath = @"D:\TESTDATA\class breaks table.txt";分段表

string slopePath = @"D:\TESTDATA\pdt.shp";坡度图路径

bool result = false;

List fileList = new List();

可加入删除已存在坡度图的代码段

TinSlope tinSlopeProcess = new TinSlope();

tinSlopeProcess.in_tin = tinPath;

tinSlopeProcess.out_feature_class = slopePath;

tinSlopeProcess.units = "DEGREE";

tinSlopeProcess.class_breaks_table = classBreaksTablePath;

string message = "";

if (Execute(tinSlopeProcess, out message))

{

result = true;

}

else

{

result = false;

}

return result;

}

publicbool Execute(IGPProcess GPProcess, out string message)

{(转载请注明出自博客园)

message = "";

bool result = false;

IGeoProcessorResult ProcessorResult = null;

Geoprocessor Processor = new Geoprocessor();

ProcessorResult = (IGeoProcessorResult)Processor.Execute(GPProcess, null);

if (ProcessorResult != null && ProcessorResult.Status == esriJobStatus.esriJobSucceeded)

{

result = true;

}

else

{

result = false;

}

object obj = new object();

if (message != null)

{

if (Processor != null)

{

message = Processor.GetMessages(ref obj);

}

else

{

message = "";

}

}

return result;

}(转载请注明出自博客园)

http://www.lbrq.cn/news/2746891.html

相关文章:

  • 成都企业网站建设哪家专业优化师是做什么的
  • 网站建设需要域名吗?国际新闻今天
  • mysql数据库做网站网站推广系统
  • 做哪一类网站能赚钱seo扣费系统
  • 深圳我的网站广州线下培训机构停课
  • 网站设计与网页制作在线企业信息查询
  • 武汉网站设计公司排名新站快速收录
  • 游戏开发有前途吗seo培训机构排名
  • 成都电商app开发seo同行网站
  • 网站制作创业磁力狗在线
  • 医疗机械网站怎么做哪个合肥seo好
  • 做网站银川快推达seo
  • 高端网站建设服务商外贸网站推广怎么做
  • 日本真人做爰无遮挡视频免费网站网站推广策划报告
  • 深圳网站建公司天津疫情最新消息
  • 辽宁手机版建站系统开发网站的推广方式
  • 动态网站开发 用什么模板语言企业管理
  • 沈阳专业网站制作设计淘宝的关键词排名怎么查
  • 做自己的博客网站网销怎么销售的
  • 外贸网站建设软件网络营销品牌公司
  • wordpress超链接出错谷歌seo最好的公司
  • 长沙网站建seo营销外包
  • 迪奥官网网站做的好吗在线一键免费生成网页网站
  • 网页制作技术基础教程seo推广哪家公司好
  • 网站的产品中心怎么做北京seo排名技术
  • 网站备案证书如何打开年轻人不要做网络销售
  • 做dnf辅助网站网站怎么添加外链
  • 农业网站建设方案 ppt模板下载产品关键词
  • 网站投放广告教程深圳全网营销平台排名
  • 域名138查询网seo优化师是什么
  • 数字货币的法律属性与监管完善路径探析
  • RabbitMQ入门:生产者和消费者示例
  • 《从混乱到有序:AI 如何一步步梳理数据质量难题》文章提纲
  • 服务器配置开机自启动服务
  • 美国服务器环境下Windows容器工作负载基于指标的自动扩缩
  • 昇腾AI自学Day2-- 深度学习基础工具与数学