• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

icsm-au / DynAdjust / 13494567994

24 Feb 2025 09:15AM UTC coverage: 81.168% (+2.0%) from 79.161%
13494567994

push

github

web-flow
Merge pull request #234 from icsm-au/1.2.8

Version 1.2.8 (fixes, ehnacements, improved datum management)

6131 of 8137 new or added lines in 90 files covered. (75.35%)

162 existing lines in 33 files now uncovered.

32214 of 39688 relevant lines covered (81.17%)

11775.25 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.44
/dynadjust/include/io/dnaioadj.cpp
1
//============================================================================
2
// Name         : dnaioadj.cpp
3
// Author       : Roger Fraser
4
// Contributors :
5
// Version      : 1.00
6
// Copyright    : Copyright 2017 Geoscience Australia
7
//
8
//                Licensed under the Apache License, Version 2.0 (the "License");
9
//                you may not use this file except in compliance with the License.
10
//                You may obtain a copy of the License at
11
//               
12
//                http ://www.apache.org/licenses/LICENSE-2.0
13
//               
14
//                Unless required by applicable law or agreed to in writing, software
15
//                distributed under the License is distributed on an "AS IS" BASIS,
16
//                WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
//                See the License for the specific language governing permissions and
18
//                limitations under the License.
19
//
20
// Description  : DynAdjust adjustment output file io operations
21
//============================================================================
22

23
#include <include/io/dnaioadj.hpp>
24
#include <include/config/dnaconsts-iostream.hpp>
25
#include <include/measurement_types/dnastation.hpp>
26

27
using namespace dynadjust::measurements;
28

29
namespace dynadjust { 
30
namespace iostreams {
31

32
void dna_io_adj::print_adj_stn_header(std::ostream& os)
111✔
33
{
34
        os << std::endl << "Adjusted Coordinates" << std::endl <<
111✔
35
                "------------------------------------------" << std::endl << std::endl;
111✔
36
}
111✔
37

NEW
38
void dna_io_adj::print_adj_stn_block_header(std::ostream& os, const UINT32& block)
×
39
{
NEW
40
        os << std::endl << "Adjusted Coordinates (Block " << block + 1 << ")" << std::endl <<
×
NEW
41
                "------------------------------------------" << std::endl << std::endl;
×
UNCOV
42
}
×
43

44
void dna_io_adj::print_stn_info_col_header(std::ostream& os, 
63✔
45
        const std::string& stn_coord_types, const UINT16& printStationCorrections)
46
{        
47
        os << std::setw(STATION) << std::left << "Station" << std::setw(CONSTRAINT) << std::left << "Const";
63✔
48

49
        _it_str_const it_s;
63✔
50
        UINT32 width(0);
63✔
51

52
        UINT32 j(STATION+CONSTRAINT);
63✔
53
        bool validType(true);
63✔
54
        
55
        for (it_s=stn_coord_types.begin(); it_s!=stn_coord_types.end(); ++it_s)
510✔
56
        {
57
                char c = it_s[0];
447✔
58

59
                validType = true;
447✔
60

61
                switch (c)
447✔
62
                {
63
                case 'P':
67✔
64
                case 'E':
67✔
65
                        width = LAT_EAST;
67✔
66
                        j += LAT_EAST;
67✔
67
                        break;
67✔
68
                case 'L':
67✔
69
                case 'N':
67✔
70
                        width = LON_NORTH;
67✔
71
                        j += LON_NORTH;
67✔
72
                        break;
67✔
73
                case 'H':
126✔
74
                case 'h':
126✔
75
                        width = HEIGHT;
126✔
76
                        j += HEIGHT;
126✔
77
                        break;
126✔
78
                case 'z':
4✔
79
                        width = ZONE;
4✔
80
                        j += ZONE;
4✔
81
                        break;
4✔
82
                case 'X':
183✔
83
                case 'Y':
183✔
84
                case 'Z':
183✔
85
                        width = XYZ;
183✔
86
                        j += XYZ;
183✔
87
                        break;
183✔
88
                default:
89
                        validType = false;
90
                }
91

92
                if (validType)
447✔
93
                        os << std::right << std::setw(width) << CDnaStation::CoordinateName(c);
1,341✔
94
        }        
95
        
96
        os << std::setw(PAD2) << " " << 
63✔
97
                std::right << std::setw(STDDEV) << "SD(e)" << 
63✔
98
                std::right << std::setw(STDDEV) << "SD(n)" << 
63✔
99
                std::right << std::setw(STDDEV) << "SD(up)";
63✔
100

101
        j += PAD2+STDDEV+STDDEV+STDDEV+PAD2+COMMENT;
63✔
102

103
        if (printStationCorrections)
63✔
104
        {
105
                os << std::setw(PAD2) << " " << 
24✔
106
                        std::right << std::setw(HEIGHT) << "Corr(e)" << 
24✔
107
                        std::right << std::setw(HEIGHT) << "Corr(n)" << 
24✔
108
                        std::right << std::setw(HEIGHT) << "Corr(up)";
24✔
109

110
                j += PAD2+HEIGHT+HEIGHT+HEIGHT;
24✔
111
        }
112

113
        os << std::setw(PAD2) << " " << std::left << "Description" << std::endl;
63✔
114

115
        UINT32 i;
116
        for (i=0; i<j; ++i)
14,254✔
117
                os << "-";
14,191✔
118
        os << std::endl;
63✔
119
}
63✔
120

121
} // dnaiostreams
122
} // dynadjust
123

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc