36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
#pragma once
|
||
#include "gdal_priv.h"
|
||
#include "ogrsf_frmts.h" //for ogr
|
||
#include "gdal_alg.h" //for GDALPolygonize
|
||
#include "cpl_conv.h" //for CPLMalloc()
|
||
#include "QtGDALProcessBar.h"
|
||
#include <QDebug>
|
||
/**
|
||
* @brief 导出符号定义
|
||
*/
|
||
#ifndef STD_API
|
||
#define STD_API __stdcall
|
||
#endif
|
||
/**
|
||
* \brief 调用GDAL进度条接口
|
||
*
|
||
* 该函数用于将GDAL算法中的进度信息导出到CProcessBase基类中,供给界面显示
|
||
*
|
||
* @param dfComplete 完成进度值,其取值为 0.0 到 1.0 之间
|
||
* @param pszMessage 进度信息
|
||
* @param pProgressArg CProcessBase的指针
|
||
*
|
||
* @return 返回TRUE表示继续计算,否则为取消
|
||
*/
|
||
int STD_API ALGTermProgress(double dfComplete, const char* pszMessage, void* pProgressArg);
|
||
|
||
class img2shp
|
||
{
|
||
public:
|
||
int ImagePolygonize(const char* pszSrcFile, const char* pszDstFile, const char* pszFormat, int BandNum, QtGDALProcessBar* probar, QProgressBar* progressBar);
|
||
bool createChineseStringProperty(OGRLayer* poLayer, const char* filterFieldName, const char* createFieldName, vector<string> nameVal, float min, QProgressBar* progressBar);
|
||
protected:
|
||
private:
|
||
};
|
||
|