USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::SurfacePoint Class Reference
[Geometry]

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

#include <SurfacePoint.h>

List of all members.

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)
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)
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:
lat The latitude of the surface point
lon The longitude of the surface point
radius The 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:
lat The latitude of the surface point
lon The longitude of the surface point
radius The 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.

Parameters:
sigmaLat The sigma of the latitude
sigmaLon The sigma of the longitude
sigmaRadius The sigma of the local radius

References SetSpherical().

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:
x The x coordinate of the surface point
y The y coordinate of the surface point
z The z coordinate of the surface point

References SetRectangular().

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:
x The x coordinate of the surface point
y The y coordinate of the surface point
z The 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.

Parameters:
xSigma The x coordinate of the surface point
ySigma The y coordinate of the surface point
zSigma The z coordinate of the surface point

References SetRectangular().

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:
naifValues The naif array to use as rectangular coordinates

References Isis::Displacement::Kilometers, and Isis::Displacement::setKilometers().

Referenced by Isis::TriangularPlate::intercept(), Isis::ShapeModel::intersectEllipsoid(), Isis::PlaneShape::intersectSurface(), and Isis::TriangularPlate::point().

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().

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(), Isis::IException::Programmer, and Valid().

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

Latitude Isis::SurfacePoint::GetLatitude (  )  const
Angle Isis::SurfacePoint::GetLatSigma (  )  const
Distance Isis::SurfacePoint::GetLatSigmaDistance (  )  const
double Isis::SurfacePoint::GetLatWeight (  )  const

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

References _FILEINFO_, GetLatSigma(), Isis::IException::Programmer, and Isis::Angle::radians().

Distance Isis::SurfacePoint::GetLocalRadius (  )  const
Distance Isis::SurfacePoint::GetLocalRadiusSigma (  )  const
double Isis::SurfacePoint::GetLocalRadiusWeight (  )  const

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

References _FILEINFO_, GetLocalRadiusSigma(), Isis::Distance::kilometers(), and Isis::IException::Programmer.

Longitude Isis::SurfacePoint::GetLongitude (  )  const
Angle Isis::SurfacePoint::GetLonSigma (  )  const
Distance Isis::SurfacePoint::GetLonSigmaDistance (  )  const
double Isis::SurfacePoint::GetLonWeight (  )  const

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

References _FILEINFO_, GetLonSigma(), Isis::IException::Programmer, and Isis::Angle::radians().

symmetric_matrix< double, upper > Isis::SurfacePoint::GetRectangularMatrix (  )  const
symmetric_matrix< double, upper > Isis::SurfacePoint::GetSphericalMatrix (  )  const
Displacement Isis::SurfacePoint::GetX (  )  const
Distance Isis::SurfacePoint::GetXSigma (  )  const
Displacement Isis::SurfacePoint::GetY (  )  const
Distance Isis::SurfacePoint::GetYSigma (  )  const
Displacement Isis::SurfacePoint::GetZ (  )  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  ) 
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:
majorAxis The semi-major axis of the surface model
minorAxis The semi-minor axis of the surface model
polarAxis The polar axis of the surface model

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

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 boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar 
)
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:
x x value of body-fixed coordinate of surface point
y y value of body-fixed coordinate of surface point
z z value of body-fixed coordinate of surface point
xSigma x sigma of body-fixed coordinate of surface point
ySigma y sigma of body-fixed coordinate of surface point
zSigma z sigma of body-fixed coordinate of surface point
Returns:
void

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

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

void Isis::SurfacePoint::SetRectangularMatrix ( const boost::numeric::ublas::symmetric_matrix< double, boost::numeric::ublas::upper > &  covar  ) 
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:
xSigma x sigma of body-fixed coordinate of surface point
ySigma y sigma of body-fixed coordinate of surface point
zSigma z sigma of body-fixed coordinate of surface point

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

Referenced by SetRectangular().

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::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:
lat Body-fixed latitude of surface point
lon Body-fixed longitude of surface point
radius Local radius of surface point
latSigma Latitude sigma of of spherical coordinate of surface point
lonSigma Longitude sigma of of spherical coordinate of surface point
radiusSigma Local radius sigma of of spherical coordinate of surface point

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

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

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  ) 

Referenced by SetSphericalSigmas().

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

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

Parameters:
latSigma Latitude sigma of body-fixed coordinate of surface point
lonSigma Longitude sigma of body-fixed coordinate of surface point
radiusSigma Radius sigma of body-fixed coordinate of surface point

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

Referenced by SetSpherical(), and SetSphericalSigmasDistance().

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:
latSigma Latitude sigma of body-fixed coordinate of surface point in meters
lonSigma Longitude sigma of body-fixed coordinate of surface point in meters
radiusSigma Radius sigma of body-fixed coordinate of surface point in meters

References _FILEINFO_, GetLatitude(), Isis::Distance::isValid(), Isis::IException::Programmer, Isis::Angle::Radians, SetSphericalSigmas(), and Valid().

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:
naifOutput The naif array to populate with the surface point's XYZ position.

References _FILEINFO_, Isis::Displacement::kilometers(), Isis::IException::Programmer, and Valid().

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

bool Isis::SurfacePoint::Valid (  )  const

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