Isis 3.0 Programmer Reference
Back | Home
ControlNetFileV0002.cpp
1 #include "ControlNetFileV0002.h"
2 
3 #include <fstream>
4 
5 #include <google/protobuf/io/zero_copy_stream_impl.h>
6 #include <google/protobuf/io/coded_stream.h>
7 #include <boost/numeric/ublas/symmetric.hpp>
8 #include <boost/numeric/ublas/io.hpp>
9 
10 #include <QList>
11 #include <QDebug>
12 
13 #include "ControlMeasureLogData.h"
14 #include "ControlNetFileV0002.pb.h"
15 #include "FileName.h"
16 #include "IException.h"
17 #include "Latitude.h"
18 #include "Longitude.h"
19 #include "NaifStatus.h"
20 #include "Pvl.h"
21 #include "SurfacePoint.h"
22 #include "Target.h"
23 
24 using namespace google::protobuf;
25 using namespace google::protobuf::io;
26 using boost::numeric::ublas::symmetric_matrix;
27 using boost::numeric::ublas::upper;
28 using namespace std;
29 
30 namespace Isis {
31  ControlNetFileV0002::ControlNetFileV0002() {
32  p_networkHeader = new ControlNetFileHeaderV0002;
33  p_controlPoints = new QList<ControlPointFileEntryV0002>;
34  }
35 
36 
37  ControlNetFileV0002::~ControlNetFileV0002() {
38  delete p_networkHeader;
39  delete p_controlPoints;
40  }
41 
42 
43 
52  void ControlNetFileV0002::Read(const Pvl &header, const FileName &file) {
53  const PvlObject &protoBufferInfo = header.findObject("ProtoBuffer");
54  const PvlObject &protoBufferCore = protoBufferInfo.findObject("Core");
55 
56  BigInt headerStartPos = protoBufferCore["HeaderStartByte"];
57  BigInt headerLength = protoBufferCore["HeaderBytes"];
58 
59  fstream input(file.expanded().toLatin1().data(), ios::in | ios::binary);
60  if (!input.is_open()) {
61  IString msg = "Failed to open control network file" + file.name();
62  throw IException(IException::Programmer, msg, _FILEINFO_);
63  }
64 
65  input.seekg(headerStartPos, ios::beg);
66  streampos filePos = input.tellg();
67  IstreamInputStream headerInStream(&input);
68  CodedInputStream headerCodedInStream(&headerInStream);
69  // max 512MB, warn at 400MB
70  headerCodedInStream.SetTotalBytesLimit(1024 * 1024 * 512,
71  1024 * 1024 * 400);
72 
73  // Now stream the rest of the input into the google protocol buffer.
74  try {
75  filePos += headerLength;
76  int oldLimit = headerCodedInStream.PushLimit(headerLength);
77  if (!p_networkHeader->ParseFromCodedStream(&headerCodedInStream)) {
78  IString msg = "Failed to read input control net file [" +
79  file.name() + "]";
80  throw IException(IException::Io, msg, _FILEINFO_);
81  }
82  headerCodedInStream.PopLimit(oldLimit);
83 
84  // Without closing and re-opening the protocol buffers break... no clue
85  // why other than it's got some static data around keeping track
86  // maybe. We need to do this for it to reset it's idea of the total
87  // bytes though. Doing it every time is too expensive - so we're going
88  // to just do it periodically.
89  IstreamInputStream *pointInStream = NULL;
90  CodedInputStream *pointCodedInStream = NULL;
91 
92  for (int cp = 0; cp < p_networkHeader->pointmessagesizes_size(); cp ++) {
93  if (cp % 50000 == 0 && pointCodedInStream && pointInStream) {
94  delete pointCodedInStream;
95  pointCodedInStream = NULL;
96 
97  delete pointInStream;
98  pointInStream = NULL;
99  }
100 
101  if (pointInStream == NULL) {
102  input.close();
103  input.open(file.expanded().toLatin1().data(), ios::in | ios::binary);
104  input.seekg(filePos, ios::beg);
105 
106  pointInStream = new IstreamInputStream(&input);
107  pointCodedInStream = new CodedInputStream(pointInStream);
108  // max 512MB, warn at 400MB
109  pointCodedInStream->SetTotalBytesLimit(1024 * 1024 * 512,
110  1024 * 1024 * 400);
111  }
112 
113  int size = p_networkHeader->pointmessagesizes(cp);
114  oldLimit = pointCodedInStream->PushLimit(size);
115 
116  filePos += size;
118  newPoint.ParseFromCodedStream(pointCodedInStream);
119 
120  if (newPoint.type() == ControlPointFileEntryV0002::obsolete_Tie ||
121  newPoint.type() == ControlPointFileEntryV0002::obsolete_Ground) {
122  if (newPoint.aprioricovar_size())
123  newPoint.set_type(ControlPointFileEntryV0002::Constrained);
124  }
125 
126  p_controlPoints->append(newPoint);
127  pointCodedInStream->PopLimit(oldLimit);
128  }
129 
130  if (pointCodedInStream) {
131  delete pointCodedInStream;
132  pointCodedInStream = NULL;
133  }
134 
135  if (pointInStream) {
136  delete pointInStream;
137  pointInStream = NULL;
138  }
139  }
140  catch (...) {
141  string msg = "Cannot understand binary PB file";
142  throw IException(IException::Io, msg, _FILEINFO_);
143  }
144  }
145 
146  void ControlNetFileV0002::Write(const FileName &file) const {
147  // We need to populate ControlNetFileHeaderV0002::pointMessageSizes
148  p_networkHeader->clear_pointmessagesizes();
149  BigInt pointsSize = 0;
150  BigInt numMeasures = 0;
151  for (int cpIndex = 0; cpIndex < p_controlPoints->size(); cpIndex ++) {
152  numMeasures += p_controlPoints->at(cpIndex).measures_size();
153  int size = p_controlPoints->at(cpIndex).ByteSize();
154  pointsSize += size;
155  p_networkHeader->add_pointmessagesizes(size);
156  }
157 
158  streampos coreHeaderSize = p_networkHeader->ByteSize();
159 
160  const int labelBytes = 65536;
161  fstream output(file.expanded().toLatin1().data(),
162  ios::out | ios::trunc | ios::binary);
163 
164  char *blankLabel = new char[labelBytes];
165  memset(blankLabel, 0, labelBytes);
166  output.write(blankLabel, labelBytes);
167  delete [] blankLabel;
168 
169  streampos startCoreHeaderPos = output.tellp();
170 
171  if (!p_networkHeader->SerializeToOstream(&output)) {
172  IString msg = "Failed to write output control network file [" +
173  file.name() + "]";
174  throw IException(IException::Io, msg, _FILEINFO_);
175  }
176 
177  streampos curPosition = startCoreHeaderPos + coreHeaderSize;
178  for (int cpIndex = 0; cpIndex < p_controlPoints->size(); cpIndex ++) {
179  if (!p_controlPoints->at(cpIndex).IsInitialized()) {
180  IString msg = "Failed to write output control network file [" +
181  file.name() + "] because control points are missing required "
182  "fields";
183  throw IException(IException::Io, msg, _FILEINFO_);
184  }
185 
186  if (!p_controlPoints->at(cpIndex).SerializeToOstream(&output)) {
187  IString msg = "Failed to write output control network file [" +
188  file.name() + "] while attempting to write control points";
189  throw IException(IException::Io, msg, _FILEINFO_);
190  }
191 
192  curPosition += p_controlPoints->at(cpIndex).ByteSize();
193  }
194 
195  Pvl p;
196  PvlObject protoObj("ProtoBuffer");
197 
198  PvlObject protoCore("Core");
199  protoCore.addKeyword(PvlKeyword("HeaderStartByte",
200  toString((BigInt) startCoreHeaderPos)));
201  protoCore.addKeyword(PvlKeyword("HeaderBytes", toString((BigInt) coreHeaderSize)));
202  protoCore.addKeyword(PvlKeyword("PointsStartByte",
203  toString((BigInt) ( startCoreHeaderPos + coreHeaderSize))));
204  protoCore.addKeyword(PvlKeyword("PointsBytes",
205  toString(pointsSize)));
206  protoObj.addObject(protoCore);
207 
208  PvlGroup netInfo("ControlNetworkInfo");
209  netInfo.addComment("This group is for informational purposes only");
210  netInfo += PvlKeyword("NetworkId", p_networkHeader->networkid().c_str());
211  netInfo += PvlKeyword("TargetName", p_networkHeader->targetname().c_str());
212  netInfo += PvlKeyword("UserName", p_networkHeader->username().c_str());
213  netInfo += PvlKeyword("Created", p_networkHeader->created().c_str());
214  netInfo += PvlKeyword("LastModified", p_networkHeader->lastmodified().c_str());
215  netInfo += PvlKeyword("Description", p_networkHeader->description().c_str());
216  netInfo += PvlKeyword("NumberOfPoints", toString(p_controlPoints->size()));
217  netInfo += PvlKeyword("NumberOfMeasures", toString(numMeasures));
218  netInfo += PvlKeyword("Version", "2");
219  protoObj.addGroup(netInfo);
220 
221  p.addObject(protoObj);
222 
223  output.seekp(0, ios::beg);
224  output << p;
225  output << '\n';
226  output.close();
227  }
228 
229 
246  Pvl ControlNetFileV0002::toPvl() const {
247  Pvl pvl;
248  pvl.addObject(PvlObject("ControlNetwork"));
249  PvlObject &network = pvl.findObject("ControlNetwork");
250 
251  network += PvlKeyword("NetworkId", p_networkHeader->networkid().c_str());
252  network += PvlKeyword("TargetName", p_networkHeader->targetname().c_str());
253  network += PvlKeyword("UserName", p_networkHeader->username().c_str());
254  network += PvlKeyword("Created", p_networkHeader->created().c_str());
255  network += PvlKeyword("LastModified", p_networkHeader->lastmodified().c_str());
256  network += PvlKeyword("Description", p_networkHeader->description().c_str());
257 
258  // This is the Pvl version we're converting to
259  network += PvlKeyword("Version", "3");
260 
261  // Get Target Radii from naif kernel
262  PvlGroup pvlRadii;
263  QString target = (QString)network.findKeyword("TargetName",Pvl::Traverse);
264  if (target != "") {
265  try {
266  NaifStatus::CheckErrors();
267  pvlRadii = Target::radiiGroup(target);
268  }
269  catch (IException) {
270  // leave pvlRadii empty if target is not recognized by NAIF
271  }
272  }
273 
274  ControlPointFileEntryV0002 binaryPoint;
275  foreach(binaryPoint, *p_controlPoints) {
276  PvlObject pvlPoint("ControlPoint");
277 
278  if (binaryPoint.type() == ControlPointFileEntryV0002::Fixed) {
279  pvlPoint += PvlKeyword("PointType", "Fixed");
280  }
281  else if (binaryPoint.type() == ControlPointFileEntryV0002::Constrained) {
282  pvlPoint += PvlKeyword("PointType", "Constrained");
283  }
284  else {
285  pvlPoint += PvlKeyword("PointType", "Free");
286  }
287 
288  pvlPoint += PvlKeyword("PointId", binaryPoint.id().c_str());
289  pvlPoint += PvlKeyword("ChooserName", binaryPoint.choosername().c_str());
290  pvlPoint += PvlKeyword("DateTime", binaryPoint.datetime().c_str());
291 
292  if (binaryPoint.editlock()) {
293  pvlPoint += PvlKeyword("EditLock", "True");
294  }
295 
296  if (binaryPoint.ignore()) {
297  pvlPoint += PvlKeyword("Ignore", "True");
298  }
299 
300  switch (binaryPoint.apriorisurfpointsource()) {
301  case ControlPointFileEntryV0002::None:
302  break;
303  case ControlPointFileEntryV0002::User:
304  pvlPoint += PvlKeyword("AprioriXYZSource", "User");
305  break;
306  case ControlPointFileEntryV0002::AverageOfMeasures:
307  pvlPoint += PvlKeyword("AprioriXYZSource", "AverageOfMeasures");
308  break;
309  case ControlPointFileEntryV0002::Reference:
310  pvlPoint += PvlKeyword("AprioriXYZSource", "Reference");
311  break;
312  case ControlPointFileEntryV0002::Basemap:
313  pvlPoint += PvlKeyword("AprioriXYZSource", "Basemap");
314  break;
315  case ControlPointFileEntryV0002::BundleSolution:
316  pvlPoint += PvlKeyword("AprioriXYZSource", "BundleSolution");
317  break;
318  case ControlPointFileEntryV0002::Ellipsoid:
319  case ControlPointFileEntryV0002::DEM:
320  break;
321  }
322 
323  if (binaryPoint.has_apriorisurfpointsourcefile())
324  pvlPoint += PvlKeyword("AprioriXYZSourceFile",
325  binaryPoint.apriorisurfpointsourcefile().c_str());
326 
327  switch (binaryPoint.aprioriradiussource()) {
328  case ControlPointFileEntryV0002::None:
329  break;
330  case ControlPointFileEntryV0002::User:
331  pvlPoint += PvlKeyword("AprioriRadiusSource", "User");
332  break;
333  case ControlPointFileEntryV0002::AverageOfMeasures:
334  pvlPoint += PvlKeyword("AprioriRadiusSource", "AverageOfMeasures");
335  break;
336  case ControlPointFileEntryV0002::Reference:
337  pvlPoint += PvlKeyword("AprioriRadiusSource", "Reference");
338  break;
339  case ControlPointFileEntryV0002::Basemap:
340  pvlPoint += PvlKeyword("AprioriRadiusSource", "Basemap");
341  break;
342  case ControlPointFileEntryV0002::BundleSolution:
343  pvlPoint += PvlKeyword("AprioriRadiusSource", "BundleSolution");
344  break;
345  case ControlPointFileEntryV0002::Ellipsoid:
346  pvlPoint += PvlKeyword("AprioriRadiusSource", "Ellipsoid");
347  break;
348  case ControlPointFileEntryV0002::DEM:
349  pvlPoint += PvlKeyword("AprioriRadiusSource", "DEM");
350  break;
351  }
352 
353  if (binaryPoint.has_aprioriradiussourcefile())
354  pvlPoint += PvlKeyword("AprioriRadiusSourceFile",
355  binaryPoint.aprioriradiussourcefile().c_str());
356 
357  if (binaryPoint.has_apriorix()) {
358  pvlPoint += PvlKeyword("AprioriX", toString(binaryPoint.apriorix()), "meters");
359  pvlPoint += PvlKeyword("AprioriY", toString(binaryPoint.aprioriy()), "meters");
360  pvlPoint += PvlKeyword("AprioriZ", toString(binaryPoint.aprioriz()), "meters");
361 
362  // Get surface point, convert to lat,lon,radius and output as comment
363  SurfacePoint apriori;
364  apriori.SetRectangular(
365  Displacement(binaryPoint.apriorix(),Displacement::Meters),
366  Displacement(binaryPoint.aprioriy(),Displacement::Meters),
367  Displacement(binaryPoint.aprioriz(),Displacement::Meters));
368  pvlPoint.findKeyword("AprioriX").addComment("AprioriLatitude = " +
369  toString(apriori.GetLatitude().degrees()) +
370  " <degrees>");
371  pvlPoint.findKeyword("AprioriY").addComment("AprioriLongitude = " +
372  toString(apriori.GetLongitude().degrees()) +
373  " <degrees>");
374  pvlPoint.findKeyword("AprioriZ").addComment("AprioriRadius = " +
375  toString(apriori.GetLocalRadius().meters()) +
376  " <meters>");
377 
378  if (binaryPoint.aprioricovar_size()) {
379  PvlKeyword matrix("AprioriCovarianceMatrix");
380  matrix += toString(binaryPoint.aprioricovar(0));
381  matrix += toString(binaryPoint.aprioricovar(1));
382  matrix += toString(binaryPoint.aprioricovar(2));
383  matrix += toString(binaryPoint.aprioricovar(3));
384  matrix += toString(binaryPoint.aprioricovar(4));
385  matrix += toString(binaryPoint.aprioricovar(5));
386  pvlPoint += matrix;
387 
388  if (pvlRadii.hasKeyword("EquatorialRadius")) {
389  apriori.SetRadii(
390  Distance(pvlRadii["EquatorialRadius"],Distance::Meters),
391  Distance(pvlRadii["EquatorialRadius"],Distance::Meters),
392  Distance(pvlRadii["PolarRadius"],Distance::Meters));
393  symmetric_matrix<double, upper> covar;
394  covar.resize(3);
395  covar.clear();
396  covar(0, 0) = binaryPoint.aprioricovar(0);
397  covar(0, 1) = binaryPoint.aprioricovar(1);
398  covar(0, 2) = binaryPoint.aprioricovar(2);
399  covar(1, 1) = binaryPoint.aprioricovar(3);
400  covar(1, 2) = binaryPoint.aprioricovar(4);
401  covar(2, 2) = binaryPoint.aprioricovar(5);
402  apriori.SetRectangularMatrix(covar);
403  QString sigmas = "AprioriLatitudeSigma = " +
404  toString(apriori.GetLatSigmaDistance().meters()) +
405  " <meters> AprioriLongitudeSigma = " +
406  toString(apriori.GetLonSigmaDistance().meters()) +
407  " <meters> AprioriRadiusSigma = " +
408  toString(apriori.GetLocalRadiusSigma().meters()) +
409  " <meters>";
410  pvlPoint.findKeyword("AprioriCovarianceMatrix").addComment(sigmas);
411  }
412  }
413  }
414 
415  if (binaryPoint.latitudeconstrained())
416  pvlPoint += PvlKeyword("LatitudeConstrained", "True");
417 
418  if (binaryPoint.longitudeconstrained())
419  pvlPoint += PvlKeyword("LongitudeConstrained", "True");
420 
421  if (binaryPoint.radiusconstrained())
422  pvlPoint += PvlKeyword("RadiusConstrained", "True");
423 
424  if (binaryPoint.has_adjustedx()) {
425  pvlPoint += PvlKeyword("AdjustedX", toString(binaryPoint.adjustedx()), "meters");
426  pvlPoint += PvlKeyword("AdjustedY", toString(binaryPoint.adjustedy()), "meters");
427  pvlPoint += PvlKeyword("AdjustedZ", toString(binaryPoint.adjustedz()), "meters");
428 
429  // Get surface point, convert to lat,lon,radius and output as comment
430  SurfacePoint adjusted;
431  adjusted.SetRectangular(
432  Displacement(binaryPoint.adjustedx(),Displacement::Meters),
433  Displacement(binaryPoint.adjustedy(),Displacement::Meters),
434  Displacement(binaryPoint.adjustedz(),Displacement::Meters));
435  pvlPoint.findKeyword("AdjustedX").addComment("AdjustedLatitude = " +
436  toString(adjusted.GetLatitude().degrees()) +
437  " <degrees>");
438  pvlPoint.findKeyword("AdjustedY").addComment("AdjustedLongitude = " +
439  toString(adjusted.GetLongitude().degrees()) +
440  " <degrees>");
441  pvlPoint.findKeyword("AdjustedZ").addComment("AdjustedRadius = " +
442  toString(adjusted.GetLocalRadius().meters()) +
443  " <meters>");
444 
445  if (binaryPoint.adjustedcovar_size()) {
446  PvlKeyword matrix("AdjustedCovarianceMatrix");
447  matrix += toString(binaryPoint.adjustedcovar(0));
448  matrix += toString(binaryPoint.adjustedcovar(1));
449  matrix += toString(binaryPoint.adjustedcovar(2));
450  matrix += toString(binaryPoint.adjustedcovar(3));
451  matrix += toString(binaryPoint.adjustedcovar(4));
452  matrix += toString(binaryPoint.adjustedcovar(5));
453  pvlPoint += matrix;
454 
455  if (pvlRadii.hasKeyword("EquatorialRadius")) {
456  adjusted.SetRadii(
457  Distance(pvlRadii["EquatorialRadius"],Distance::Meters),
458  Distance(pvlRadii["EquatorialRadius"],Distance::Meters),
459  Distance(pvlRadii["PolarRadius"],Distance::Meters));
460  symmetric_matrix<double, upper> covar;
461  covar.resize(3);
462  covar.clear();
463  covar(0, 0) = binaryPoint.adjustedcovar(0);
464  covar(0, 1) = binaryPoint.adjustedcovar(1);
465  covar(0, 2) = binaryPoint.adjustedcovar(2);
466  covar(1, 1) = binaryPoint.adjustedcovar(3);
467  covar(1, 2) = binaryPoint.adjustedcovar(4);
468  covar(2, 2) = binaryPoint.adjustedcovar(5);
469  adjusted.SetRectangularMatrix(covar);
470  QString sigmas = "AdjustedLatitudeSigma = " +
471  toString(adjusted.GetLatSigmaDistance().meters()) +
472  " <meters> AdjustedLongitudeSigma = " +
473  toString(adjusted.GetLonSigmaDistance().meters()) +
474  " <meters> AdjustedRadiusSigma = " +
475  toString(adjusted.GetLocalRadiusSigma().meters()) +
476  " <meters>";
477  pvlPoint.findKeyword("AdjustedCovarianceMatrix").addComment(sigmas);
478  }
479  }
480  }
481 
482  for (int j = 0; j < binaryPoint.measures_size(); j++) {
483  PvlGroup pvlMeasure("ControlMeasure");
485  binaryMeasure = binaryPoint.measures(j);
486  pvlMeasure += PvlKeyword("SerialNumber", binaryMeasure.serialnumber().c_str());
487 
488  switch(binaryMeasure.type()) {
489  case ControlPointFileEntryV0002_Measure_MeasureType_Candidate:
490  pvlMeasure += PvlKeyword("MeasureType", "Candidate");
491  break;
492  case ControlPointFileEntryV0002_Measure_MeasureType_Manual:
493  pvlMeasure += PvlKeyword("MeasureType", "Manual");
494  break;
495  case ControlPointFileEntryV0002_Measure_MeasureType_RegisteredPixel:
496  pvlMeasure += PvlKeyword("MeasureType", "RegisteredPixel");
497  break;
498  case ControlPointFileEntryV0002_Measure_MeasureType_RegisteredSubPixel:
499  pvlMeasure += PvlKeyword("MeasureType", "RegisteredSubPixel");
500  break;
501  }
502 
503  if (binaryMeasure.has_choosername())
504  pvlMeasure += PvlKeyword("ChooserName", binaryMeasure.choosername().c_str());
505 
506  if (binaryMeasure.has_datetime())
507  pvlMeasure += PvlKeyword("DateTime", binaryMeasure.datetime().c_str());
508 
509  if (binaryMeasure.editlock())
510  pvlMeasure += PvlKeyword("EditLock", "True");
511 
512  if (binaryMeasure.ignore())
513  pvlMeasure += PvlKeyword("Ignore", "True");
514 
515  if (binaryMeasure.has_sample())
516  pvlMeasure += PvlKeyword("Sample", toString(binaryMeasure.sample()));
517 
518  if (binaryMeasure.has_line())
519  pvlMeasure += PvlKeyword("Line", toString(binaryMeasure.line()));
520 
521  if (binaryMeasure.has_diameter())
522  pvlMeasure += PvlKeyword("Diameter", toString(binaryMeasure.diameter()));
523 
524  if (binaryMeasure.has_apriorisample())
525  pvlMeasure += PvlKeyword("AprioriSample", toString(binaryMeasure.apriorisample()));
526 
527  if (binaryMeasure.has_aprioriline())
528  pvlMeasure += PvlKeyword("AprioriLine", toString(binaryMeasure.aprioriline()));
529 
530  if (binaryMeasure.has_samplesigma())
531  pvlMeasure += PvlKeyword("SampleSigma", toString(binaryMeasure.samplesigma()),
532  "pixels");
533 
534  if (binaryMeasure.has_samplesigma())
535  pvlMeasure += PvlKeyword("LineSigma", toString(binaryMeasure.linesigma()),
536  "pixels");
537 
538  if (binaryMeasure.has_sampleresidual())
539  pvlMeasure += PvlKeyword("SampleResidual", toString(binaryMeasure.sampleresidual()),
540  "pixels");
541 
542  if (binaryMeasure.has_lineresidual())
543  pvlMeasure += PvlKeyword("LineResidual", toString(binaryMeasure.lineresidual()),
544  "pixels");
545 
546  if (binaryMeasure.has_jigsawrejected()) {
547  pvlMeasure += PvlKeyword("JigsawRejected", toString(binaryMeasure.jigsawrejected()));
548  }
549 
550  for (int logEntry = 0;
551  logEntry < binaryMeasure.log_size();
552  logEntry ++) {
554  binaryMeasure.log(logEntry);
555 
556  ControlMeasureLogData interpreter(log);
557  pvlMeasure += interpreter.ToKeyword();
558  }
559 
560  if (binaryPoint.has_referenceindex() &&
561  binaryPoint.referenceindex() == j)
562  pvlMeasure += PvlKeyword("Reference", "True");
563 
564  pvlPoint.addGroup(pvlMeasure);
565  }
566 
567  network.addObject(pvlPoint);
568  }
569  return pvl;
570  }
571 }
572 
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:86
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:245
File name manipulation and expansion.
Definition: FileName.h:111
Distance GetLocalRadius() const
Return the radius of the surface point.
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:286
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
Definition: PvlObject.h:198
Statistical and similar ControlMeasure associated information.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:226
void addKeyword(const PvlKeyword &keyword, const InsertMode mode=Append)
Add a keyword to the container.
void SetRectangularMatrix(const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
Set rectangular covariance matrix.
Distance measurement, usually in meters.
Definition: Distance.h:47
Longitude GetLongitude() const
Return the body-fixed longitude for the surface point.
void SetRadii(const Distance &majorRadius, const Distance &minorRadius, const Distance &polarRadius)
Reset the radii of the surface body of the surface point.
Distance GetLonSigmaDistance() const
Return the longiitude sigma in meters.
void addObject(const PvlObject &object)
Add a PvlObject.
Definition: PvlObject.h:319
void addComment(QString comment)
Add a comment to the PvlKeyword.
Definition: PvlKeyword.cpp:392
double meters() const
Get the distance in meters.
Definition: Distance.cpp:97
Latitude GetLatitude() const
Return the body-fixed latitude for the surface point.
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:38
A single keyword-value pair.
Definition: PvlKeyword.h:98
Container for cube-like labels.
Definition: Pvl.h:135
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Displacement is a signed length, usually in meters.
Definition: Displacement.h:43
Distance GetLatSigmaDistance() const
Return the latitude sigma in meters.
Isis exception class.
Definition: IException.h:99
Adds specific functionality to C++ strings.
Definition: IString.h:179
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
PvlKeyword ToKeyword() const
This converts the log data to a PvlKeyword.
void SetRectangular(const Displacement &x, const Displacement &y, const Displacement &z, const Distance &xSigma=Distance(), const Distance &ySigma=Distance(), const Distance &zSigma=Distance())
Set surface point in rectangular body-fixed coordinates wtih optional sigmas.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:16:31