⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arcengine9.2中如何读写shp.txt

📁 arcgisEngine对.shp文件的读写和修改
💻 TXT
字号:
请教一下,在AE中,如何读写*.shp对应的属性表里的数据。给个思路的方向就可以了,知道的告知一下,谢谢!


用IWorkspacefactory打开就可以读了撒


得把.shp数据导入到gdb数据库中,然后再操作。

已经解决,感谢楼上两位!
如下是读的代码


System.Data.OleDb.OleDbConnection shapeConn = new System.Data.OleDb.OleDbConnection();
            String oledbConnectionString;
            // Set the connection string.
            oledbConnectionString = "Provider=ESRI.GeoDB.OleDB.1;Data Source=F:\\map;Extended Properties=workspacetype=esriDataSourcesFile.ShapefileWorkspaceFactory.1;Geometry=WKB";
            shapeConn.ConnectionString = oledbConnectionString;
            // Open the connection.
            shapeConn.Open();
            System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand(" select * from  Area_region ", shapeConn);
            System.Data.OleDb.OleDbDataReader reader = command.ExecuteReader();

====
Area_region 是shape文件名,F:\\map是存放.shp文件的路径


这样好像只能读,不能写入吧


这样能写,但是只能做到SQL能做的事,也就是在那句SQL里面做文章,更多的操作就不能做了

IWorkSpaceEdit接口去实现


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -