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

推荐订阅源

月光博客
月光博客
MyScale Blog
MyScale Blog
博客园 - Franky
The Cloudflare Blog
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
WordPress大学
WordPress大学
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
The Blog of Author Tim Ferriss
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
aimingoo的专栏
aimingoo的专栏
J
Java Code Geeks
腾讯CDC
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
博客园 - 【当耐特】
美团技术团队
云风的 BLOG
云风的 BLOG

博客园 - 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