Skip to content

Commit

Permalink
ortho change
Browse files Browse the repository at this point in the history
  • Loading branch information
noh.56 committed Feb 27, 2020
1 parent e6f60c1 commit 09d7906
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
30 changes: 23 additions & 7 deletions setsm_code.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,7 @@ int SETSMmainfunction(TransParam *return_param, char* _filename, ARGINFO args, c

if(!args.check_ortho)
{
double seedDEM_gridsize;
printf("minmaxH = %f\t%f\n",ori_minmaxHeight[0],ori_minmaxHeight[1]);
printf("seed fff %d\n",proinfo->pre_DEMtif);
if(SetupParam(proinfo,&NumOfIAparam, &pre_DEM_level, &DEM_level,&proinfo->pre_DEMtif,&check_tile_array ))
Expand Down Expand Up @@ -2426,14 +2427,24 @@ int SETSMmainfunction(TransParam *return_param, char* _filename, ARGINFO args, c
if(!args.check_Matchtag)
{
if (version > 2.0128) {
proinfo->seedDEMsigma = 20;
if(args.seedDEMsigma < 10)
proinfo->seedDEMsigma = 10;
else
proinfo->seedDEMsigma = args.seedDEMsigma;
}
else {
proinfo->seedDEMsigma = 100;
}
}
printf("sigma %f\n",proinfo->seedDEMsigma);
}
else if(strstr(bufstr,"Output Resolution=")!=NULL)
{
printf("%s\n",bufstr);
double version;
sscanf(bufstr,"Output Resolution=%lf\n",&seedDEM_gridsize);
printf("seed DEM gridsize %f\n",seedDEM_gridsize);
}

}

Expand Down Expand Up @@ -2576,7 +2587,7 @@ int SETSMmainfunction(TransParam *return_param, char* _filename, ARGINFO args, c

bin_angle = 360.0/18.0;

SetTiles(proinfo,proinfo->IsSP,proinfo->IsRR, Boundary, Res, tile_size, proinfo->pre_DEMtif, &pyramid_step, &buffer_area,
SetTiles(seedDEM_gridsize,proinfo,proinfo->IsSP,proinfo->IsRR, Boundary, Res, tile_size, proinfo->pre_DEMtif, &pyramid_step, &buffer_area,
&iter_row_start, &iter_row_end, &t_col_start, &t_col_end, &subX, &subY);

long int* count_matched_pts = (long int*)calloc(sizeof(long int),(iter_row_end - iter_row_start + 1)*(t_col_end - t_col_start + 1));
Expand Down Expand Up @@ -5720,7 +5731,7 @@ void SetTransParam_param(TransParam *param, bool Hemisphere)
param->c = (param->sa*param->sa)/param->sb;
}

void SetTiles(ProInfo *info, bool IsSP, bool IsRR, double *Boundary, double *Res, int tile_size, bool pre_DEMtif, uint8 *pyramid_step, uint16 *buffer_area,
void SetTiles(double seedDEM_gridsize, ProInfo *info, bool IsSP, bool IsRR, double *Boundary, double *Res, int tile_size, bool pre_DEMtif, uint8 *pyramid_step, uint16 *buffer_area,
uint8 *iter_row_start, uint8 *iter_row_end, uint8 *t_col_start, uint8 *t_col_end, double *subX, double *subY)
{
int lengthOfX = Boundary[2] - Boundary[0];
Expand All @@ -5737,11 +5748,16 @@ void SetTiles(ProInfo *info, bool IsSP, bool IsRR, double *Boundary, double *Res

if(info->pre_DEMtif)
{
if(info->seedDEMsigma <= 15)
*pyramid_step = 2;
else if(info->seedDEMsigma <= 30)
*pyramid_step = 3;
info->seedDEMsigma = 25*seedDEM_gridsize;

if(seedDEM_gridsize >= 8)
{
*pyramid_step = 3;
}
else
{
*pyramid_step = 2;
}
}

if(info->DEM_resolution >= 10)
Expand Down
2 changes: 1 addition & 1 deletion setsm_code.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool OpenProject(char* _filename, ProInfo *info, ARGINFO args);
int Maketmpfolders(ProInfo *info);
bool SetupParam(ProInfo *info,uint8 *NumOfIAparam, uint8 *pre_DEM_level, uint8 *DEM_level, bool *pre_DEMtif, bool *check_tile_array);
void SetTransParam(double minLat, double minLon, bool *Hemisphere, TransParam *param);
void SetTiles(ProInfo *info, bool IsSP, bool IsRR, double *Boundary, double *Res, int tile_size, bool pre_DEMtif, uint8 *pyramid_step, uint16 *buffer_area,
void SetTiles(double seedDEM_gridsize, ProInfo *info, bool IsSP, bool IsRR, double *Boundary, double *Res, int tile_size, bool pre_DEMtif, uint8 *pyramid_step, uint16 *buffer_area,
uint8 *iter_row_start, uint8 *iter_row_end, uint8 *t_col_start, uint8 *t_col_end, double *subX, double *subY);
void SetTiles_RA(ProInfo *info, bool IsSP, bool IsRR, double *Boundary, double *Res, int tile_size, bool pre_DEMtif, uint8 *pyramid_step, uint16 *buffer_area,
uint8 *RA_row_start, uint8 *RA_row_end, uint8 * RA_row_iter, uint8 *t_col_start, uint8 *t_col_end, uint8 *RA_col_iter, double *subX, double *subY);
Expand Down

0 comments on commit 09d7906

Please sign in to comment.