9#include "AbstractPointItem.h"
16#include "CnetDisplayProperties.h"
17#include "ControlMeasure.h"
18#include "ControlNet.h"
19#include "ControlPoint.h"
20#include "IException.h"
23#include "TableColumn.h"
24#include "TableColumnList.h"
28 QString AbstractPointItem::getColumnName(Column col) {
29 CnetDisplayProperties *displayProperties = CnetDisplayProperties::getInstance();
30 bool latLonRadiusCoordDisplay =
false;
31 if (displayProperties->coordinateDisplayType() == CnetDisplayProperties::LatLonRadius) {
32 latLonRadiusCoordDisplay =
true;
41 return "Chooser Name";
50 case AdjustedSPCoord1:
51 if (latLonRadiusCoordDisplay) {
52 return "Adjusted SP Lat";
55 return "Adjusted SP X";
57 case AdjustedSPCoord2:
58 if (latLonRadiusCoordDisplay) {
59 return "Adjusted SP Lon";
62 return "Adjusted SP Y";
64 case AdjustedSPCoord3:
65 if (latLonRadiusCoordDisplay) {
66 return "Adjusted SP Radius";
69 return "Adjusted SP Z";
71 case AdjustedSPCoord1Sigma:
72 if (latLonRadiusCoordDisplay) {
73 return "Adjusted SP Lat Sigma";
76 return "Adjusted SP X Sigma";
78 case AdjustedSPCoord2Sigma:
79 if (latLonRadiusCoordDisplay) {
80 return "Adjusted SP Lon Sigma";
83 return "Adjusted SP Y Sigma";
85 case AdjustedSPCoord3Sigma:
86 if (latLonRadiusCoordDisplay) {
87 return "Adjusted SP Radius Sigma";
90 return "Adjusted SP Z Sigma";
93 if (latLonRadiusCoordDisplay) {
94 return "A Priori SP Lat";
97 return "A Priori SP X";
100 if (latLonRadiusCoordDisplay) {
101 return "A Priori SP Lon";
104 return "A Priori SP Y";
106 case APrioriSPCoord3:
107 if (latLonRadiusCoordDisplay) {
108 return "A Priori SP Radius";
111 return "A Priori SP Z";
113 case APrioriSPCoord1Sigma:
114 if (latLonRadiusCoordDisplay) {
115 return "A Priori SP Lat Sigma";
118 return "A Priori SP X Sigma";
120 case APrioriSPCoord2Sigma:
121 if (latLonRadiusCoordDisplay) {
122 return "A Priori SP Lon Sigma";
125 return "A Priori SP Y Sigma";
127 case APrioriSPCoord3Sigma:
128 if (latLonRadiusCoordDisplay) {
129 return "A Priori SP Radius Sigma";
132 return "A Priori SP Z Sigma";
134 case APrioriSPSource:
135 return "A Priori SP Source";
136 case APrioriSPSourceFile:
137 return "A Priori SP Source File";
138 case APrioriRadiusSource:
139 return "A Priori Radius Source";
140 case APrioriRadiusSourceFile:
141 return "A Priori Radius Source File";
143 return "Jigsaw Rejected";
150 AbstractPointItem::Column AbstractPointItem::getColumn(QString columnTitle) {
151 for (
int i = 0; i < COLS; i++) {
152 if (columnTitle == getColumnName((Column)i))
156 QString msg =
"Column title [" + columnTitle +
"] does not match any of "
157 "the defined column types";
162 TableColumnList *AbstractPointItem::createColumns() {
163 TableColumnList *columnList =
new TableColumnList;
165 columnList->append(
new TableColumn(getColumnName(Id),
false,
false));
167 new TableColumn(getColumnName(PointType),
false,
false));
169 new TableColumn(getColumnName(ChooserName),
false,
false));
171 new TableColumn(getColumnName(DateTime),
true,
false));
173 new TableColumn(getColumnName(EditLock),
false,
false));
175 new TableColumn(getColumnName(Ignored),
false,
true));
177 new TableColumn(getColumnName(Reference),
false,
false));
179 new TableColumn(getColumnName(AdjustedSPCoord1),
true,
false));
181 new TableColumn(getColumnName(AdjustedSPCoord2),
true,
false));
183 new TableColumn(getColumnName(AdjustedSPCoord3),
true,
false));
185 new TableColumn(getColumnName(AdjustedSPCoord1Sigma),
true,
false));
187 new TableColumn(getColumnName(AdjustedSPCoord2Sigma),
true,
false));
189 new TableColumn(getColumnName(AdjustedSPCoord3Sigma),
true,
false));
191 new TableColumn(getColumnName(APrioriSPCoord1),
false,
false));
193 new TableColumn(getColumnName(APrioriSPCoord2),
false,
false));
195 new TableColumn(getColumnName(APrioriSPCoord3),
false,
false));
197 new TableColumn(getColumnName(APrioriSPCoord1Sigma),
false,
false));
199 new TableColumn(getColumnName(APrioriSPCoord2Sigma),
false,
false));
201 new TableColumn(getColumnName(APrioriSPCoord3Sigma),
false,
false));
203 new TableColumn(getColumnName(APrioriSPSource),
false,
false));
205 new TableColumn(getColumnName(APrioriSPSourceFile),
false,
false));
207 new TableColumn(getColumnName(APrioriRadiusSource),
false,
false));
208 columnList->append(
new TableColumn(
209 getColumnName(APrioriRadiusSourceFile),
false,
false));
211 new TableColumn(getColumnName(JigsawRejected),
true,
false));
217 AbstractPointItem::AbstractPointItem(ControlPoint *cp,
218 int avgCharWidth, AbstractTreeItem *parent)
219 : AbstractTreeItem(parent) {
222 calcDataWidth(avgCharWidth);
224 connect(m_point, SIGNAL(destroyed(
QObject *)),
this, SLOT(sourceDeleted()));
228 AbstractPointItem::~AbstractPointItem() {
233 QVariant AbstractPointItem::getData()
const {
234 return getData(getColumnName(Id));
245 col->setTitle(getColumnName(AdjustedSPCoord1));
247 col->setTitle(getColumnName(AdjustedSPCoord2));
248 col = (*columns)[10];
249 col->setTitle(getColumnName(AdjustedSPCoord3));
251 col = (*columns)[11];
252 col->setTitle(getColumnName(AdjustedSPCoord1Sigma));
253 col = (*columns)[12];
254 col->setTitle(getColumnName(AdjustedSPCoord2Sigma));
255 col = (*columns)[13];
256 col->setTitle(getColumnName(AdjustedSPCoord3Sigma));
258 col = (*columns)[14];
259 col->setTitle(getColumnName(APrioriSPCoord1));
260 col = (*columns)[15];
261 col->setTitle(getColumnName(APrioriSPCoord2));
262 col = (*columns)[16];
263 col->setTitle(getColumnName(APrioriSPCoord3));
265 col = (*columns)[17];
266 col->setTitle(getColumnName(APrioriSPCoord1Sigma));
267 col = (*columns)[18];
268 col->setTitle(getColumnName(APrioriSPCoord2Sigma));
269 col = (*columns)[19];
270 col->setTitle(getColumnName(APrioriSPCoord3Sigma));
274 QVariant AbstractPointItem::getData(QString columnTitle)
const {
278 bool latLonRadiusCoordDisplay =
false;
280 latLonRadiusCoordDisplay =
true;
283 Column column = getColumn(columnTitle);
285 switch ((Column) column) {
287 return QVariant((QString)m_point->GetId());
289 return QVariant((QString)m_point->GetPointTypeString());
291 return QVariant((QString)m_point->GetChooserName());
295 return QVariant((QString)m_point->GetDateTime());
297 if (m_point->IsEditLocked())
298 return QVariant(
"Yes");
300 return QVariant(
"No");
303 if (m_point->IsIgnored())
304 return QVariant(
"Yes");
306 return QVariant(
"No");
308 if (m_point->GetNumMeasures())
310 CnetDisplayProperties::getInstance()->getImageName(
311 (QString) m_point->GetRefMeasure()->GetCubeSerialNumber()));
314 case AdjustedSPCoord1:
315 if (latLonRadiusCoordDisplay) {
316 return QVariant(m_point->GetAdjustedSurfacePoint().GetLatitude().degrees());
319 return QVariant(m_point->GetAdjustedSurfacePoint().GetX().meters());
321 case AdjustedSPCoord2:
322 if (latLonRadiusCoordDisplay) {
323 return QVariant(m_point->GetAdjustedSurfacePoint().GetLongitude().degrees());
326 return QVariant(m_point->GetAdjustedSurfacePoint().GetY().meters());
328 case AdjustedSPCoord3:
329 if (latLonRadiusCoordDisplay) {
330 return QVariant(m_point->GetAdjustedSurfacePoint().GetLocalRadius().meters());
333 return QVariant(m_point->GetAdjustedSurfacePoint().GetZ().meters());
335 case AdjustedSPCoord1Sigma:
336 if (latLonRadiusCoordDisplay) {
337 return QVariant(m_point->GetAdjustedSurfacePoint().GetLatSigmaDistance().meters());
340 return QVariant(m_point->GetAdjustedSurfacePoint().GetXSigma().meters());
342 case AdjustedSPCoord2Sigma:
343 if (latLonRadiusCoordDisplay) {
344 return QVariant(m_point->GetAdjustedSurfacePoint().GetLonSigmaDistance().meters());
347 return QVariant(m_point->GetAdjustedSurfacePoint().GetYSigma().meters());
349 case AdjustedSPCoord3Sigma:
350 if (latLonRadiusCoordDisplay) {
351 return QVariant(m_point->GetAdjustedSurfacePoint().GetLocalRadiusSigma().meters());
354 return QVariant(m_point->GetAdjustedSurfacePoint().GetZSigma().meters());
356 case APrioriSPCoord1:
357 if (latLonRadiusCoordDisplay) {
358 return QVariant(m_point->GetAprioriSurfacePoint().GetLatitude().degrees());
361 return QVariant(m_point->GetAprioriSurfacePoint().GetX().meters());
363 case APrioriSPCoord2:
364 if (latLonRadiusCoordDisplay) {
365 return QVariant(m_point->GetAprioriSurfacePoint().GetLongitude().degrees());
368 return QVariant(m_point->GetAprioriSurfacePoint().GetY().meters());
370 case APrioriSPCoord3:
371 if (latLonRadiusCoordDisplay) {
372 return QVariant(m_point->GetAprioriSurfacePoint().GetLocalRadius().meters());
375 return QVariant(m_point->GetAprioriSurfacePoint().GetZ().meters());
377 case APrioriSPCoord1Sigma:
378 if (latLonRadiusCoordDisplay) {
379 return QVariant(m_point->GetAprioriSurfacePoint().GetLatSigmaDistance().meters());
382 return QVariant(m_point->GetAprioriSurfacePoint().GetXSigma().meters());
384 case APrioriSPCoord2Sigma:
385 if (latLonRadiusCoordDisplay) {
386 return QVariant(m_point->GetAprioriSurfacePoint().GetLonSigmaDistance().meters());
389 return QVariant(m_point->GetAprioriSurfacePoint().GetYSigma().meters());
391 case APrioriSPCoord3Sigma:
392 if (latLonRadiusCoordDisplay) {
393 return QVariant(m_point->GetAprioriSurfacePoint().GetLocalRadiusSigma().meters());
396 return QVariant(m_point->GetAprioriSurfacePoint().GetZSigma().meters());
398 case APrioriSPSource:
399 return QVariant((QString)m_point->GetSurfacePointSourceString());
400 case APrioriSPSourceFile:
401 return QVariant((QString)m_point->GetAprioriSurfacePointSourceFile());
402 case APrioriRadiusSource:
403 return QVariant((QString)m_point->GetRadiusSourceString());
404 case APrioriRadiusSourceFile:
405 return QVariant((QString)m_point->GetAprioriRadiusSourceFile());
407 if (m_point->IsRejected())
408 return QVariant(
"Yes");
410 return QVariant(
"No");
418 void AbstractPointItem::setData(QString
const &columnTitle,
419 QString
const &newData) {
421 CnetDisplayProperties *displayProperties = CnetDisplayProperties::getInstance();
423 bool latLonRadiusCoordDisplay =
false;
424 if (displayProperties->coordinateDisplayType() == CnetDisplayProperties::LatLonRadius) {
425 latLonRadiusCoordDisplay =
true;
428 Column column = getColumn(columnTitle);
430 switch ((Column) column) {
432 m_point->SetId(newData);
435 m_point->SetType(m_point->StringToPointType(newData));
438 m_point->SetChooserName(newData);
441 m_point->SetDateTime(newData);
444 if (newData ==
"Yes")
445 m_point->SetEditLock(
true);
447 m_point->SetEditLock(
false);
450 m_point->SetIgnored(newData ==
"Yes");
453 m_point->SetRefMeasure(newData);
455 case AdjustedSPCoord1:
456 if (latLonRadiusCoordDisplay) {
457 m_point->SetAdjustedSurfacePoint(SurfacePoint(
458 Latitude(catchNull(newData), Angle::Degrees),
459 m_point->GetAdjustedSurfacePoint().GetLongitude(),
460 m_point->GetAdjustedSurfacePoint().GetLocalRadius()));
463 m_point->SetAdjustedSurfacePoint(SurfacePoint(
464 Distance(catchNull(newData), Distance::Meters),
465 m_point->GetAdjustedSurfacePoint().GetY(),
466 m_point->GetAdjustedSurfacePoint().GetZ()));
469 case AdjustedSPCoord2:
470 if (latLonRadiusCoordDisplay) {
471 m_point->SetAdjustedSurfacePoint(SurfacePoint(
472 m_point->GetAdjustedSurfacePoint().GetLatitude(),
473 Longitude(catchNull(newData), Angle::Degrees),
474 m_point->GetAdjustedSurfacePoint().GetLocalRadius()));
477 m_point->SetAdjustedSurfacePoint(SurfacePoint(
478 m_point->GetAdjustedSurfacePoint().GetX(),
479 Distance(catchNull(newData), Distance::Meters),
480 m_point->GetAdjustedSurfacePoint().GetZ()));
483 case AdjustedSPCoord3:
484 if (latLonRadiusCoordDisplay) {
485 m_point->SetAdjustedSurfacePoint(SurfacePoint(
486 m_point->GetAdjustedSurfacePoint().GetLatitude(),
487 m_point->GetAdjustedSurfacePoint().GetLongitude(),
488 Distance(catchNull(newData), Distance::Meters)));
491 m_point->SetAdjustedSurfacePoint(SurfacePoint(
492 m_point->GetAdjustedSurfacePoint().GetX(),
493 m_point->GetAdjustedSurfacePoint().GetY(),
494 Distance(catchNull(newData), Distance::Meters)));
497 case AdjustedSPCoord1Sigma: {
499 if (latLonRadiusCoordDisplay) {
500 msg =
"Cannot set adjusted surface point latitude sigma";
503 msg =
"Cannot set adjusted surface point X sigma";
505 throw IException(IException::Programmer, msg, _FILEINFO_);
508 case AdjustedSPCoord2Sigma: {
510 if (latLonRadiusCoordDisplay) {
511 msg =
"Cannot set adjusted surface point longitude sigma";
514 msg =
"Cannot set adjusted surface point Y sigma";
516 throw IException(IException::Programmer, msg, _FILEINFO_);
519 case AdjustedSPCoord3Sigma: {
521 if (latLonRadiusCoordDisplay) {
522 msg =
"Cannot set adjusted surface point radius sigma";
525 msg =
"Cannot set adjusted surface point Z sigma";
527 throw IException(IException::Programmer, msg, _FILEINFO_);
530 case APrioriSPCoord1: {
531 if (latLonRadiusCoordDisplay) {
532 Latitude newLat(catchNull(newData), Angle::Degrees);
533 SurfacePoint newSurfacePoint(prepareSurfacePoint(newLat,
534 m_point->GetAprioriSurfacePoint()));
536 newSurfacePoint.SetSphericalCoordinates(newLat,
537 newSurfacePoint.GetLongitude(),
538 newSurfacePoint.GetLocalRadius());
539 m_point->SetAprioriSurfacePoint(newSurfacePoint);
542 Distance newX(catchNull(newData), Distance::Meters);
543 SurfacePoint newSurfacePoint(prepareSurfacePoint(newX,
544 m_point->GetAprioriSurfacePoint()));
546 newSurfacePoint.SetRectangularCoordinates(newX,
547 newSurfacePoint.GetY(),
548 newSurfacePoint.GetZ());
549 m_point->SetAprioriSurfacePoint(newSurfacePoint);
553 case APrioriSPCoord2: {
554 if (latLonRadiusCoordDisplay) {
555 Longitude newLon(catchNull(newData), Angle::Degrees);
556 SurfacePoint newSurfacePoint(prepareSurfacePoint(newLon,
557 m_point->GetAprioriSurfacePoint()));
559 newSurfacePoint.SetSphericalCoordinates(
560 newSurfacePoint.GetLatitude(),
562 newSurfacePoint.GetLocalRadius());
563 m_point->SetAprioriSurfacePoint(newSurfacePoint);
566 Distance newY(catchNull(newData), Distance::Meters);
567 SurfacePoint newSurfacePoint(prepareSurfacePoint(newY,
568 m_point->GetAprioriSurfacePoint()));
570 newSurfacePoint.SetRectangularCoordinates(newSurfacePoint.GetX(),
572 newSurfacePoint.GetZ());
573 m_point->SetAprioriSurfacePoint(newSurfacePoint);
577 case APrioriSPCoord3: {
578 if (latLonRadiusCoordDisplay) {
579 Distance newRadius(catchNull(newData), Distance::Meters);
580 SurfacePoint newSurfacePoint(prepareSurfacePoint(newRadius,
581 m_point->GetAprioriSurfacePoint()));
583 newSurfacePoint.SetSphericalCoordinates(
584 newSurfacePoint.GetLatitude(),
585 newSurfacePoint.GetLongitude(),
587 m_point->SetAprioriSurfacePoint(newSurfacePoint);
590 Distance newZ(catchNull(newData), Distance::Meters);
591 SurfacePoint newSurfacePoint(prepareSurfacePoint(newZ,
592 m_point->GetAprioriSurfacePoint()));
594 newSurfacePoint.SetRectangularCoordinates(newSurfacePoint.GetX(),
595 newSurfacePoint.GetY(),
597 m_point->SetAprioriSurfacePoint(newSurfacePoint);
601 case APrioriSPCoord1Sigma: {
602 if (latLonRadiusCoordDisplay) {
603 Distance newSigma(catchNull(newData), Distance::Meters);
604 SurfacePoint newSurfacePoint(prepareSigmas(newSigma,
605 m_point->GetAprioriSurfacePoint()));
607 newSurfacePoint.SetSphericalSigmasDistance(
608 newSigma, newSurfacePoint.GetLonSigmaDistance(),
609 newSurfacePoint.GetLocalRadiusSigma());
611 m_point->SetAprioriSurfacePoint(newSurfacePoint);
614 Distance newSigma(catchNull(newData), Distance::Meters);
615 SurfacePoint newSurfacePoint(prepareXYZSigmas(newSigma,
616 m_point->GetAprioriSurfacePoint()));
618 newSurfacePoint.SetRectangularSigmas(
619 newSigma, newSurfacePoint.GetYSigma(),
620 newSurfacePoint.GetZSigma());
622 m_point->SetAprioriSurfacePoint(newSurfacePoint);
626 case APrioriSPCoord2Sigma: {
627 if (latLonRadiusCoordDisplay) {
628 Distance newSigma(catchNull(newData), Distance::Meters);
629 SurfacePoint newSurfacePoint(prepareSigmas(newSigma,
630 m_point->GetAprioriSurfacePoint()));
632 newSurfacePoint.SetSphericalSigmasDistance(
633 newSurfacePoint.GetLatSigmaDistance(), newSigma,
634 newSurfacePoint.GetLocalRadiusSigma());
636 m_point->SetAprioriSurfacePoint(newSurfacePoint);
639 Distance newSigma(catchNull(newData), Distance::Meters);
640 SurfacePoint newSurfacePoint(prepareXYZSigmas(newSigma,
641 m_point->GetAprioriSurfacePoint()));
643 newSurfacePoint.SetRectangularSigmas(
644 newSurfacePoint.GetXSigma(), newSigma,
645 newSurfacePoint.GetZSigma());
647 m_point->SetAprioriSurfacePoint(newSurfacePoint);
651 case APrioriSPCoord3Sigma: {
652 if (latLonRadiusCoordDisplay) {
653 Distance newSigma(catchNull(newData), Distance::Meters);
654 SurfacePoint newSurfacePoint(prepareSigmas(newSigma,
655 m_point->GetAprioriSurfacePoint()));
657 newSurfacePoint.SetSphericalSigmasDistance(
658 newSurfacePoint.GetLatSigmaDistance(),
659 newSurfacePoint.GetLonSigmaDistance(),
662 m_point->SetAprioriSurfacePoint(newSurfacePoint);
665 Distance newSigma(catchNull(newData), Distance::Meters);
666 SurfacePoint newSurfacePoint(prepareXYZSigmas(newSigma,
667 m_point->GetAprioriSurfacePoint()));
669 newSurfacePoint.SetRectangularSigmas(
670 newSurfacePoint.GetXSigma(),
671 newSurfacePoint.GetYSigma(),
674 m_point->SetAprioriSurfacePoint(newSurfacePoint);
678 case APrioriSPSource:
679 m_point->SetAprioriSurfacePointSource(
680 m_point->StringToSurfacePointSource(newData));
682 case APrioriSPSourceFile:
683 m_point->SetAprioriSurfacePointSourceFile(newData);
685 case APrioriRadiusSource:
686 m_point->SetAprioriRadiusSource(
687 m_point->StringToRadiusSource(newData));
689 case APrioriRadiusSourceFile:
690 m_point->SetAprioriRadiusSourceFile(newData);
703 bool AbstractPointItem::isDataEditable(QString columnTitle)
const {
705 if (m_point->IsEditLocked()) {
706 if (getColumn(columnTitle) == EditLock)
717 void AbstractPointItem::deleteSource() {
719 if (m_point->IsEditLocked()) {
720 QString msg =
"Point [" + getFormattedData() +
"] is edit locked and "
722 throw IException(IException::User, msg, _FILEINFO_);
724 else if (m_point->GetNumLockedMeasures() > 0) {
725 QString msg =
"Point [" + getFormattedData() +
"] has at least one "
726 "edit locked measure and cannot be deleted";
727 throw IException(IException::User, msg, _FILEINFO_);
730 ControlPoint *tempPoint = m_point;
732 tempPoint->Parent()->DeletePoint(tempPoint);
737 AbstractTreeItem::InternalPointerType AbstractPointItem::getPointerType()
const {
738 return AbstractTreeItem::Point;
742 void *AbstractPointItem::getPointer()
const {
747 bool AbstractPointItem::hasPoint(ControlPoint *p)
const {
751 void AbstractPointItem::sourceDeleted() {
756 SurfacePoint AbstractPointItem::prepareSigmas(Distance newSigma,
757 SurfacePoint surfacePoint) {
758 const Distance free(10000, Distance::Meters);
759 Distance latSigDist = surfacePoint.GetLatSigmaDistance();
760 Distance lonSigDist = surfacePoint.GetLonSigmaDistance();
761 Distance radiusSigDist = surfacePoint.GetLocalRadiusSigma();
763 if (newSigma.isValid()) {
764 if (!latSigDist.isValid())
766 if (!lonSigDist.isValid())
768 if (!radiusSigDist.isValid())
769 radiusSigDist = free;
772 latSigDist = Distance();
773 lonSigDist = Distance();
774 radiusSigDist = Distance();
777 surfacePoint.SetSphericalSigmasDistance(
778 latSigDist, lonSigDist, radiusSigDist);
783 SurfacePoint AbstractPointItem::prepareXYZSigmas(Distance newSigma,
784 SurfacePoint surfacePoint) {
785 const Distance free(10000, Distance::Meters);
786 Distance xSigma = surfacePoint.GetXSigma();
787 Distance ySigma = surfacePoint.GetYSigma();
788 Distance zSigma = surfacePoint.GetZSigma();
790 if (newSigma.isValid()) {
791 if (!xSigma.isValid())
793 if (!ySigma.isValid())
795 if (!zSigma.isValid())
804 surfacePoint.SetRectangularSigmas(xSigma, ySigma, zSigma);
809 SurfacePoint AbstractPointItem::prepareSurfacePoint(Latitude newLat,
810 SurfacePoint surfacePoint) {
811 if (newLat.isValid()) {
812 surfacePoint = prepareSurfacePoint(surfacePoint);
815 surfacePoint.SetSphericalCoordinates(Latitude(), Longitude(),
823 SurfacePoint AbstractPointItem::prepareSurfacePoint(Longitude newLon,
824 SurfacePoint surfacePoint) {
825 if (newLon.isValid()) {
826 surfacePoint = prepareSurfacePoint(surfacePoint);
829 surfacePoint.SetSphericalCoordinates(Latitude(), Longitude(),
837 SurfacePoint AbstractPointItem::prepareSurfacePoint(
838 Distance newRadius, SurfacePoint surfacePoint) {
839 if (newRadius.isValid()) {
840 surfacePoint = prepareSurfacePoint(surfacePoint);
843 surfacePoint.SetSphericalCoordinates(Latitude(), Longitude(),
851 SurfacePoint AbstractPointItem::prepareSurfacePoint(
852 SurfacePoint surfacePoint) {
853 Latitude lat = surfacePoint.GetLatitude();
854 Longitude lon = surfacePoint.GetLongitude();
855 Distance radius = surfacePoint.GetLocalRadius();
858 lat = Latitude(0, Angle::Degrees);
860 lon = Longitude(0, Angle::Degrees);
861 if (!radius.isValid())
862 radius = Distance(10000, Distance::Meters);
864 surfacePoint.SetSphericalCoordinates(lat, lon, radius);
Handles how control networks should be displayed to the user.
coordinateDisplayType
Returns coordinate display type (0 = LatLonRadius, 1 = XYZ).
@ Programmer
This error is for when a programmer made an API call that was illegal.
This is free and unencumbered software released into the public domain.