IFeatureWorkspace OpenFeatureClass Example(转)
网络来源:http://changqingnew.blog.163.com/blog/static/1075233820103383633639/
//IFeatureWorkspace OpenFeatureClass Example
//This example opens a shapefile as a feature class。
//e.g., nameOfShapefile = "States";
// dataPath = "D:\\Data\\Esridata\\USA"
public void IFeatureWorkspace_OpenFeatureClass_Example(string dataPath, string nameOfShapefile)
{
IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactoryClass();
IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspaceFactory.OpenFromFile(dataPath, 0);
IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(nameOfShapefile);
Console.WriteLine("There are {0} features in the {1} feature class", featureClass.FeatureCount(new QueryFilterClass()), featureClass.AliasName);
}
//The generic form can be used with any type of workspace
//e.g., nameOfFeatureClass = "States";
//on ArcSDE use ISqlSyntax::QualifyTableName for fully qualified table names.
public IFeatureClass getIFeatureClass(IWorkspace workspace, string nameOfFeatureClass)
{
//cast for the feature workspace from the workspace
IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;
//open the featureclass
return featureWorkspace.OpenFeatureClass(nameOfFeatureClass);
}
IFeatureWorkspace OpenFeatureClass Example(转)的更多相关文章
- ArcGIS Engine开发之旅04---ARCGIS接口详细说明
原文:ArcGIS Engine开发之旅04---ARCGIS接口详细说明 ArcGIS接口详细说明... 1 1. IField接口(esriGeoDatabase)... 2 2. ...
- AE实现投影定义和投影转换
添加引用ESRI.ArcGIS.DataManagementTools 1.获取要定义和要转换的投影 IWorkspaceFactory wsf = new ShapefileWorkspaceFac ...
- IPoilygon转IPoint
private void 河流面转点ToolStripMenuItem_Click(object sender, EventArgs e) { ESRI.ArcGIS.Geodatabase.IWor ...
- IPointCollection转IPolyline
IPointCollection转线IPolyline: IPolyline pl = new PolylineClass(); IPointCollection ptc = pl as IPoint ...
- 打开shpfile,mdb,sde工作空间
打开shapefile工作空间: ESRI.ArcGIS.Geodatabase.IWorkspaceFactory wsf = new ESRI.ArcGIS.DataSourcesFile.Sha ...
- ARCGIS接口详细说明
ArcGIS接口详细说明 目录 ArcGIS接口详细说明... 1 1. IField接口(esriGeoDatabase)... 2 2. IFieldEdit接口(esriGe ...
- ArcEngine载入中SDE问题栅格数据
当直接加载矢量数据到IFeatureWorkspace接口可,但是,在装载门格当要传送的数据IRasterWorkspaceEx接口. 效果如下面的,对可以被添加到双击Globe在. watermar ...
- AE开发
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using Sy ...
- ArcGIS Engine问答:为什么地理数据库中不能产生同名要素类
之所以产生这种问题,其原因是不管一个要素类是直接放在工作空问中,还是放在工作空问的一个要素数据集中,这些区别不过逻辑上的,而它们的物理组成都是数据库中的一张二维表,并目表名就是要素类的名字.在一个数据 ...
随机推荐
- NoSQL数据库种类
NoSQL数据库的四大分类 键值(Key-Value)存储数据库 这一类数据库主要会使用到一个哈希表,这个表中有一个特定的键和一个指针指向特定的数据.Key/value模型对于IT系统来说的优 ...
- 在Mac下显示所有文件
显示所有隐藏文件: 第一个命令:defaults write com.apple.finder AppleShowAllFiles TRUE 回车后,迫使系统将用户资源库里Preferences文件夹 ...
- [转]Flash、Flex、AS3.0框架及类库资源收集之十全大补
原文地址:http://www.d5power.com/portal.php?mod=view&aid=27 APIs.Libs.Components1.as3ebaylibhttp://co ...
- mongodb分片认证
启动configsvr 1. 确保mongdb的configsvr是采用service模式启动的,即从/etc/init.d下的脚本启动的,其用户是mongod. 2. 确保mongod的配置文件完全 ...
- WPF中ListBox控件选择多个数据项
XAML: <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft ...
- div+css网页本地上和上传到服务器后在IE11上看到的效果不一样?
div+css网页本地上和上传到服务器后在IE11上看到的效果不一样? 解决办法在html的head里加上一段:<meta http-equiv="X-UA-Compatible&qu ...
- eclipse,android Localization (Internationalization) 安卓本地化(国际化)
1.创建新的资源文件,名字保持一致.提示"已存在",继续. 2.使用“语言”作为识别器,然后选择相应的语言代码.Tips:其他的适配,如国家.屏幕大小等,也是通过这里的识别器实现适 ...
- Node.js学习 - Web Server
Client - 客户端,一般指浏览器,浏览器可以通过 HTTP 协议向服务器请求数据. Server - 服务端,一般指 Web 服务器,可以接收客户端请求,并向客户端发送响应数据. Busines ...
- CodeForces 546 D. Soldier and Number Game(素数有关)
Description Two soldiers are playing a game. At the beginning first of them chooses a positive integ ...
- HDU 2609 How many
最小表示法+Map或者字典树,最小表示法找了个模板,还没学习呢... #include<cstdio> #include<cstring> #include<cmath& ...