zoukankan      html  css  js  c++  java
  • arcgis 导出指定范围的地形图

    Sub outputMapBlock()

        If (MsgBox("是否开始导出图片,按指定范围?", vbYesNo) = vbNo) Then Exit Sub

        Dim pMxDoc As IMxDocument
        Set pMxDoc = ThisDocument
        Dim pActiveView As IActiveView
        Set pActiveView = pMxDoc.ActiveView

        Dim pExport As IExport
        Set pExport = New ExportJPEG
        pExport.ExportFileName = "C:\Test0.jpg"
        pExport.Resolution = 300
        
        Dim exportRECT As tagRECT
        With exportRECT
            .Left = 100
            .Right = 600
            .Top = 100
            .bottom = 600
        End With


    'exportRECT 表示导出的图片绘制范围
        
        Dim pPixelBoundsEnv As IEnvelope
        Set pPixelBoundsEnv = New Envelope
        pPixelBoundsEnv.PutCoords 605000, 100000, 606000, 101000 '指定导出的地形范围
        
        Dim pE As IEnvelope
        Set pE = New Envelope
        pE.XMin = 0
        pE.XMax = 700
        pE.YMin = 0
        pE.YMax = 700
        pExport.PixelBounds = pE '图片的大小
        
        Dim hDC As Long
        hDC = pExport.StartExporting
        
        
        pActiveView.Extent = pPixelBoundsEnv
        
        pActiveView.Output hDC, pExport.Resolution, exportRECT, pPixelBoundsEnv, Nothing

        pExport.FinishExporting
        pExport.Cleanup
    End Sub

  • 相关阅读:
    java访问mysql方法数据库
    iOS8:把这些七招APP哭
    String、StringBuffer与StringBuilder差分
    陈词滥调,正确使用memset
    spring Annotation 组分注塑
    类是公共,它应该被命名为.java文件声明
    【UVA】10012
    Android在ListView显示图片(重复混乱闪烁问题)
    oc-15-枚举结构体
    oc-15-self
  • 原文地址:https://www.cnblogs.com/zhangjun1130/p/2086780.html
Copyright © 2011-2022 走看看