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

  • 相关阅读:
    1774:大逃杀
    Angular实现简单数据计算与删除
    IDEA 如何搭建maven 安装、下载、配置(图文)
    win10 Java JDK环境变量配置
    Nginx学习使用
    ASP.NET Core中返回 json 数据首字母大小写问题
    mysql使用遇到的问题
    线程同步以及AutoResetEvent
    Device Class
    Xamarin.Forms之布局压缩
  • 原文地址:https://www.cnblogs.com/zhangjun1130/p/2086780.html
Copyright © 2011-2022 走看看