修复DEM LLA 2 XYZ 工具的并行bug

pull/5/head
chenzenghui 2025-02-24 16:01:01 +08:00
parent 45dd2e1246
commit e54361d26d
1 changed files with 7 additions and 5 deletions

View File

@ -38,15 +38,13 @@ void DEMLLA2XYZTool::onaccept()
//Eigen::MatrixXd demArr = demds.getData(0, 0, demds.height, demds.width, 1); //Eigen::MatrixXd demArr = demds.getData(0, 0, demds.height, demds.width, 1);
//Eigen::MatrixXd demR = demArr; //Eigen::MatrixXd demR = demArr;
Landpoint LandP{ 0,0,0 };
Point3 GERpoint{ 0,0,0 };
double R = 0; double R = 0;
double dem_row = 0, dem_col = 0, dem_alt = 0; double dem_row = 0, dem_col = 0, dem_alt = 0;
long line_invert = Memory1MB/8.0/ demds.width*2000; long line_invert = Memory1MB/8.0/ demds.width*1000;
double rowidx = 0;
double colidx = 0;
this->ui.label_3->setText("WGS84 : LLA -> XYZ"); this->ui.label_3->setText("WGS84 : LLA -> XYZ");
for (int max_rows_ids = 0; max_rows_ids < demds.height; max_rows_ids = max_rows_ids + line_invert) { for (int max_rows_ids = 0; max_rows_ids < demds.height; max_rows_ids = max_rows_ids + line_invert) {
@ -62,6 +60,10 @@ void DEMLLA2XYZTool::onaccept()
#pragma omp parallel for #pragma omp parallel for
for (int i = 0; i < datarows; i++) { for (int i = 0; i < datarows; i++) {
Landpoint LandP{ 0,0,0 };
Point3 GERpoint{ 0,0,0 };
double rowidx = 0;
double colidx = 0;
for (int j = 0; j < datacols; j++) { for (int j = 0; j < datacols; j++) {
rowidx = i + max_rows_ids; rowidx = i + max_rows_ids;
colidx = j; colidx = j;