增加vrt 数据转 envidata格式数据
parent
baa5f446a6
commit
005abdb827
|
@ -13,6 +13,7 @@
|
|||
#include "QResampleRefrenceRaster.h"
|
||||
#include "QtLookTableCorrectOffsetDialog.h"
|
||||
#include "QtCreateGPSPointsDialog.h"
|
||||
#include "RasterVRT2ENVIdataDialog.h"
|
||||
|
||||
GF3ImportDataToolButton::GF3ImportDataToolButton(QWidget* parent) :QToolAbstract(parent)
|
||||
{
|
||||
|
@ -115,6 +116,7 @@ void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWi
|
|||
emit toolbox->addBoxToolItemSIGNAL(new QResampleRefrenceRasterToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QLookTableCorrectOffsetToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new QCreateGPSPointsToolButton(toolbox));
|
||||
emit toolbox->addBoxToolItemSIGNAL(new RasterVRT2ENVIdataDialogToolButton(toolbox));
|
||||
}
|
||||
|
||||
QDEMResampleDialogToolButton::QDEMResampleDialogToolButton(QWidget* parent)
|
||||
|
@ -215,4 +217,21 @@ void QCreateGPSPointsToolButton::excute()
|
|||
{
|
||||
QtCreateGPSPointsDialog* dialog = new QtCreateGPSPointsDialog;
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
RasterVRT2ENVIdataDialogToolButton::RasterVRT2ENVIdataDialogToolButton(QWidget* parent)
|
||||
{
|
||||
this->toolPath = QVector<QString>(0);
|
||||
this->toolPath.push_back(u8"基础处理");
|
||||
this->toolname = QString(u8"vrt文件转换envi数据格式");
|
||||
}
|
||||
|
||||
RasterVRT2ENVIdataDialogToolButton::~RasterVRT2ENVIdataDialogToolButton()
|
||||
{
|
||||
}
|
||||
|
||||
void RasterVRT2ENVIdataDialogToolButton::run()
|
||||
{
|
||||
RasterVRT2ENVIdataDialog* dialog = new RasterVRT2ENVIdataDialog;
|
||||
dialog->show();
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ namespace LAMPMainWidget {
|
|||
class ToolBoxWidget;
|
||||
|
||||
|
||||
extern "C" BASETOOLBOX_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
||||
|
||||
class BASETOOLBOX_EXPORT GF3ImportDataToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -132,4 +134,18 @@ public slots:
|
|||
|
||||
};
|
||||
|
||||
extern "C" BASETOOLBOX_EXPORT void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox);
|
||||
|
||||
|
||||
|
||||
|
||||
class BASETOOLBOX_EXPORT RasterVRT2ENVIdataDialogToolButton : public QToolAbstract {
|
||||
Q_OBJECT
|
||||
public:
|
||||
RasterVRT2ENVIdataDialogToolButton(QWidget* parent = nullptr);
|
||||
~RasterVRT2ENVIdataDialogToolButton();
|
||||
public :
|
||||
virtual void run() override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -207,6 +207,7 @@
|
|||
<ClCompile Include="BaseToolbox\QResampleRefrenceRaster.cpp" />
|
||||
<ClCompile Include="BaseToolbox\QtCreateGPSPointsDialog.cpp" />
|
||||
<ClCompile Include="BaseToolbox\QtLookTableCorrectOffsetDialog.cpp" />
|
||||
<ClCompile Include="BaseToolbox\RasterVRT2ENVIdataDialog.cpp" />
|
||||
<ClCompile Include="BaseToolbox\SatelliteGF3xmlParser.cpp" />
|
||||
<ClCompile Include="BaseToolbox\SateOrbit.cpp" />
|
||||
<ClCompile Include="BaseToolbox\simptsn.cpp" />
|
||||
|
@ -225,6 +226,7 @@
|
|||
<QtMoc Include="BaseToolbox\QResampleRefrenceRaster.h" />
|
||||
<QtMoc Include="BaseToolbox\QtLookTableCorrectOffsetDialog.h" />
|
||||
<QtMoc Include="BaseToolbox\QtCreateGPSPointsDialog.h" />
|
||||
<QtMoc Include="BaseToolbox\RasterVRT2ENVIdataDialog.h" />
|
||||
<ClInclude Include="BaseToolbox\SatelliteGF3xmlParser.h" />
|
||||
<ClInclude Include="BaseToolbox\SateOrbit.h" />
|
||||
<ClInclude Include="BaseToolbox\simptsn.h" />
|
||||
|
@ -246,6 +248,7 @@
|
|||
<QtUic Include="BaseToolbox\QResampleRefrenceRaster.ui" />
|
||||
<QtUic Include="BaseToolbox\QtCreateGPSPointsDialog.ui" />
|
||||
<QtUic Include="BaseToolbox\QtLookTableCorrectOffsetDialog.ui" />
|
||||
<QtUic Include="BaseToolbox\RasterVRT2ENVIdataDialog.ui" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\BaseCommonLibrary\BaseCommonLibrary.vcxproj">
|
||||
|
|
|
@ -106,6 +106,9 @@
|
|||
<ClCompile Include="BaseToolbox\QtCreateGPSPointsDialog.cpp">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="BaseToolbox\RasterVRT2ENVIdataDialog.cpp">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="BaseToolbox\DEMLLA2XYZTool.h">
|
||||
|
@ -147,6 +150,9 @@
|
|||
<QtMoc Include="BaseToolbox\QtCreateGPSPointsDialog.h">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="BaseToolbox\RasterVRT2ENVIdataDialog.h">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="BaseToolbox\DEMLLA2XYZTool.ui">
|
||||
|
@ -185,5 +191,8 @@
|
|||
<QtUic Include="BaseToolbox\QtCreateGPSPointsDialog.ui">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="BaseToolbox\RasterVRT2ENVIdataDialog.ui">
|
||||
<Filter>BaseToolbox</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,78 @@
|
|||
#include "RasterVRT2ENVIdataDialog.h"
|
||||
#include "ui_RasterVRT2ENVIdataDialog.h"
|
||||
#include "BaseConstVariable.h"
|
||||
#include "BaseTool.h"
|
||||
#include "RasterToolBase.h"
|
||||
#include "LogInfoCls.h"
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include "ImageNetOperator.h"
|
||||
#include "ImageOperatorBase.h"
|
||||
|
||||
RasterVRT2ENVIdataDialog::RasterVRT2ENVIdataDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
,ui(new Ui::RasterVRT2ENVIdataDialogClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->pushButtonVRTSelect, SIGNAL(clicked()), this, SLOT(onpushButtonVRTSelect_clicked()));
|
||||
connect(ui->pushButtonENVIDatSelect, SIGNAL(clicked()), this, SLOT(onpushButtonENVIDatSelect_clicked()));
|
||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBox_accepted()));
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBox_rejected()));
|
||||
|
||||
}
|
||||
|
||||
RasterVRT2ENVIdataDialog::~RasterVRT2ENVIdataDialog()
|
||||
{}
|
||||
|
||||
void RasterVRT2ENVIdataDialog::onpushButtonVRTSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getOpenFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择L1B数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditVRTPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void RasterVRT2ENVIdataDialog::onpushButtonENVIDatSelect_clicked()
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择L1B数据文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
|
||||
);
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
QString message = "选择的文件有:\n";
|
||||
this->ui->lineEditENVIDatPath->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
||||
void RasterVRT2ENVIdataDialog::onbuttonBox_accepted()
|
||||
{
|
||||
QString vrtrasterpath = ui->lineEditVRTPath->text();
|
||||
QString envidatapath = ui->lineEditENVIDatPath->text();
|
||||
|
||||
ConvertVrtToEnvi(vrtrasterpath, envidatapath);
|
||||
|
||||
|
||||
QMessageBox::information(this, tr(u8"提示"), tr(u8"完成"));
|
||||
}
|
||||
|
||||
void RasterVRT2ENVIdataDialog::onbuttonBox_rejected()
|
||||
{
|
||||
this->close();
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class RasterVRT2ENVIdataDialogClass;
|
||||
}
|
||||
|
||||
|
||||
class RasterVRT2ENVIdataDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RasterVRT2ENVIdataDialog(QWidget *parent = nullptr);
|
||||
~RasterVRT2ENVIdataDialog();
|
||||
|
||||
|
||||
public slots:
|
||||
void onpushButtonVRTSelect_clicked();
|
||||
void onpushButtonENVIDatSelect_clicked();
|
||||
void onbuttonBox_accepted();
|
||||
void onbuttonBox_rejected();
|
||||
private:
|
||||
Ui::RasterVRT2ENVIdataDialogClass* ui;
|
||||
};
|
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>RasterVRT2ENVIdataDialogClass</class>
|
||||
<widget class="QDialog" name="RasterVRT2ENVIdataDialogClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>396</width>
|
||||
<height>156</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>RasterVRT2ENVIdataDialog</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pushButtonVRTSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEditENVIDatPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEditVRTPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pushButtonENVIDatSelect">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>vrt文件地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输出dat地址:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in New Issue