自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(104)
  • 资源 (3)
  • 收藏
  • 关注

原创 arcengine 修改符号大小

IFeatureLayer pLayer = SurveyExtensionClass.GetLayerByName(ReadConfig.GetValue("LayerName", "注记点"), "规划编制设计地图") as IFeatureLayer;if (pLClass.Label == "标高注记")

2023-11-30 13:58:35 73

原创 arcengine 修改图层标注大小

ILayer pLKXlayer = SurveyExtensionClass.GetLayerByName(ReadConfig.GetValue("LayerName", "注记线"), null);//修改图层标注大小。

2023-11-30 10:09:22 63

原创 获得要素的中心点

获得要素的中心点

2022-09-28 16:43:19 138 1

原创 调用ArcToolBox里的Tool的三种方法

调用ArcToolBox里的Tool的三种方法

2022-09-20 16:49:08 245

原创 PostGIS 空间计算

1、度/秒互转UPDATE 表名 SET geom = st_scale(shape, 1/3600.0,1/3600.0)2、geom转wkt字符串SELETC st_astext(t.shape)3、wkt字符串转geom 并设置坐标系SELECT st_setsrid(ST_GeomFromText('POINT(428626.908 110737.8)'), 4326)4、获取图形中心点坐标SELECT ST_X(st_centroid(c.shape))

2022-05-24 09:14:44 1473

原创 ArcEngine 结合sql语句查询示例

// 正常查询条件 IQueryFilter pQueryFilter = new QueryFilter(); pQueryFilter.SubFields = "gridcode,pgridcode"; pQueryFilter.WhereClause = string.Format("pgridcode='{0}'", pgridcode.ToString()); ...

2022-05-16 19:02:10 297

原创 ArcEngine 求线的角度

IPolyline line = new PolylineClass();ISegment s=(line as ISegmentCollection).get_Segment(0);//IPolyline需要先转换成ISegment才能转换成ILinedouble angel=(s as ILine).Angle ;

2022-04-19 11:31:29 370

原创 AE 获取线中圆弧部分

IPolyline line = feature.Shape as IPolyline; ISegmentCollection seg = line as ISegmentCollection; ISegment s = null; for (int i = 0; i < seg.SegmentCount; i++) ...

2022-03-29 09:12:40 147

原创 arcengine 画曲线

IPolyline line1 = new PolylineClass(); ISegmentCollection seg = new RingClass(); IConstructCircularArc pConstructCircularArc = new CircularArcClass(); pConstructCircularArc.Co...

2022-03-29 09:10:27 237

原创 arceneinge 在屏幕上画线

//可选参数的设置 object Missing = Type.Missing; //定义一个多义线对象 IPolyline line1 = new PolylineClass(); IPointCollection ptclo1 = line1 as IPointCollection; ...

2022-03-29 09:08:03 159

原创 arcengine线转面

//平头缓冲区 IGeometry pFlatBuffer = CreateBuffer(pinFeat.Shape, esriBufferConstructionEndEnum.esriBufferFlat, esriBufferConstructionSideEnum.esriBufferFull, kd); //圆头缓冲区 //IGeometry pGeo = pinFeat.Sh...

2021-12-27 16:39:13 325

原创 Arcengine 屏幕坐标转图层坐标

IActiveView pView = ArcMap.Document.ActiveView; ESRI.ArcGIS.Display.IDisplayTransformation displayTransformation = pView.ScreenDisplay.DisplayTransformation; ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = pVie...

2021-12-16 10:02:52 187

原创 搜索GDB中所有图层名字

public void SearchGDBFeatureClass(string GDBpath){IWorkspaceFactory m_pWorkspaceFactory = new FileGDBWorkspaceFactoryClass();IWorkspace pWorkspace = m_pWorkspaceFactory.OpenFromFile(GDBpath, 0);IFeatureWorksp...

2021-06-02 14:42:15 292

原创 AE gp工具类

1、联合 //gp联合 public IFeatureClass gpUnion(List<IFeatureClass> features, string tempName) { IGeoProcessorResult result = null; IFeatureClass pFeatureClass = null; try { ...

2021-05-25 11:02:34 314

原创 ArcEngine 设置矢量图层的透明度

ILayer pLayer = this.axMapControl1.get_Layer(0);    if (pLayer is IFeatureLayer)//如果第一个图层时矢量图层{ ILayerEffects pLayerEffects = pLayer as ILayerEffects;pLayerEffects.Tr...

2021-03-30 11:11:44 322

原创 addins 调用ArcToolBox里的Tool

//Set a reference to the IGPCommandHelper2 interface. IGPToolCommandHelper2 pToolHelper = new GPToolCommandHelperClass() as IGPToolCommandHelper2; //Set the tool you want to invoke. string sArcgisPath = CGKY...

2021-03-09 16:49:08 184

原创 c# zip工具类

using ICSharpCode.SharpZipLib.Checksums;using ICSharpCode.SharpZipLib.Zip;using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Web;namespace CGKY.Common{ public class SharpZipHelper ...

2021-03-09 15:08:35 311

原创 arcengine 导出成shp

/// <summary> /// 导出要素类 /// </summary> /// <param name="pSourceFeatureClass"></param>数据源 /// <param name="pQueryFilter"></param>筛选条件 /// <param name="filePath"></p...

2021-03-09 09:19:04 670 2

原创 arcengine 删除图层所有要素

IFeatureClass pFeatureClass = pFeatureWorkspace.OpenFeatureClass("temp.shp"); //删除shp元素 (pFeatureClass as ITable).DeleteSearchedRows(null);

2021-02-22 15:10:50 482

原创 arcengine 裁剪clip

IBasicGeoprocessor pBGeop = new BasicGeoprocessorClass(); IFeatureClassName pOutFeatureclassName = new FeatureClassNameClass(); //执行Clip操作 IFeatureClass pOutFeatureclass; pBGeop.SpatialReference =...

2021-02-07 11:17:15 639

原创 arcengine 建立缓冲区

IGeometry pGeo = pFeature.ShapeCopy; ITopologicalOperator pOpt = pGeo as ITopologicalOperator; IGeometry pBuffer = pOpt.Buffer(50);//50米的缓冲区

2021-02-03 15:24:48 321

原创 arcgis engine 获取图层选择要素

ICursor pCursor = null; IFeatureCursor pFeatCur = null; if (pFeatLyr == null) return null; //选定的特征集。 IFeatureSelection pFeatSel = pFeatLyr as IFeatureSelection; ISelectionSet pSelSet = pFeatSel.SelectionSet; if (pSelSet.Coun..

2021-01-12 14:43:56 550

原创 C#路径中获取文件全路径、目录、扩展名、文件名称

//获取当前运行程序的目录 string fileDir = Environment.CurrentDirectory; Console.WriteLine("当前程序目录:"+fileDir); //一个文件目录 string filePath = "C:\\JiYF\\BenXH\\BenXHCMS.xml"; Console.WriteLine("该文件的目...

2021-01-11 20:47:37 193

原创 arcgis engine 将图层要素复制到另一个图层

/// <summary> /// 将inFeatureClass要素类中所有符合pQueryFilter的要素复制到saveFeatureClass中,仅复制不做任何修改 /// </summary> /// <param name="inFeatureClass">源要素类</param> /// <param name="saveFeatureClass...

2021-01-11 15:56:21 3854

转载 ArcEngine查询、添加、删除要素的方法

1、查找数据1)、利用FeaturCursor进行空间查询//空间查询ISpatialFilter spatialFilter = new SpatialFilterClass();spatialFilter.Geometry = envelope;//指定几何体String shpFld = featureClass.ShapeFieldName;spatialFilter.GeometryField = shpFld;spatialFilter.SpatialRel = esri

2021-01-11 11:28:42 816

原创 arcgis engine 打开shp文件

//打开shp图层 IWorkspaceFactory wsf = new ShapefileWorkspaceFactory(); IWorkspace pWorkspace = wsf.OpenFromFile(shpPath, 0);//filePath为shapefile所在的文件夹 IFeatureWorkspace pFeatureWorkspace = pWorkspace as IFeatureWo...

2021-01-11 11:18:50 858

原创 arcgis engine 打开gdb

//打开gdb IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass(); IWorkspace workspace = workspaceFactory.OpenFromFile("e:\\数据\\data.gdb", 0); IFeatureWorkspace featureWorkspace = (IFeatureWork...

2021-01-11 10:30:14 2270

原创 arcgis engine 查询统计某一字段值的和

IQueryFilter pQueryFilter = new QueryFilterClass();pQueryFilter.WhereClause = sWhere;ICursor pCursor = (featureclass as ITable).Search(pQueryFilter, true);IDataStatistics pDataStat = new DataStatisticsClass() { Cursor = pCursor, Field = "SHAPE_Area" };

2021-01-11 09:47:07 661

原创 c# 文件类操作

1、复制文件 /// <summary> /// 复制文件 /// </summary> /// <param name="srcPath"></param> 原始文件夹 /// <param name="destPath"></param> 新建的文件夹 public void CopyDirectory(string srcPath, ...

2021-01-11 09:41:27 188 2

原创 arcgis engine 遍历图层组

for(inti=0;i<axMapMain.LayerCount;i++) { ILayerpGL=axMapMain.get_Layer(i); if(pGLisIGroupLayer) { ICompositeLayerpGroupLayer=pGLasICompositeLayer; for(intj=0;j<pGroup...

2021-01-11 09:30:16 383

原创 arcengine shp数据导入gdb中

GDB中不能已经存在要素类名称,否则报错 /// <summary> /// shp导入数据GDB /// </summary> /// <param name="pSourceFeatureClass">shp要素类</param> /// <param name="pQueryFilter">过滤器</param> /// &l...

2021-01-10 17:18:51 1332

原创 ArcEngine 导入mxd模板

IMapDocument mapDocument = new MapDocument(); //mapDocument.Open(@"D:\project\SurveyGIS\SurveyAddinPro\SurverAddin\bin\Debug\" + e.Node.Text + @".mxd", ""); mapDocument.Open(@".\" + templateName +...

2021-01-06 15:51:45 254

原创 AE 操作mxd

IMxdContents pMxdC; pMxdC = ArcMap.Document.FocusMap as IMxdContents; IMapDocument pMapDocument = new MapDocumentClass(); pMapDocument.New(path); IActiveView pActiveView = ArcMap.Document.FocusMa...

2021-01-05 11:33:24 187

原创 arcgis engine 统计查询的记录总数

IQueryFilter pQueryFilter = new QueryFilterClass();pQueryFilter.WhereClause = sWhere;IFeatureCursor pFeatureCursor = featureclass.Search(pQueryFilter, false);count = featureclass.FeatureCount(pQueryFilter);

2020-12-18 11:02:49 421

转载 ArcGIS Server之扩展几何网络分析

文章目录 1.引言2.在`ArcGIS Object`中进行几何网络分析。3.`SOE`扩展几何网络分析难点4.SOE扩展几何网络分析4.1 获得地图服务中的几何网络4.2 接受前台传来的数据(以点标记为例)4.3 自定义`IPointToEID`所具备的功能4.4 使用自定...

2020-12-18 10:58:17 675

原创 arcgis 计算矢量坐标

左下角经度 str(!shape.extent.XMin!)左下角纬度 str(!shape.extent.YMin!)右上角经度 str(!shape.extent.XMax!)右上角纬度 str(!shape.extent.YMax!)

2020-12-16 16:34:55 1207

原创 Proj4js wgs84与cgcs2000坐标转换示例

1、本地安装Node.js后,可以直接使用npm install proj4进行安装2、引用包中dist/proj4.js文件3、var wgs84 = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs '; var cgcs2000 = '+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs'; ...

2020-11-04 11:32:57 4850 1

转载 JavaScript利器分享之Proj4js

项目开发中,经常会有小伙伴们被火星坐标、CGCS2000、WGS84等诸多坐标系搞得晕头转向。当我们碰上不同坐标系叠加这样的需求时,我们的眼神可能是这似的 今天给大家分享一个JS利器——Proj4js。官方介绍:Proj4js is a JavaScript li...

2020-11-04 11:26:37 1142

转载 GIS空间查询(SpatialFilter)时各种空间关系总结

     在使用ISpatialFilter接口进行空间关系查询时,使用esriSpatialRelEnum枚举类型来判断空间关系。 1、esriSpatialRelContains(包含)和esriSpatialRelWithin(包含于)  应用范围:        所有要素类之间均具有该关系 描述:可细分为一个要素完全包含另一...

2020-10-30 11:19:34 1268

原创 vue 动态添加div

<div v-for="(item,index) in editSchProps" :key="index" > <el-form-item :label="item.code+'编码'" prop="code" :rules="userRules"> <el-input v-model="item.code" :maxlength="10...

2020-03-18 14:11:17 7774

c# mo的实例代码

public partial class Form1 : Form { public Form1() { InitializeComponent(); } private string dizhi; private int dindex { get { return this.listBox1.SelectedIndex; } } private void 打开ToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog file = new OpenFileDialog(); file.Filter = "(*.shp)|*.shp";//设置文件的筛选类型 file.Multiselect = true;//设置可以多选 file.InitialDirectory = Application.StartupPath;//设置文件对话框的初始路径为程序的调试文件夹 if (file.ShowDialog() == DialogResult.OK) {

2015-06-20

c++ 学生管理系统

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { sc = gcnew SqlConnection(); sc->ConnectionString=L"Data Source=OCYOFXAHSZFQJMN;Integrated Security=true;Initial Catalog=STUDENT "; sc->Open(); cmd = gcnew SqlCommand(); cmd->CommandText = "Select cno 课程号,cname 课程名,ctname 教师 from course where mno='"+this->textBox1->Text+"'"; cmd->CommandType = CommandType::Text; cmd->Connection = sc; sa = gcnew SqlDataAdapter(); sa->SelectCommand = cmd; ds = gcnew DataSet("FirstDS"); dt1 = gcnew DataTable("course"); ds->Tables->Add(dt1); sa->Fill(ds,"course"); dataGridView1->DataSource=ds->Tables[0]; sc->Close(); }

2015-06-02

五子棋 c# 代码示例

namespace 五子棋 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void On_paint(object sender, PaintEventArgs e)//初始化棋盘,画出棋盘 { Graphics gh = e.Graphics; Pen mypen = new Pen(Color.Black); for(int i = 0; i < 15; i++) { gh.DrawLine(mypen, 30 + i * 40, 50, 30 + i * 40, 610); gh.DrawLine(mypen, 30, 50 + i * 40, 590, 50 + i * 40); } }

2015-06-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除