1.增加了L1B级产品生产功能

2.增加基于经纬度采样的功能
pull/10/head
陈增辉 2025-04-10 18:32:25 +08:00
parent cd293e4a8e
commit a074003d6f
21 changed files with 1433 additions and 294 deletions

View File

@ -316,6 +316,21 @@ void BASECONSTVARIABLEAPI testOutDataArr(QString filename, long* data, long row
void BASECONSTVARIABLEAPI CreateSARIntensityByLookTable(QString IntensityRasterPath, QString LookTableRasterPath, QString SARIntensityPath, long min_rid, long max_rid, long min_cid, long max_cid, std::function<void(long, long)> processBarShow = {});
bool BASECONSTVARIABLEAPI ConvertVrtToEnvi(QString vrtPath, QString outPath);
void BASECONSTVARIABLEAPI MultiLookRaster(QString inRasterPath, QString outRasterPath, long looklineNumrow, long looklineNumCol);
ErrorCode BASECONSTVARIABLEAPI Complex2PhaseRaster(QString inComplexPath, QString outRasterPath);
ErrorCode BASECONSTVARIABLEAPI Complex2dBRaster(QString inComplexPath, QString outRasterPath);
ErrorCode BASECONSTVARIABLEAPI Complex2AmpRaster(QString inComplexPath, QString outRasterPath);
ErrorCode BASECONSTVARIABLEAPI ResampleDEM(QString indemPath, QString outdemPath, double gridx, double gridy);
//--------------------- 图像文件读写 ------------------------------

View File

@ -15,6 +15,8 @@
#include <QTextCodec>
#include <iostream>
#include <QFile>
#include "SARSimulationImageL1.h"
#include <QMessageBox>
namespace RasterToolBase {
long getProjectEPSGCodeByLon_Lat(double lon, double lat, ProjectStripDelta stripState)
@ -268,4 +270,7 @@ namespace RasterToolBase {
return CoordinateSystemType::UNKNOW;
}
}
} // namespace RasterToolBase
}; // namespace RasterToolBase

View File

@ -12,40 +12,42 @@
#include "BaseConstVariable.h"
#include "gdal_priv.h"
#include <memory>
#include "LogInfoCls.h"
namespace RasterToolBase {
static bool GDALAllRegisterEnable=false;
static bool GDALAllRegisterEnable = false;
enum ProjectStripDelta{
enum ProjectStripDelta {
Strip_6, // 6度带
Strip_3
};
enum CoordinateSystemType{ // 坐标系类型
enum CoordinateSystemType { // 坐标系类型
GeoCoordinateSystem,
ProjectCoordinateSystem,
UNKNOW
};
struct PointRaster{ // 影像坐标点
struct PointRaster { // 影像坐标点
double x;
double y;
double z;
};
struct PointXYZ{
double x,y,z;
struct PointXYZ {
double x, y, z;
};
struct PointGeo{
double lon,lat,ati;
struct PointGeo {
double lon, lat, ati;
};
struct PointImage{
double pixel_x,pixel_y;
struct PointImage {
double pixel_x, pixel_y;
};
/// 根据经纬度获取
@ -56,14 +58,14 @@ namespace RasterToolBase {
/// \param lat 纬度
/// \return 对应投影坐标系统的 EPSG编码,-1 表示计算错误
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat(double long, double lat,
ProjectStripDelta stripState = ProjectStripDelta::Strip_3);
ProjectStripDelta stripState = ProjectStripDelta::Strip_3);
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat_inStrip3(double lon, double lat);
long BASECONSTVARIABLEAPI getProjectEPSGCodeByLon_Lat_inStrip6(double lon, double lat);
QString BASECONSTVARIABLEAPI GetProjectionNameFromEPSG(long epsgCode) ;
QString BASECONSTVARIABLEAPI GetProjectionNameFromEPSG(long epsgCode);
long BASECONSTVARIABLEAPI GetEPSGFromRasterFile(QString filepath);
@ -72,9 +74,23 @@ namespace RasterToolBase {
CoordinateSystemType BASECONSTVARIABLEAPI getCoordinateSystemTypeByEPSGCode(long EPSGCODE);
};// namespace RasterProjectConvertor
// 遥感类常用数据
} // namespace RasterProjectConvertor
#endif // LAMPCAE_RASTERTOOLBASE_H

View File

@ -208,3 +208,9 @@ private:
};

File diff suppressed because it is too large Load Diff

View File

@ -60,12 +60,12 @@
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="QtSettings">
<QtInstall>tools_qt5</QtInstall>
<QtModules>core</QtModules>
<QtModules>core;gui;widgets</QtModules>
<QtBuildConfig>debug</QtBuildConfig>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="QtSettings">
<QtInstall>tools_qt5</QtInstall>
<QtModules>core</QtModules>
<QtModules>core;gui;widgets</QtModules>
<QtBuildConfig>debug</QtBuildConfig>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">

View File

@ -209,90 +209,6 @@ ErrorCode ImportGF3L1AProcess(QString inMetaxmlPath, QString outWorkDirPath)
return errorcode;
}
ErrorCode Complex2AmpRaster(QString inComplexPath, QString outRasterPath)
{
gdalImageComplex inimg(inComplexPath);
gdalImage ampimg = CreategdalImage(outRasterPath, inimg.height, inimg.width, inimg.band_num, inimg.gt, inimg.projection, true, true);
long blocklines = Memory1GB * 2 / 8 / inimg.width;
blocklines = blocklines < 100 ? 100 : blocklines;
Eigen::MatrixXd imgArrb1 = Eigen::MatrixXd::Zero(blocklines, ampimg.width);
Eigen::MatrixXcd imgArr = Eigen::MatrixXcd::Zero(blocklines, inimg.width);
long startrow = 0;
for (startrow = 0; startrow < inimg.height; startrow = startrow + blocklines) {
imgArrb1 = ampimg.getData(startrow, 0, blocklines, inimg.width, 1);
imgArr = inimg.getData(startrow, 0, blocklines, inimg.width, 2);
imgArrb1 = imgArr.array().abs();
ampimg.saveImage(imgArrb1, startrow, 0, 1);
}
qDebug() << "影像写入到:" << outRasterPath;
return ErrorCode::SUCCESS;
}
ErrorCode Complex2PhaseRaster(QString inComplexPath, QString outRasterPath)
{
gdalImageComplex inimg(inComplexPath);
gdalImage ampimg = CreategdalImage(outRasterPath, inimg.height, inimg.width, inimg.band_num, inimg.gt, inimg.projection, true, true);
long blocklines = Memory1GB * 2 / 8 / inimg.width;
blocklines = blocklines < 100 ? 100 : blocklines;
Eigen::MatrixXd imgArrb1 = Eigen::MatrixXd::Zero(blocklines, ampimg.width);
Eigen::MatrixXcd imgArr = Eigen::MatrixXcd::Zero(blocklines, inimg.width);
long startrow = 0;
for (startrow = 0; startrow < inimg.height; startrow = startrow + blocklines) {
imgArrb1 = ampimg.getData(startrow, 0, blocklines, inimg.width, 1);
imgArr = inimg.getData(startrow, 0, blocklines, inimg.width, 2);
imgArrb1 = imgArr.array().arg();
ampimg.saveImage(imgArrb1, startrow, 0, 1);
}
qDebug() << "影像写入到:" << outRasterPath;
return ErrorCode::SUCCESS;
}
ErrorCode Complex2dBRaster(QString inComplexPath, QString outRasterPath)
{
gdalImageComplex inimg(inComplexPath);
gdalImage ampimg = CreategdalImage(outRasterPath, inimg.height, inimg.width, inimg.band_num, inimg.gt, inimg.projection, true, true);
long blocklines = Memory1GB * 2 / 8 / inimg.width;
blocklines = blocklines < 100 ? 100 : blocklines;
Eigen::MatrixXd imgArrb1 = Eigen::MatrixXd::Zero(blocklines, ampimg.width);
Eigen::MatrixXcd imgArr = Eigen::MatrixXcd::Zero(blocklines, inimg.width);
long startrow = 0;
for (startrow = 0; startrow < inimg.height; startrow = startrow + blocklines) {
imgArrb1 = ampimg.getData(startrow, 0, blocklines, inimg.width, 1);
imgArr = inimg.getData(startrow, 0, blocklines, inimg.width, 2);
imgArrb1 = imgArr.array().abs().log10() * 20.0;
ampimg.saveImage(imgArrb1, startrow, 0, 1);
}
qDebug() << "影像写入到:" << outRasterPath;
return ErrorCode::SUCCESS;
}
ErrorCode ResampleDEM(QString indemPath, QString outdemPath, double gridx, double gridy)
{
double gridlat = gridy / 110000.0;
double gridlon = gridx / 100000.0;
long espgcode = GetEPSGFromRasterFile(indemPath.toUtf8().constData());
if (espgcode == 4326) {
resampleRaster(indemPath.toUtf8().constData(), outdemPath.toUtf8().constData(), gridlon, gridlat);
return ErrorCode::SUCCESS;
}
else {
QMessageBox::warning(nullptr, u8"警告", u8"请输入WGS84坐标的DEM影像");
return ErrorCode::FAIL;
}
}
ErrorCode RD_PSTN(double& refrange, double& lamda, double& timeR, double& R, double& tx, double& ty, double& tz, double& slopex, double& slopey, double& slopez, GF3PolyfitSatelliteOribtModel& polyfitmodel, SatelliteOribtNode& node, double& d0, double& d1, double& d2, double& d3, double& d4)
{
@ -605,7 +521,3 @@ ErrorCode GF3RDProcess(QString inxmlPath, QString indemPath, QString outworkdir,
}
return ErrorCode::SUCCESS;
}

View File

@ -17,14 +17,7 @@ QVector<QString> SearchGF3DataTiff(QString inMetaxmlPath);
POLARTYPEENUM getDatasetGF3FilePolsarType(QString fileName);
ErrorCode ImportGF3L1AProcess(QString inMetaxmlPath, QString outWorkDirPath);
// 复数转实部
ErrorCode Complex2AmpRaster(QString inComplexPath, QString outRasterPath);
//复数转相位
ErrorCode Complex2PhaseRaster(QString inComplexPath, QString outRasterPath);
ErrorCode Complex2dBRaster(QString inComplexPath, QString outRasterPath);
ErrorCode ResampleDEM(QString indemPath, QString outdemPath, double gridx, double gridy);
// RD Ëã·¨Àà
ErrorCode RD_PSTN(double& refrange,double& lamda, double& timeR, double& R, double& tx, double& ty, double& tz, double& slopex, double& slopey, double& slopez, GF3PolyfitSatelliteOribtModel& polyfitmodel, SatelliteOribtNode& node,double& d0,double& d1, double& d2, double& d3, double& d4);
@ -36,6 +29,3 @@ ErrorCode GF3OrthSLC( QString inRasterPath, QString inlooktablePath, QString out
// ÕýÉä´¦ÀíÁ÷³Ì
ErrorCode GF3RDProcess(QString inxmlPath, QString indemPath, QString outworkdir, double gridx, double gridy);

View File

@ -5,6 +5,7 @@
#include "BaseTool.h"
#include "SARSimulationImageL1.h"
#include "GF3CalibrationAndGeocodingClass.h"
#include "RasterToolBase.h"
QComplex2AmpPhase::QComplex2AmpPhase(QWidget *parent)
: QDialog(parent)

View File

@ -639,8 +639,6 @@ void InterploateClipAtiByRefDEM(QString ImageLLPath, QString& ImageDEMPath, QStr
}
int ReflectTable_WGS2Range(QString dem_rc_path,QString outOriSimTiffPath,QString ori_sim_count_tiffPath,long OriHeight,long OriWidth)
{
gdalImage sim_rc(dem_rc_path);
@ -783,7 +781,6 @@ int ReflectTable_WGS2Range(QString dem_rc_path,QString outOriSimTiffPath,QStrin
}
int ResampleEChoDataFromGeoEcho(QString L2echodataPath, QString RangeLooktablePath, QString L1AEchoDataPath) {
gdalImageComplex echodata(L2echodataPath);
gdalImage looktable(RangeLooktablePath);
@ -909,6 +906,126 @@ int ResampleEChoDataFromGeoEcho(QString L2echodataPath, QString RangeLooktablePa
}
void InterpLookTableRfromDEM(QString lonlatPath, QString DEMPath, QString outllrpath)
{
gdalImage LLimg(lonlatPath);
gdalImage demimg(DEMPath);
gdalImage LLRimg = CreategdalImageDouble(outllrpath, LLimg.height, LLimg.width, 3, true, true);
long llimgheight = LLimg.height;
long llimgWidth = LLimg.width;
Eigen::MatrixXd imglonArr = LLimg.getData(0, 0, llimgheight, llimgWidth, 1);
Eigen::MatrixXd imglatArr = LLimg.getData(0, 0, llimgheight, llimgWidth, 2);
Eigen::MatrixXd demArr = demimg.getData(0, 0, demimg.height, demimg.width, 1);
Eigen::MatrixXd outRArr = imglonArr.array() * 0;
LLRimg.saveImage(imglonArr, 0, 0, 1);
LLRimg.saveImage(imglatArr, 0, 0, 2);
for (long i = 0; i < llimgheight; i++) {
for (long j = 0; j < llimgWidth; j++) {
double lon = imglonArr(i, j);
double lat = imglatArr(i, j);
Landpoint point = demimg.getRow_Col(lon, lat);
if (point.lon<1 || point.lon>demimg.width - 2 || point.lat < 1 || point.lat - 2) {
continue;
}
else {}
Landpoint p0, p11, p21, p12, p22;
p0.lon = point.lon;
p0.lat = point.lat;
p11.lon = floor(p0.lon);
p11.lat = floor(p0.lat);
p11.ati = demArr(long(p11.lat), long(p11.lon));
p12.lon = ceil(p0.lon);
p12.lat = floor(p0.lat);
p12.ati = demArr(long(p12.lat), long(p12.lon));
p21.lon = floor(p0.lon);
p21.lat = ceil(p0.lat);
p21.ati = demArr(long(p21.lat), long(p21.lon));
p22.lon = ceil(p0.lon);
p22.lat = ceil(p0.lat);
p22.ati = demArr(long(p22.lat), long(p22.lon));
p0.lon = p0.lon - p11.lon;
p0.lat = p0.lat - p11.lat;
p12.lon = p12.lon - p11.lon;
p12.lat = p12.lat - p11.lat;
p21.lon = p21.lon - p11.lon;
p21.lat = p21.lat - p11.lat;
p22.lon = p22.lon - p11.lon;
p22.lat = p22.lat - p11.lat;
p11.lon = p11.lon - p11.lon;
p11.lat = p11.lat - p11.lat;
p0.ati = Bilinear_interpolation(p0, p11, p21, p12, p22);
outRArr(i, j) = p0.ati;
}
}
LLRimg.saveImage(outRArr, 0, 0, 3);
return;
}
void RangeLooktableLLA_2_RangeLooktableXYZ(QString LLAPath, QString outXYZPath)
{
gdalImage LLAimg(LLAPath);
gdalImage xyzimg = CreategdalImageDouble(outXYZPath, LLAimg.height, LLAimg.width, 3, true, true);
long llimgheight = LLAimg.height;
long llimgWidth = LLAimg.width;
Eigen::MatrixXd lonArr = LLAimg.getData(0, 0, llimgheight, llimgWidth, 1);
Eigen::MatrixXd latArr = LLAimg.getData(0, 0, llimgheight, llimgWidth, 2);
Eigen::MatrixXd atiArr = LLAimg.getData(0, 0, llimgheight, llimgWidth, 3);
// ʹÓÃLLA×¥»»ÎªXYZ
Eigen::MatrixXd xArr = lonArr.array() * 0;
Eigen::MatrixXd yArr = lonArr.array() * 0;
Eigen::MatrixXd zArr = lonArr.array() * 0;
for (long i = 0; i < llimgheight; i++) {
for (long j = 0; j < llimgWidth; j++) {
double lon = lonArr(i, j);
double lat = latArr(i, j);
double ati = atiArr(i, j);
Landpoint p{ lon,lat,ati };
Landpoint XYZP=LLA2XYZ(p);
xArr(i, j) = XYZP.lon;
yArr(i, j) = XYZP.lat;
zArr(i, j) = XYZP.ati;
}
}
xyzimg.saveImage(xArr, 0, 0, 1);
xyzimg.saveImage(yArr, 0, 0, 2);
xyzimg.saveImage(zArr, 0, 0, 3);
return;
}

View File

@ -17,4 +17,10 @@ int ReflectTable_WGS2Range(QString dem_rc_path, QString outOriSimTiffPath, QStr
int ResampleEChoDataFromGeoEcho(QString L2echodataPath, QString RangeLooktablePath, QString L1AEchoDataPath);
void InterpLookTableRfromDEM(QString lonlatPath, QString DEMPath, QString outllrpath);
void RangeLooktableLLA_2_RangeLooktableXYZ(QString LLAPath, QString outXYZPath);
#endif

View File

@ -0,0 +1,114 @@
#include "QL1ASARProcessDialog.h"
#include "ui_QL1ASARProcessDialog.h"
#include "BaseConstVariable.h"
#include "BaseTool.h"
#include "RasterToolBase.h"
#include "LogInfoCls.h"
#include <QMessageBox>
#include <QFileDialog>
#include "ImageNetOperator.h"
#include "ImageOperatorBase.h"
QL1ASARProcessDialog::QL1ASARProcessDialog(QWidget *parent)
: QDialog(parent)
,ui(new Ui::QL1ASARProcessDialogClass)
{
ui->setupUi(this);
connect(ui->pushButtonL1BSelect, SIGNAL(clicked()), this, SLOT(onpushButtonL1BSelect_clicked()));
connect(ui->pushButtonL1ASelect, SIGNAL(clicked()), this, SLOT(onpushButtonL1ASelect_clicked()));
connect(ui->pushButtonS1ASelect, SIGNAL(clicked()), this, SLOT(onpushButtonS1ASelect_clicked()));
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBox_accepted()));
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBox_rejected()));
}
QL1ASARProcessDialog::~QL1ASARProcessDialog()
{
}
void QL1ASARProcessDialog::onpushButtonL1BSelect_clicked()
{
QString fileNames = QFileDialog::getSaveFileName(
this, // 父窗口
tr(u8"选择L1B数据文件"), // 标题
QString(), // 默认路径
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
);
// 如果用户选择了文件
if (!fileNames.isEmpty()) {
QString message = "选择的文件有:\n";
this->ui->lineEditL1ADataPath->setText(fileNames);
}
else {
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
}
}
void QL1ASARProcessDialog::onpushButtonL1ASelect_clicked()
{
QString fileNames = QFileDialog::getOpenFileName(
this, // 父窗口
tr(u8"选择L1A数据文件"), // 标题
QString(), // 默认路径
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
);
// 如果用户选择了文件
if (!fileNames.isEmpty()) {
QString message = "选择的文件有:\n";
this->ui->lineEditL1ADataPath->setText(fileNames);
}
else {
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
}
}
void QL1ASARProcessDialog::onpushButtonS1ASelect_clicked()
{
QString fileNames = QFileDialog::getSaveFileName(
this, // 父窗口
tr(u8"选择单视斜距振幅产品文件"), // 标题
QString(), // 默认路径
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
);
// 如果用户选择了文件
if (!fileNames.isEmpty()) {
QString message = "选择的文件有:\n";
this->ui->lineSlAPath->setText(fileNames);
}
else {
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
}
}
void QL1ASARProcessDialog::onbuttonBox_accepted()
{
QString l1arasterpath = ui->lineEditL1ADataPath->text();
QString s1arasterpath = ui->lineSlAPath->text();
QString l1brasterpath = ui->lineEditL1BDataPath->text();
long nlaz = ui->spinBoxLNAz->value();
long nlra = ui->spinBoxLNRa->value();
qDebug() << "单视斜距复数产品 转 单视斜距幅度产品";
Complex2AmpRaster(l1arasterpath, s1arasterpath);
qDebug() << "单视斜距幅度产品 转 多视斜距幅度产品";
MultiLookRaster(s1arasterpath, l1brasterpath, nlaz, nlra);
QMessageBox::information(this, tr(u8"提示"), tr(u8"多视处理完成"));
}
void QL1ASARProcessDialog::onbuttonBox_rejected()
{
this->close();
}

View File

@ -0,0 +1,30 @@
#pragma once
#include <QDialog>
namespace Ui {
class QL1ASARProcessDialogClass;
};
class QL1ASARProcessDialog : public QDialog
{
Q_OBJECT
public:
QL1ASARProcessDialog(QWidget *parent = nullptr);
~QL1ASARProcessDialog();
public slots:
void onpushButtonL1BSelect_clicked();
void onpushButtonL1ASelect_clicked();
void onpushButtonS1ASelect_clicked();
void onbuttonBox_accepted();
void onbuttonBox_rejected();
private:
Ui::QL1ASARProcessDialogClass* ui;
};

View File

@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QL1ASARProcessDialogClass</class>
<widget class="QDialog" name="QL1ASARProcessDialogClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>475</width>
<height>354</height>
</rect>
</property>
<property name="windowTitle">
<string>QL1ASARProcessDialog</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditL1ADataPath">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineSlAPath">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" 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="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>单视振幅产品:</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="pushButtonL1BSelect">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>选择</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>L1B</string>
</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>L1A产品</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="pushButtonL1ASelect">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>选择</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditL1BDataPath">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>多视参数</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>方位向视数:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBoxLNAz">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>方位向视数:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="spinBoxLNRa">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButtonS1ASelect">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>选择</string>
</property>
</widget>
</item>
<item row="4" column="0">
<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>

View File

@ -0,0 +1,124 @@
#include "QLonLatInterpAtiFromDEM.h"
#include "ui_QLonLatInterpAtiFromDEM.h"
#include "BaseConstVariable.h"
#include "BaseTool.h"
#include "RasterToolBase.h"
#include "LogInfoCls.h"
#include <QMessageBox>
#include <QFileDialog>
#include "ImageNetOperator.h"
QLonLatInterpAtiFromDEM::QLonLatInterpAtiFromDEM(QWidget *parent)
: QDialog(parent)
,ui(new Ui::QLonLatInterpAtiFromDEMClass)
{
ui->setupUi(this);
connect(ui->pushButtonLonLatRasterSelect, SIGNAL(clicked()), this, SLOT(onpushButtonLonLatRasterSelect_clicked()));
connect(ui->pushButtonDEMRasterSelect, SIGNAL(clicked()), this, SLOT(onpushButtonDEMRasterSelect_clicked()));
connect(ui->pushButtonLLARasterSelect, SIGNAL(clicked()), this, SLOT(onpushButtonLLARasterSelect_clicked()));
connect(ui->pushButtonXYZRasterSelect, SIGNAL(clicked()), this, SLOT(onpushButtonXYZRasterSelect_clicked()));
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbuttonBox_accepted()));
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbuttonBox_rejected()));
}
QLonLatInterpAtiFromDEM::~QLonLatInterpAtiFromDEM()
{
}
void QLonLatInterpAtiFromDEM::onpushButtonLonLatRasterSelect_clicked()
{
QString fileNames = QFileDialog::getOpenFileName(
this, // 父窗口
tr(u8"选择坐标点数据文件"), // 标题
QString(), // 默认路径
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
);
// 如果用户选择了文件
if (!fileNames.isEmpty()) {
QString message = "选择的文件有:\n";
this->ui->lineEditLonLatRasterPath->setText(fileNames);
}
else {
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
}
}
void QLonLatInterpAtiFromDEM::onpushButtonDEMRasterSelect_clicked()
{
QString fileNames = QFileDialog::getOpenFileName(
this, // 父窗口
tr(u8"选择DEM数据文件"), // 标题
QString(), // 默认路径
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
);
// 如果用户选择了文件
if (!fileNames.isEmpty()) {
QString message = "选择的文件有:\n";
this->ui->lineEditDEMRasterPath->setText(fileNames);
}
else {
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
}
}
void QLonLatInterpAtiFromDEM::onpushButtonLLARasterSelect_clicked()
{
QString fileNames = QFileDialog::getSaveFileName(
this, // 父窗口
tr(u8"选择保存采样后数据文件"), // 标题
QString(), // 默认路径
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
);
// 如果用户选择了文件
if (!fileNames.isEmpty()) {
QString message = "选择的文件有:\n";
this->ui->lineEditLLARasterPath->setText(fileNames);
}
else {
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
}
}
void QLonLatInterpAtiFromDEM::onpushButtonXYZRasterSelect_clicked()
{
QString fileNames = QFileDialog::getSaveFileName(
this, // 父窗口
tr(u8"选择采样后转换数据文件"), // 标题
QString(), // 默认路径
tr(ENVI_FILE_FORMAT_FILTER) // 文件过滤器
);
// 如果用户选择了文件
if (!fileNames.isEmpty()) {
QString message = "选择的文件有:\n";
this->ui->lineEditXYZRasterPath->setText(fileNames);
}
else {
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
}
}
void QLonLatInterpAtiFromDEM::onbuttonBox_accepted()
{
QString llrasterpath = ui->lineEditLonLatRasterPath->text();
QString demrasterpath = ui->lineEditDEMRasterPath->text();
QString llarasterpath = ui->lineEditLLARasterPath->text();
QString xyzrasterpath = ui->lineEditXYZRasterPath->text();
qDebug() << "从DEM采样高程中。。。。";
InterpLookTableRfromDEM(llrasterpath, demrasterpath, llarasterpath);
qDebug() << "经纬度转换为XYZ中。。。。";
RangeLooktableLLA_2_RangeLooktableXYZ(llarasterpath, xyzrasterpath);
QMessageBox::information(this, tr(u8"提示"), tr(u8"完成"));
}
void QLonLatInterpAtiFromDEM::onbuttonBox_rejected()
{
this->close();
}

View File

@ -0,0 +1,29 @@
#pragma once
#include <QDialog>
namespace Ui {
class QLonLatInterpAtiFromDEMClass;
}
class QLonLatInterpAtiFromDEM : public QDialog
{
Q_OBJECT
public:
QLonLatInterpAtiFromDEM(QWidget *parent = nullptr);
~QLonLatInterpAtiFromDEM();
public slots:
void onpushButtonLonLatRasterSelect_clicked();
void onpushButtonDEMRasterSelect_clicked();
void onpushButtonLLARasterSelect_clicked();
void onpushButtonXYZRasterSelect_clicked();
void onbuttonBox_accepted();
void onbuttonBox_rejected();
private:
Ui::QLonLatInterpAtiFromDEMClass* ui;
};

View File

@ -0,0 +1,191 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QLonLatInterpAtiFromDEMClass</class>
<widget class="QDialog" name="QLonLatInterpAtiFromDEMClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>400</height>
</rect>
</property>
<property name="windowTitle">
<string>QLonLatInterpAtiFromDEM</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<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>经纬度数据矩阵:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditLonLatRasterPath">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="pushButtonLonLatRasterSelect">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>选择</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>待采样DEM</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEditDEMRasterPath">
<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="pushButtonDEMRasterSelect">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>选择</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>采样矩阵LLA</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditLLARasterPath">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="pushButtonLLARasterSelect">
<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">
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>采样矩阵XYZ</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEditXYZRasterPath">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pushButtonXYZRasterSelect">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>选择</string>
</property>
</widget>
</item>
<item row="4" 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>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
</ui>

View File

@ -13,6 +13,8 @@
#include "QLookTableResampleFromWGS84ToRange.h"
#include "QSARSimulationComplexEchoDataDialog.h"
#include "QSimulationBPImageMultiProduction.h"
#include "QLonLatInterpAtiFromDEM.h"
#include "QL1ASARProcessDialog.h"
void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWidget* toolbox)
@ -31,6 +33,7 @@ void RegisterPreToolBox(LAMPMainWidget::RasterMainWidget* mainwindows, ToolBoxWi
emit toolbox->addBoxToolItemSIGNAL(new QLookTableResampleFromWGS84ToRangeToolButton(toolbox));
emit toolbox->addBoxToolItemSIGNAL(new QSARSimulationComplexEchoDataDialogToolButton(toolbox));
emit toolbox->addBoxToolItemSIGNAL(new QSimulationBPImageMultiProductionToolButton(toolbox));
emit toolbox->addBoxToolItemSIGNAL(new QLonLatInterpAtiFromDEMToolButton(toolbox));
}
@ -279,3 +282,37 @@ void QSimulationBPImageMultiProductionToolButton::run()
QSimulationBPImageMultiProduction* dialog = new QSimulationBPImageMultiProduction;
dialog->show();
}
QLonLatInterpAtiFromDEMToolButton::QLonLatInterpAtiFromDEMToolButton(QWidget* parent)
{
this->toolPath = QVector<QString>(0);
this->toolPath.push_back(u8"成像工具库");
this->toolname = QString(u8"生产斜距成像平面");
}
QLonLatInterpAtiFromDEMToolButton::~QLonLatInterpAtiFromDEMToolButton()
{
}
void QLonLatInterpAtiFromDEMToolButton::run()
{
QLonLatInterpAtiFromDEM* dialog = new QLonLatInterpAtiFromDEM;
dialog->show();
}
QL1ASARProcessDialogToolButton::QL1ASARProcessDialogToolButton(QWidget* parent)
{
this->toolPath = QVector<QString>(0);
this->toolPath.push_back(u8"成像工具库");
this->toolname = QString(u8"L1A级产品处理");
}
QL1ASARProcessDialogToolButton::~QL1ASARProcessDialogToolButton()
{
}
void QL1ASARProcessDialogToolButton::run()
{
QL1ASARProcessDialog* dialog = new QL1ASARProcessDialog;
dialog->show();
}

View File

@ -175,3 +175,31 @@ public:
};
class SIMULATIONSARTOOL_EXPORT QLonLatInterpAtiFromDEMToolButton : public QToolAbstract {
Q_OBJECT
public:
QLonLatInterpAtiFromDEMToolButton(QWidget* parent = nullptr);
~QLonLatInterpAtiFromDEMToolButton();
public:
virtual void run() override;
};
class SIMULATIONSARTOOL_EXPORT QL1ASARProcessDialogToolButton : public QToolAbstract {
Q_OBJECT
public:
QL1ASARProcessDialogToolButton(QWidget* parent = nullptr);
~QL1ASARProcessDialogToolButton();
public:
virtual void run() override;
};

View File

@ -221,6 +221,8 @@
<ClCompile Include="SARImage\ImagePlaneAtiInterpDialog.cpp" />
<ClCompile Include="SARImage\InitCreateImageXYZDialog.cpp" />
<ClCompile Include="SARImage\QCreateInSARImagePlaneXYZRDialog.cpp" />
<ClCompile Include="SARImage\QL1ASARProcessDialog.cpp" />
<ClCompile Include="SARImage\QLonLatInterpAtiFromDEM.cpp" />
<ClCompile Include="SARImage\QSARSimulationComplexEchoDataDialog.cpp" />
<ClCompile Include="SARImage\QSimulationBPImageMultiProduction.cpp" />
<ClCompile Include="SimulationSAR\QEcoherentAndAdditive.cpp" />
@ -256,6 +258,8 @@
<QtMoc Include="SARImage\QCreateInSARImagePlaneXYZRDialog.h" />
<QtMoc Include="SARImage\QSARSimulationComplexEchoDataDialog.h" />
<QtMoc Include="SARImage\QSimulationBPImageMultiProduction.h" />
<QtMoc Include="SARImage\QLonLatInterpAtiFromDEM.h" />
<QtMoc Include="SARImage\QL1ASARProcessDialog.h" />
<ClInclude Include="SimulationSARToolAPI.h" />
<ClInclude Include="simulationsartool_global.h" />
<QtMoc Include="SimulationSAR\QImageSARRFPC.h" />
@ -295,6 +299,8 @@
<QtUic Include="SARImage\ImagePlaneAtiInterpDialog.ui" />
<QtUic Include="SARImage\InitCreateImageXYZDialog.ui" />
<QtUic Include="SARImage\QCreateInSARImagePlaneXYZRDialog.ui" />
<QtUic Include="SARImage\QL1ASARProcessDialog.ui" />
<QtUic Include="SARImage\QLonLatInterpAtiFromDEM.ui" />
<QtUic Include="SARImage\QSARSimulationComplexEchoDataDialog.ui" />
<QtUic Include="SARImage\QSimulationBPImageMultiProduction.ui" />
<QtUic Include="SimulationSAR\QEcoherentAndAdditive.ui" />

View File

@ -157,6 +157,12 @@
<ClCompile Include="SARImage\QSARSimulationComplexEchoDataDialog.cpp">
<Filter>SARImage</Filter>
</ClCompile>
<ClCompile Include="SARImage\QLonLatInterpAtiFromDEM.cpp">
<Filter>SARImage</Filter>
</ClCompile>
<ClCompile Include="SARImage\QL1ASARProcessDialog.cpp">
<Filter>SARImage</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<QtUic Include="SimulationSAR\QImageSARRFPC.ui">
@ -207,6 +213,12 @@
<QtUic Include="SARImage\QSimulationBPImageMultiProduction.ui">
<Filter>SARImage</Filter>
</QtUic>
<QtUic Include="SARImage\QLonLatInterpAtiFromDEM.ui">
<Filter>SARImage</Filter>
</QtUic>
<QtUic Include="SARImage\QL1ASARProcessDialog.ui">
<Filter>SARImage</Filter>
</QtUic>
</ItemGroup>
<ItemGroup>
<QtMoc Include="SimulationSAR\QImageSARRFPC.h">
@ -260,6 +272,12 @@
<QtMoc Include="SARImage\QSimulationBPImageMultiProduction.h">
<Filter>SARImage</Filter>
</QtMoc>
<QtMoc Include="SARImage\QLonLatInterpAtiFromDEM.h">
<Filter>SARImage</Filter>
</QtMoc>
<QtMoc Include="SARImage\QL1ASARProcessDialog.h">
<Filter>SARImage</Filter>
</QtMoc>
</ItemGroup>
<ItemGroup>
<CudaCompile Include="SimulationSAR\GPURFPC.cu">