USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::SurfacePoint Class Reference

This class defines a body-fixed surface point. More...

#include <SurfacePoint.h>

Public Member Functions

 SurfacePoint ()
 Constructs an empty SurfacePoint object.
 SurfacePoint (const SurfacePoint &other)
 Constructs an empty SurfacePoint object.
 SurfacePoint (const Latitude &lat, const Longitude &lon, const Distance &radius)
 Constructs a SurfacePoint object with a spherical point only.
 SurfacePoint (const Latitude &lat, const Longitude &lon, const Distance &radius, const Angle &latSigma, const Angle &lonSigma, const Distance &radiusSigma)
 Constructs a SurfacePoint object with a spherical point and its sigmas.
 SurfacePoint (const Latitude &lat, const Longitude &lon, const Distance &radius, const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
 SurfacePoint (const Displacement &x, const Displacement &y, const Displacement &z)
 Constructs a SurfacePoint object with a rectangular point only.
 SurfacePoint (const Displacement &x, const Displacement &y, const Displacement &z, const Distance &xSigma, const Distance &ySigma, const Distance &zSigma)
 Constructs a SurfacePoint object with a rectangular point and sigmas.
 SurfacePoint (const Displacement &x, const Displacement &y, const Displacement &z, const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
 ~SurfacePoint ()
 Destroys a SurfacePoint object/.
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.
void SetRectangular (const Displacement x, const Displacement y, const Displacement z, const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
void SetRectangularSigmas (const Distance &xSigma, const Distance &ySigma, const Distance &zSigma)
 Set surface point and sigmas in rectangular coordinates and convert to planetocentric.
void SetRectangularMatrix (const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
 Set rectangular covariance matrix.
void SetSpherical (const Latitude &lat, const Longitude &lon, const Distance &radius, const Angle &latSigma=Angle(), const Angle &lonSigma=Angle(), const Distance &radiusSigma=Distance())
 Set surface point and covariance matrix in planetocentric coordinates and convert to rectangular (Latitude, Longitude in degrees, Radius in meters; matrix in radians and radians**2)
void SetSpherical (const Latitude &lat, const Longitude &lon, const Distance &radius, const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
void SetSphericalCoordinates (const Latitude &lat, const Longitude &lon, const Distance &radius)
 Update spherical coordinates (lat/lon/radius)
void SetSphericalMatrix (const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &covar)
 Set spherical covariance matrix.
void SetSphericalSigmas (const Angle &latSigma, const Angle &lonSigma, const Distance &radiusSigma)
 Set the spherical sigmas into the spherical variance/covariance matrix.
void SetSphericalSigmasDistance (const Distance &latSigma, const Distance &lonSigma, const Distance &radiusSigma)
 Set the spherical sigmas (in meters) into the spherical variance/covariance matrix.
void SetRadii (const Distance &majorRadius, const Distance &minorRadius, const Distance &polarRadius)
 Reset the radii of the surface body of the surface point.
void ResetLocalRadius (const Distance &radius)
 This method resets the local radius of a SurfacePoint.
bool Valid () const
Displacement GetX () const
Displacement GetY () const
Displacement GetZ () const
Distance GetXSigma () const
Distance GetYSigma () const
Distance GetZSigma () const
boost::numeric::ublas::symmetric_matrix
< double,
boost::numeric::ublas::upper > 
GetRectangularMatrix () const
Latitude GetLatitude () const
 Return the body-fixed latitude for the surface point.
Longitude GetLongitude () const
 Return the body-fixed longitude for the surface point.
Distance GetLocalRadius () const
 Return the radius of the surface point.
Angle GetLatSigma () const
Distance GetLatSigmaDistance () const
 Return the latitude sigma in meters.
double GetLatWeight () const
 Return latitude weight for bundle adjustment Units are 1/(radians)^2.
Angle GetLonSigma () const
Distance GetLonSigmaDistance () const
 Return the longiitude sigma in meters.
double GetLonWeight () const
 Return longitude weight for bundle adjustment Units are 1/(radians)^2.
Distance GetLocalRadiusSigma () const
double GetLocalRadiusWeight () const
 Return radius weight for bundle adjustment Units are 1/(meters)^2.
boost::numeric::ublas::symmetric_matrix
< double,
boost::numeric::ublas::upper > 
GetSphericalMatrix () const
Distance GetDistanceToPoint (const SurfacePoint &other) const
 Computes and returns the distance between two surface points.
Distance GetDistanceToPoint (const SurfacePoint &other, const Distance &sphereRadius) const
 Computes and returns the distance between two surface points, assuming both points are on a sphere with the given radius.
void ToNaifArray (double naifOutput[3]) const
 A naif array is a c-style array of size 3.
void FromNaifArray (const double naifValues[3])
 A naif array is a c-style array of size 3.
bool operator== (const SurfacePoint &other) const
SurfacePointoperator= (const SurfacePoint &other)

Detailed Description

This class defines a body-fixed surface point.

This class is a container for body-fixed surface points. It provides methods to set and present the coordinates of surface points in various usable units to support projection of image points to the ground and bundle adjustment.

Author
2010-07-30 Tracie Sucharski, Ken L. Edmunson, and Debbie A. Cook

Constructor & Destructor Documentation

Isis::SurfacePoint::SurfacePoint ( )

Constructs an empty SurfacePoint object.

Isis::SurfacePoint::SurfacePoint ( const SurfacePoint other)

Constructs an empty SurfacePoint object.

Isis::SurfacePoint::SurfacePoint ( const Latitude lat,
const Longitude lon,
const Distance radius 
)

Constructs a SurfacePoint object with a spherical point only.

Parameters
latThe latitude of the surface point
lonThe longitude of the surface point
radiusThe radius of the surface point
Isis::SurfacePoint::SurfacePoint ( const Latitude lat,
const Longitude lon,
const Distance radius,
const Angle latSigma,
const Angle lonSigma,
const Distance radiusSigma 
)

Constructs a SurfacePoint object with a spherical point and its sigmas.

Parameters
latThe latitude of the surface point
lonThe longitude of the surface point
radiusThe radius of the surface point
          The sigmas indicate the accuracy of the point.  For instance,
          a latitude sigma of 5 degrees would indicate that the
          latitiude value could have an error or + or - 5 degrees.
sigmaLatThe sigma of the latitude
sigmaLonThe sigma of the longitude
sigmaRadiusThe sigma of the local radius
Isis::SurfacePoint::SurfacePoint ( const Latitude lat,
const Longitude lon,
const Distance radius,
const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar 
)
Isis::SurfacePoint::SurfacePoint ( const Displacement x,
const Displacement y,
const Displacement z 
)

Constructs a SurfacePoint object with a rectangular point only.

Parameters
xThe x coordinate of the surface point
yThe y coordinate of the surface point
zThe z coordinate of the surface point
Isis::SurfacePoint::SurfacePoint ( const Displacement x,
const Displacement y,
const Displacement z,
const Distance xSigma,
const Distance ySigma,
const Distance zSigma 
)

Constructs a SurfacePoint object with a rectangular point and sigmas.

Parameters
xThe x coordinate of the surface point
yThe y coordinate of the surface point
zThe z coordinate of the surface point
      The sigmas indicate the accuracy of the point.  For instance,
      a sigmaX=100 m, would indicate that the x coordinate was accurate
      to within 100 meters.
xSigmaThe x coordinate of the surface point
ySigmaThe y coordinate of the surface point
zSigmaThe z coordinate of the surface point
Isis::SurfacePoint::SurfacePoint ( const Displacement x,
const Displacement y,
const Displacement z,
const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar 
)
Isis::SurfacePoint::~SurfacePoint ( )

Destroys a SurfacePoint object/.

Member Function Documentation

void Isis::SurfacePoint::FromNaifArray ( const double  naifValues[3])

A naif array is a c-style array of size 3.

The element types are double... keep in mind a SpiceDouble is a double. The values' units are kilometers because that is the unit naif works in. The first element is X, the second Y, and the third Z. This loads the naif array into the surface point.

Parameters
naifValuesThe naif array to use as rectangular coordinates

Referenced by Isis::TriangularPlate::intercept(), Isis::EquatorialCylindricalShape::intersectSurface(), Isis::DemShape::intersectSurface(), Isis::PlaneShape::intersectSurface(), and Isis::TriangularPlate::point().

Distance Isis::SurfacePoint::GetDistanceToPoint ( const SurfacePoint other) const

Computes and returns the distance between two surface points.

This does not currently support ellipsoids and so any attempt with points with planetary radii will fail. The average of the local radii will be used.

References _FILEINFO_, GetLocalRadius(), and Valid().

Referenced by Isis::ControlNetFilter::CubeDistanceFilter(), Isis::QnetPointDistanceFilter::filter(), Isis::QnetCubeDistanceFilter::filter(), and Isis::ControlNetFilter::PointDistanceFilter().

Distance Isis::SurfacePoint::GetDistanceToPoint ( const SurfacePoint other,
const Distance sphereRadius 
) const

Computes and returns the distance between two surface points, assuming both points are on a sphere with the given radius.

This uses the haversine formula to compute the distance. Using a spherical model gives errors typically <1%

References GetLatitude(), GetLongitude(), Isis::Angle::radians(), and Valid().

Angle Isis::SurfacePoint::GetLatSigma ( ) const
double Isis::SurfacePoint::GetLatWeight ( ) const

Return latitude weight for bundle adjustment Units are 1/(radians)^2.

References _FILEINFO_.

double Isis::SurfacePoint::GetLocalRadiusWeight ( ) const

Return radius weight for bundle adjustment Units are 1/(meters)^2.

References _FILEINFO_.

Angle Isis::SurfacePoint::GetLonSigma ( ) const
double Isis::SurfacePoint::GetLonWeight ( ) const

Return longitude weight for bundle adjustment Units are 1/(radians)^2.

References _FILEINFO_.

symmetric_matrix< double, upper > Isis::SurfacePoint::GetRectangularMatrix ( ) const
symmetric_matrix< double, upper > Isis::SurfacePoint::GetSphericalMatrix ( ) const
Distance Isis::SurfacePoint::GetXSigma ( ) const
Distance Isis::SurfacePoint::GetYSigma ( ) const
Distance Isis::SurfacePoint::GetZSigma ( ) const
SurfacePoint & Isis::SurfacePoint::operator= ( const SurfacePoint other)
bool Isis::SurfacePoint::operator== ( const SurfacePoint other) const
void Isis::SurfacePoint::ResetLocalRadius ( const Distance radius)

This method resets the local radius of a SurfacePoint.

Parameters
radiusThe new local radius value to set

References _FILEINFO_, Isis::Distance::isValid(), Isis::Distance::kilometers(), and Isis::Angle::radians().

void Isis::SurfacePoint::SetRadii ( const Distance majorRadius,
const Distance minorRadius,
const Distance polarRadius 
)

Reset the radii of the surface body of the surface point.

Parameters
majorAxisThe semi-major axis of the surface model
minorAxisThe semi-minor axis of the surface model
polarAxisThe polar axis of the surface model

References _FILEINFO_, and Isis::Distance::isValid().

Referenced by Isis::ControlPoint::ControlPoint(), Isis::ControlPoint::SetAprioriSurfacePoint(), and Isis::ControlNetFileV0002::toPvl().

void Isis::SurfacePoint::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.

Parameters
xx value of body-fixed coordinate of surface point
yy value of body-fixed coordinate of surface point
zz value of body-fixed coordinate of surface point
xSigmax sigma of body-fixed coordinate of surface point
ySigmay sigma of body-fixed coordinate of surface point
zSigmaz sigma of body-fixed coordinate of surface point
Returns
void

References Isis::Distance::isValid().

Referenced by Isis::ControlPoint::ComputeApriori(), and Isis::ControlNetFileV0002::toPvl().

void Isis::SurfacePoint::SetRectangular ( const Displacement  x,
const Displacement  y,
const Displacement  z,
const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar 
)
void Isis::SurfacePoint::SetRectangularMatrix ( const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar)

Set rectangular covariance matrix.

Parameters
covarRectangular variance/covariance matrix (units are m**2)
Returns
void

References _FILEINFO_.

Referenced by Isis::ControlPoint::ControlPoint(), and Isis::ControlNetFileV0002::toPvl().

void Isis::SurfacePoint::SetRectangularSigmas ( const Distance xSigma,
const Distance ySigma,
const Distance zSigma 
)

Set surface point and sigmas in rectangular coordinates and convert to planetocentric.

Set the rectangular sigmas into the rectangular variance/covariance matrix.

Parameters
xSigmax sigma of body-fixed coordinate of surface point
ySigmay sigma of body-fixed coordinate of surface point
zSigmaz sigma of body-fixed coordinate of surface point

References _FILEINFO_, Isis::Distance::isValid(), and Isis::Distance::meters().

void Isis::SurfacePoint::SetSpherical ( const Latitude lat,
const Longitude lon,
const Distance radius,
const Angle latSigma = Angle(),
const Angle lonSigma = Angle(),
const Distance radiusSigma = Distance() 
)

Set surface point and covariance matrix in planetocentric coordinates and convert to rectangular (Latitude, Longitude in degrees, Radius in meters; matrix in radians and radians**2)

Set surface point in spherical body-fixed coordinates (lat/lon/radius) wtih optional sigmas.

Parameters
latBody-fixed latitude of surface point
lonBody-fixed longitude of surface point
radiusLocal radius of surface point
latSigmaLatitude sigma of of spherical coordinate of surface point
lonSigmaLongitude sigma of of spherical coordinate of surface point
radiusSigmaLocal radius sigma of of spherical coordinate of surface point

References Isis::Angle::isValid(), and Isis::Distance::isValid().

Referenced by Isis::ControlNetFilter::PointDistanceFilter(), Isis::ControlNetFilter::PointLatLonFilter(), and Isis::Sensor::SetUniversalGround().

void Isis::SurfacePoint::SetSpherical ( const Latitude lat,
const Longitude lon,
const Distance radius,
const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar 
)
void Isis::SurfacePoint::SetSphericalCoordinates ( const Latitude lat,
const Longitude lon,
const Distance radius 
)

Update spherical coordinates (lat/lon/radius)

Parameters
lat
lon
radius

Referenced by Isis::CnetViz::AbstractPointItem::setData().

void Isis::SurfacePoint::SetSphericalMatrix ( const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar)

Set spherical covariance matrix.

Parameters
covarSpherical variance/covariance matrix (radians**2)
Returns
void

References _FILEINFO_, Isis::Distance::meters(), and Isis::Angle::radians().

void Isis::SurfacePoint::SetSphericalSigmas ( const Angle latSigma,
const Angle lonSigma,
const Distance radiusSigma 
)

Set the spherical sigmas into the spherical variance/covariance matrix.

Parameters
latSigmaLatitude sigma of body-fixed coordinate of surface point
lonSigmaLongitude sigma of body-fixed coordinate of surface point
radiusSigmaRadius sigma of body-fixed coordinate of surface point

References Isis::Angle::isValid(), Isis::Distance::isValid(), Isis::Distance::meters(), and Isis::Angle::radians().

void Isis::SurfacePoint::SetSphericalSigmasDistance ( const Distance latSigma,
const Distance lonSigma,
const Distance radiusSigma 
)

Set the spherical sigmas (in meters) into the spherical variance/covariance matrix.

Parameters
latSigmaLatitude sigma of body-fixed coordinate of surface point in meters
lonSigmaLongitude sigma of body-fixed coordinate of surface point in meters
radiusSigmaRadius sigma of body-fixed coordinate of surface point in meters

References _FILEINFO_.

Referenced by Isis::CnetViz::AbstractPointItem::setData().

void Isis::SurfacePoint::ToNaifArray ( double  naifOutput[3]) const

A naif array is a c-style array of size 3.

The element types are double... keep in mind a SpiceDouble is a double. The values' units are kilometers because that is the unit naif works in. The first element is X, the second Y, and the third Z.

Parameters
naifOutputThe naif array to populate with the surface point's XYZ position.

References _FILEINFO_.

Referenced by Isis::DemShape::calculateLocalNormal(), Isis::NaifDskShape::ellipsoidNormal(), Isis::TriangularPlate::hasPoint(), Isis::TriangularPlate::point(), and Isis::RadarGroundMap::SetGround().


The documentation for this class was generated from the following files: