| 217 | network += PvlKeyword("Version", "5"); |
| 218 | |
| 219 | foreach (ControlPoint *controlPoint, m_points) { |
| 220 | PvlObject pvlPoint("ControlPoint"); |
| 221 | |
| 222 | if ( controlPoint->GetType() == ControlPoint::Fixed ) { |
| 223 | pvlPoint += PvlKeyword("PointType", "Fixed"); |
| 224 | } |
| 225 | |
| 226 | else if ( controlPoint->GetType() == ControlPoint::Constrained ) { |
| 227 | pvlPoint += PvlKeyword("PointType", "Constrained"); |
| 228 | } |
| 229 | |
| 230 | else { |
| 231 | pvlPoint += PvlKeyword("PointType", "Free"); |
| 232 | } |
| 233 | |
| 234 | if ( controlPoint->GetId().isEmpty() ) { |
| 235 | QString msg = "Unable to write control net to PVL file. " |
| 236 | "Invalid control point has no point ID value."; |
| 237 | throw IException(IException::Unknown, msg, _FILEINFO_); |
| 238 | } |
| 239 | else { |
| 240 | pvlPoint += PvlKeyword("PointId", controlPoint->GetId()); |
| 241 | } |
| 242 | if ( QString::compare(controlPoint->GetChooserName(), "Null", Qt::CaseInsensitive) != 0 ) { |
| 243 | pvlPoint += PvlKeyword("ChooserName", controlPoint->GetChooserName()); |
| 244 | } |
| 245 | if ( QString::compare(controlPoint->GetDateTime(), "Null", Qt::CaseInsensitive) != 0 ) { |
| 246 | pvlPoint += PvlKeyword("DateTime", controlPoint->GetDateTime()); |
| 247 | } |
| 248 | if ( controlPoint->IsEditLocked() ) { |
| 249 | pvlPoint += PvlKeyword("EditLock", "True"); |
| 250 | } |
| 251 | if ( controlPoint->IsIgnored() ) { |
| 252 | pvlPoint += PvlKeyword("Ignore", "True"); |
| 253 | } |
| 254 | |
| 255 | switch ( controlPoint->GetAprioriSurfacePointSource() ) { |
| 256 | case ControlPoint::SurfacePointSource::None: |
| 257 | break; |
| 258 | case ControlPoint::SurfacePointSource::User: |
| 259 | pvlPoint += PvlKeyword("AprioriXYZSource", "User"); |
| 260 | break; |
| 261 | case ControlPoint::SurfacePointSource::AverageOfMeasures: |
| 262 | pvlPoint += PvlKeyword("AprioriXYZSource", "AverageOfMeasures"); |
| 263 | break; |
| 264 | case ControlPoint::SurfacePointSource::Reference: |
| 265 | pvlPoint += PvlKeyword("AprioriXYZSource", "Reference"); |
| 266 | break; |
| 267 | case ControlPoint::SurfacePointSource::Basemap: |
| 268 | pvlPoint += PvlKeyword("AprioriXYZSource", "Basemap"); |
| 269 | break; |
| 270 | case ControlPoint::SurfacePointSource::BundleSolution: |
| 271 | pvlPoint += PvlKeyword("AprioriXYZSource", "BundleSolution"); |
| 272 | break; |
| 273 | } |
| 274 | |
| 275 | if ( controlPoint->HasAprioriSurfacePointSourceFile() ) { |
| 276 | pvlPoint += PvlKeyword("AprioriXYZSourceFile", |
nothing calls this directly
no test coverage detected