c 语言对gis导航二次开发,arcgis二次开发_arcgis二次开发语言_arcgis二次开发实例…[通俗易懂]

c 语言对gis导航二次开发,arcgis二次开发_arcgis二次开发语言_arcgis二次开发实例…[通俗易懂]arcgis二次开发arcgis二次开发Arcgis二次开发常用源代码1.点上生成面的代码if(m_pFeatureLayer.FeatureClass.ShapeType==esriGeometryType.esriGeometryPolygon){IPointCollectionm_pPointCollection=newPolygonClass();objectmiss…

大家好,又见面了,我是你们的朋友全栈君。

arcgis二次开发arcgis二次开发

Arcgis二次开发常用源代码

1.点上生成面的代码

if (m_pFeatureLayer.FeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon) { IPointCollection m_pPointCollection = new PolygonClass(); object missing = Type.Missing; int icount = newFeature.XLIST.Count; if (icount < 3) return; for (int i = 0; i < icount; i++) { IPoint point = new PointClass(); point.PutCoords(newFeature.XLIST, newFeature.YLIST); m_pPointCollection.AddPoint(point, ref missing, ref missing); } IPolygon m_pPolygon = m_pPointCollection as IPolygon; if (m_pPolygon == null) { System.Windows.Forms.MessageBox.Show(“null”); return; } else { ITopologicalOperator pTopo = m_pPolygon as ITopologicalOperator; if (pTopo != null) { pTopo.Simplify(); } } IWorkspaceEdit m_pWorkspaceEdit = m_EngineEditor.EditWorkspace as IWorkspaceEdit; m_pWorkspaceEdit.StartEditOperation(); IFeature m_pFeature = m_pFeatureLayer.FeatureClass.CreateFeature(); m_pFeature.Shape = m_pPolygon as IGeometry; m_pFeature.Store(); m_pWorkspaceEdit.StopEditOperation(); }

2.文件的打开 保存 另存的代码

using System;

using System.Windows.Forms;

using ESRI.ArcGIS.esriSystem;

using ESRI.ArcGIS.SystemUI;

using ESRI.ArcGIS.Carto;

namespace SaveMapDocument

{

///

/// Summary description for Form1.

///

public class SaveMapDocument : System.Windows.Forms.Form

{

public System.Windows.Forms.TextBox txtMapDocument;

public System.Windows.Forms.Button cmdOpen;

public System.Windows.Forms.Button cmdSave;

public System.Windows.Forms.Button cmdSaveAs;

private System.Windows.Forms.OpenFileDialog openFileDialog1;

private System.Windows.Forms.SaveFileDialog saveFileDialog1;

private IMapDocument m_MapDocument;

private ESRI.ArcGIS.Controls.AxToolbarControl axToolbarControl1;

private ESRI.ArcGIS.Controls.AxPageLayoutControl axPageLayoutControl1;

private ESRI.ArcGIS.Controls.AxLicenseControl axLicenseControl1;

private ESRI.ArcGIS.Controls.AxTOCControl axTOCControl1;

///

/// Required designer variable.

///

private System.ComponentModel.Container components = null;

本文来自电脑杂谈,转载请注明本文网址:

http://www.pc-fly.com/a/tongxinshuyu/article-22954-1.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/150128.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号