• 大小: 13.72MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-06
  • 语言: C/C++
  • 标签: hdf  c++  

资源简介

用Visual C++编写的实现HDF文件的源代码,根据该代码可实现hdf遥感图像的读取和保存-Using Visual C++ implementation of the HDF file to prepare the source code, according to the code of the implementation of remote sensing image hdf read and save

资源截图

代码片段和文件信息

// MainFrm.cpp : implementation of the CMainframe class
//

#include “stdafx.h“
#include “zdy.h“

#include “MainFrm.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMainframe

IMPLEMENT_DYNCREATE(CMainframe CframeWnd)

BEGIN_MESSAGE_MAP(CMainframe CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
ON_WM_CREATE()
ON_COMMAND(ID_WRITE OnWrite)
ON_COMMAND(ID_READ OnRead)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

static UINT indicators[] =
{
ID_SEPARATOR           // status line indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};

/////////////////////////////////////////////////////////////////////////////
// CMainframe construction/destruction

CMainframe::CMainframe()
{
// TODO: add member initialization code here

}

CMainframe::~CMainframe()
{
}

int CMainframe::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CframeWnd::OnCreate(lpCreateStruct) == -1)
return -1;

if (!m_wndToolBar.CreateEx(this TBstyle_FLAT WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed to create toolbar\n“);
return -1;      // fail to create
}

if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators
  sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed to create status bar\n“);
return -1;      // fail to create
}

// TODO: Delete these three lines if you don‘t want the toolbar to
//  be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);

return 0;
}

BOOL CMainframe::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CframeWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
//  the CREATESTRUCT cs

return TRUE;
}

/////////////////////////////////////////////////////////////////////////////
// CMainframe diagnostics

#ifdef _DEBUG
void CMainframe::AssertValid() const
{
CframeWnd::AssertValid();
}

void CMainframe::Dump(CDumpContext& dc) const
{
CframeWnd::Dump(dc);
}

#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMainframe message handlers


void CMainframe::OnWrite() 
{
// TODO: Add your command handler code here
int8 FileName[9]=“test.hdf“;//文件名
float64 Parameter[2][16]={0.0070 //定标系数
0.0221E-3
0.1120.003
0.3770.01
1.1880.035
2.3290.095
3.4560.228
3.7220.421
3.2420.669
2.1240.989
1.0491.525
0.3292.142
0.0513.342
0.0955.131
0.6287.04
1.6868.784};
float64 Data[16][16]={1.02.03.04.05.06.07.08.09.010.011.012.013.014.015

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2245  2008-01-07 14:12  zdy-WriteReadHdf\zdy.clw

     文件       4239  2007-02-06 10:02  zdy-WriteReadHdf\ReadMe.txt

     文件       1323  2007-02-06 10:02  zdy-WriteReadHdf\zdy.h

     文件       4155  2007-02-06 10:02  zdy-WriteReadHdf\zdy.cpp

     文件        205  2007-02-06 10:02  zdy-WriteReadHdf\StdAfx.cpp

     文件       1442  2007-02-06 10:02  zdy-WriteReadHdf\zdyDoc.h

     文件       1682  2007-02-06 10:02  zdy-WriteReadHdf\zdyDoc.cpp

     文件       1843  2007-02-06 10:02  zdy-WriteReadHdf\zdyView.h

     文件       2489  2007-02-06 10:02  zdy-WriteReadHdf\zdyView.cpp

     文件        529  2007-02-06 10:02  zdy-WriteReadHdf\zdy.dsw

     文件     123904  2008-01-07 14:14  zdy-WriteReadHdf\zdy.ncb

     文件        735  2007-03-06 15:09  zdy-WriteReadHdf\zdy.plg

     文件       1094  2007-02-06 10:08  zdy-WriteReadHdf\StdAfx.h

     文件       4566  2007-02-06 10:08  zdy-WriteReadHdf\zdy.dsp

     文件   33562345  2007-02-06 08:34  zdy-WriteReadHdf\TEST.hdf

     文件        202  2007-01-12 09:04  zdy-WriteReadHdf\CALIB.txt

     文件       1491  2007-03-06 14:29  zdy-WriteReadHdf\MainFrm.h

     文件      11736  2007-03-06 14:48  zdy-WriteReadHdf\zdy.rc

     文件        684  2007-03-06 14:48  zdy-WriteReadHdf\Resource.h

     文件      28620  2008-01-07 14:11  zdy-WriteReadHdf\zdy.aps

     文件       5911  2007-03-06 15:09  zdy-WriteReadHdf\MainFrm.cpp

     文件      86972  2005-02-18 09:15  zdy-WriteReadHdf\Lib\hd421md.lib

     文件      17280  2005-02-18 09:15  zdy-WriteReadHdf\Lib\hm421md.lib

     文件       3690  2005-01-28 00:26  zdy-WriteReadHdf\Lib\szlibdll.lib

     文件      10590  2004-10-05 09:08  zdy-WriteReadHdf\Lib\zdll.lib

     目录          0  2007-04-03 15:57  zdy-WriteReadHdf\Lib

     文件      11833  1997-11-13 08:50  zdy-WriteReadHdf\HDF_include\atom.h

     文件      24265  1996-03-28 15:57  zdy-WriteReadHdf\HDF_include\bitvect.h

     文件       3756  1997-10-24 16:00  zdy-WriteReadHdf\HDF_include\cdeflate.h

     文件       4391  1997-10-24 16:00  zdy-WriteReadHdf\HDF_include\cnbit.h

............此处省略57个文件信息

评论

共有 条评论