默认头像
路人甲
路人甲
  • 注册日期2004-03-24
  • 发帖数15
  • QQ
  • 铜币174枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:2057回复:2

如何用程序加载ECW影像文件

楼主#
更多 发布于:2009-12-13 20:15

如何用程序加载ECW影像文件?

如何用程序设置一个图层的definition query?

喜欢0 评分0
默认头像
路人甲
路人甲
  • 注册日期2005-04-07
  • 发帖数5
  • QQ
  • 铜币140枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2010-01-12 16:31

问题解决自己顶吧

Private Sub 加载影像_Click()
   Dim pDox As IMxDocument
   Dim pMap As IMap
   Set pDox = ThisDocument
   Set pMap = pDox.FocusMap
   
   Dim pRasterLy As IRasterLayer
   Set pRasterLy = New RasterLayer
   pRasterLy.CreateFromFilePath "c:\yx.ecw"
   pMap.AddLayer pRasterLy

 Dim pActiveview As IActiveView
 Set pActiveview = pDox.ActivatedView
 pDox.UpdateContents
 pActiveview.Refresh
 
 Set pRasterLy = Nothing
 Set pMap = Nothing
 Set pDox = Nothing
End Sub

举报 回复(0) 喜欢(0)     评分
默认头像
路人甲
路人甲
  • 注册日期2005-04-07
  • 发帖数5
  • QQ
  • 铜币140枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2010-01-12 16:31
'Displays only the features that meet the definition expression<BR>'in this case only oregon<BR>Sub DefineLayer()<BR>Dim PDoc As IMxDocument<BR>Dim pMap As IMap<BR>Dim pFLayerDef As IFeatureLayerDefinition<BR>Set PDoc = ThisDocument<BR>Set pMap = PDoc.FocusMap<BR>Set pFLayerDef = pMap.Layer(0)<BR>pFLayerDef.DefinitionExpression = "STATE_NAME = 'Oregon'"<BR>PDoc.ActiveView.PartialRefresh esriViewGeography, Nothing, Nothing<BR>End Sub<BR>
举报 回复(0) 喜欢(0)     评分
默认头像

返回顶部