DianLi/DEM_GeneRas/im2shp.h
2023-03-13 16:13:20 +08:00

36 lines
1.0 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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:
};