Minor clean up
This commit is contained in:
parent
e84b69efae
commit
de43172716
3 changed files with 67 additions and 64 deletions
|
@ -198,7 +198,6 @@ TGArray::parse( SGBucket& b ) {
|
|||
SG_LOG(SG_GENERAL, SG_DEBUG, " cols = " << cols << " rows = " << rows );
|
||||
SG_LOG(SG_GENERAL, SG_DEBUG, " col_step = " << col_step << " row_step = " << row_step );
|
||||
|
||||
|
||||
in_data = new short[cols * rows];
|
||||
memset(in_data, 0, sizeof(short) * cols * rows);
|
||||
SG_LOG(SG_GENERAL, SG_DEBUG, " File not open, so using zero'd data" );
|
||||
|
@ -254,7 +253,8 @@ void TGArray::write_bin(const string root_dir, bool rectified, SGBucket& b) {
|
|||
string base = b.gen_base_path();
|
||||
string path = root_dir + "/" + base;
|
||||
string extension = ".arr.new.gz";
|
||||
if (rectified) extension = ".arr.rectified.gz";
|
||||
if (rectified)
|
||||
extension = ".arr.rectified.gz";
|
||||
SGPath sgp( path );
|
||||
sgp.append( "dummy" );
|
||||
sgp.create_dir( 0755 );
|
||||
|
@ -924,4 +924,3 @@ bool TGArray::is_open() const
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ private:
|
|||
|
||||
// Whether or not the input data have been rectified
|
||||
bool rectified;
|
||||
|
||||
// Distance between column and row data points (in arc seconds)
|
||||
double col_step, row_step;
|
||||
|
||||
|
@ -61,6 +62,7 @@ private:
|
|||
|
||||
// list of cliff contours
|
||||
tgcontour_list cliffs_list;
|
||||
|
||||
void parse_bin();
|
||||
|
||||
// Routines for height rectification
|
||||
|
@ -68,6 +70,7 @@ private:
|
|||
bool is_bad_point(const int xgrid, const int ygrid, const std::vector<int> bad_points) const;
|
||||
double rectify_point(const int xgrid, const int ygrid, const std::vector<int> bad_points) const;
|
||||
bool is_near_cliff(const double lon1,const double lon2, const double bad_zone) const;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor
|
||||
|
@ -129,6 +132,7 @@ public:
|
|||
|
||||
// Check whether or not two points are on the same side of contour
|
||||
bool check_points (const double a,const double b, const double c, const double d) const;
|
||||
|
||||
// reset Array to initial state - ready to load another elevation file
|
||||
void unload( void );
|
||||
};
|
||||
|
|
|
@ -812,7 +812,7 @@ extern SGGeod InterpolateElevation( const SGGeod& dst_node, const SGGeod& start,
|
|||
|
||||
static void AddIntermediateNodes( const SGGeod& p0, const SGGeod& p1, bool preserve3d, std::vector<TGNode*>& nodes, tgContour& result, double bbEpsilon, double errEpsilon )
|
||||
{
|
||||
TGNode* new_pt;
|
||||
TGNode* new_pt = nullptr;
|
||||
SGGeod new_geode;
|
||||
|
||||
SG_LOG(SG_GENERAL, SG_BULK, " " << p0 << " <==> " << p1 );
|
||||
|
|
Loading…
Add table
Reference in a new issue