惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
博客园 - 聂微东
S
SegmentFault 最新的问题
量子位
宝玉的分享
宝玉的分享
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页

博客园 - RayG

How to get data from Oracle DB in silverlight via WCF ? [Ray]How to use CString to create a font family - RayG [Copied] 80 VC++ tips [Copied]The GDI Coordinate Systems My Cheating Death solution in VC++ 3 given points, get the angle between two lines trouble shoot about using BindLayer in MapX with C# [原创] 计算几何常用算法(转) Trouble shooting about installation of ArcSDE 9.2 File type transform between ArcGIS and other major type - RayG [Tips] How to Add New field into Shapefile attribute table in ArcGIS ? 子非鱼,安知鱼之乐? [GuanRui] My program implement on Symbian S60 (#1: File IO) - RayG My XNA HitBee small game [GuanRui]How to open Path browse dialog in VBA of ArcGIS Desktop ? [Ray] My GPS (卫星定位接收器) tracker program on Symbian OS Binary Tree ANSI C Implement (2) - RayG Binary Tree ANSI C Implement (1) Graph & Topology & Shortest path
[Tips] How to converting a Coverage to a Shapefile ? - RayG
RayG · 2007-12-10 · via 博客园 - RayG

converts a coverage feature class (region) into a new shapefile with the proper feature type. The "canada" coverage from the data folder of the developer's samples is converted.

Sub CovertoShape()
 
' use IFeatureDataConverter::Convertfeatureclass to go from
 ' a coverage to shapefile
 ' Setup the output dataset
  Dim pPropset As IPropertySet
  
Dim pOUTshwsname As IWorkspaceName
  
Dim pOutShFCName As IFeatureClassName
  
Dim pOutshDSName As IDatasetName
  
Dim pInCovWorkspaceName As IWorkspaceName
  
Dim pInFCName As IFeatureClassName
  
Dim pCovDatasetName As IDatasetName
  
Dim pCovtoshape As IFeatureDataConverterSet pPropset = New PropertySet
  pPropset.SetProperty 
"DATABASE""D:\data\canada"Set pOUTshwsname = New WorkspaceName
  pOUTshwsname.ConnectionProperties 
= pPropset
  pOUTshwsname.WorkspaceFactoryProgID 
= "esriCore.shapefileWorkspaceFactory.1"
    
  
' create a new feature datset name object for the output
  ' canshape is a new shapefile polyline
  Set pOutShFCName = New FeatureClassName
  
Set pOutshDSName = pOutShFCName
  
Set pOutshDSName.WorkspaceName = pOUTshwsname
  pOutshDSName.name 
= "canshape"
   
  
' now get the name object for the input coverage feature dataset name.
  Set pInCovWorkspaceName = New WorkspaceName
  pInCovWorkspaceName.pathname 
= "D:\data\canada"
  pInCovWorkspaceName.WorkspaceFactoryProgID 
= "esriCore.ArcInfoWorkspaceFactory.1"
  
Set pInFCName = New FeatureClassName
  
Set pCovDatasetName = pInFCName
  pCovDatasetName.name 
= "canada:region.prov"
  
Set pCovDatasetName.WorkspaceName = pInCovWorkspaceName
  
  
' now use the conversion function convert the coverage to an Access feature dataset
  Set pCovtoshape = New FeatureDataConverter
  pCovtoshape.ConvertFeatureClass pInFCName, 
NothingNothing, pOutShFCName, NothingNothing""10000
  
  
MsgBox "Coverage conversion complete!"
End Sub