Main Page | Packages | Class Hierarchy | Alphabetical List | Compound List | Compound Members

SRM.BaseSRF_3D Class Reference

The BaseSRF_3D abstract class is the base class for the 3D SRFs. More...

Inheritance diagram for SRM.BaseSRF_3D:

Inheritance graph
[legend]
List of all members.

Public Member Functions

abstract Coord3D createCoordinate3D ()
 Creates a 3D coordinate object.

abstract Coord3D createCoordinate3D (double coord_comp1, double coord_comp2, double coord_comp3)
 Creates a 3D coordinate object.

double[] getCoordinate3DValues (Coord3D coord) throws SrmException
 Retrieves the 3D coordinate component values.

SRM_Coordinate_Valid_Region_Code changeCoordinate3DSRF (Coord3D src, Coord3D tgt) throws SrmException
 Changes a coordinate's values to this SRF.

Direction createDirection (Coord3D ref_coord, double vec[]) throws SrmException
 Creates a direction object.

Direction createDirection () throws SrmException
 Creates a direction object with reference location and vector components as Double.NaN.

void getDirectionValues (Direction direction, Coord3D ref_coord, double vec[]) throws SrmException
 Retrieves the direction component values.

SRM_Coordinate_Valid_Region_Code changeDirectionSRF (Direction src_dir, Direction tgt_dir) throws SrmException
 Changes a direction's reference coordinate and vector to this SRF.

SRM_Coordinate_Valid_Region_Code checkDirection (Direction direction) throws SrmException
 Check a direction in this SRF.

Orientation createOrientation (Coord3D ref_coord, double mtx[][]) throws SrmException
 Creates an orientation object.

Orientation createOrientation (Coord3D ref_coord, Direction dir1, Direction dir2, Direction dir3) throws SrmException
 Creates an Orientation object with a reference location and three Direction objects as the 3x3 Orientation matrix.

Orientation createOrientation () throws SrmException
 Creates an Orientation object with a reference location and matrix components as Double.NaN.

void getOrientationValues (Orientation orientation, Coord3D ref_coord, double mtx[][]) throws SrmException
 Retrieves the orientation component values.

SRM_Coordinate_Valid_Region_Code checkOrientation (Orientation orientation) throws SrmException
 Check an orientation in this SRF.

SRM_Coordinate_Valid_Region_Code changeOrientationSRF (Orientation src_ori, Orientation tgt_ori) throws SrmException
 Changes an orientation's values to this SRF.

Coord3D instanceAbstractSpaceCoordinate (Coord3D src_coord, Orientation orientation) throws SrmException
 Instances a 3D source coordinate and orientation into this SRF.

int getNaturalSRFSetMemberCode (Coord3D src_coord, SRM_ORM_Code orm_dst, SRM_HSR_Code hsr_dst, SRM_SRFS_Code tgt_srfs) throws SrmException
 Computes the natural SRF Set member code (region) where the 3D coordinate is located in the target SRF Set.

BaseSRF_3D getNaturalSRFSetMember (Coord3D src_coord, SRM_ORM_Code orm_dst, SRM_HSR_Code hsr_dst, SRM_SRFS_Code tgt_srfs) throws SrmException
 Returns the natural SRF Set member instance that the 3D coordinate is located in the target SRF Set.


Static Public Member Functions

double calculateEuclideanDistance (Coord3D coord1, Coord3D coord2) throws SrmException
 Returns the euclidean distance between two coordinates.


Protected Member Functions

int getMemberCode (double[] src_coord, SRM_ORM_Code orm_dst, SRM_HSR_Code hsr_dst, SRM_SRFS_Code tgt_srfs) throws SrmException

Detailed Description

The BaseSRF_3D abstract class is the base class for the 3D SRFs.

Author:
David Shen
See also:
BaseSRF, BaseSRF_2D


Member Function Documentation

double SRM.BaseSRF_3D.calculateEuclideanDistance Coord3D  coord1,
Coord3D  coord2
throws SrmException [static]
 

Returns the euclidean distance between two coordinates.

Parameters:
coord1 in: a coordinate in some SRF
coord2 in: a coordinate in some SRF
Returns:
the Euclidean distance between the two Coord3D coordinates (in meters).
Note:
The input coordinates do not need to be from the same SRF.

This method will make (and cache) internal conversions when the inputs coordinates are from SRFs other than SRF_Celestiocentric.

SRM_Coordinate_Valid_Region_Code SRM.BaseSRF_3D.changeCoordinate3DSRF Coord3D  src,
Coord3D  tgt
throws SrmException
 

Changes a coordinate's values to this SRF.

Parameters:
src in: the source 3D coordinate in some other 3D SRF
tgt in out: the target coordinate in this 3D SRF
Returns:
the Valid Region of the target coordinate

SRM_Coordinate_Valid_Region_Code SRM.BaseSRF_3D.changeDirectionSRF Direction  src_dir,
Direction  tgt_dir
throws SrmException
 

Changes a direction's reference coordinate and vector to this SRF.

Parameters:
src_dir in: the source direction in some other SRF
tgt_dir in/out: the target direction in this SRF

SRM_Coordinate_Valid_Region_Code SRM.BaseSRF_3D.changeOrientationSRF Orientation  src_ori,
Orientation  tgt_ori
throws SrmException
 

Changes an orientation's values to this SRF.

Parameters:
src_ori in: the source orientation in some other SRF
Returns:
the destination orientation in this SRF

SRM_Coordinate_Valid_Region_Code SRM.BaseSRF_3D.checkDirection Direction  direction  )  throws SrmException
 

Check a direction in this SRF.

Note:
The input direction object must have been created using this SRF.
Parameters:
direction in: the direction in this SRF
Returns:
the coordinate valid region code in the direction's SRF

SRM_Coordinate_Valid_Region_Code SRM.BaseSRF_3D.checkOrientation Orientation  orientation  )  throws SrmException
 

Check an orientation in this SRF.

Note:
The input orientation object must have been created using this SRF.
Parameters:
orientation in: the orientation in this SRF
Returns:
the coordinate valid region code in the orientation's SRF

abstract Coord3D SRM.BaseSRF_3D.createCoordinate3D double  coord_comp1,
double  coord_comp2,
double  coord_comp3
[pure virtual]
 

Creates a 3D coordinate object.

Parameters:
coord_comp1 in: the values of the first component of the 3D coordinate
coord_comp2 in: the values of the second component of the 3D coordinate
coord_comp3 in: the values of the third component of the 3D coordinate
Returns:
a 3D coordinate object

Implemented in SRM.SRF_Celestiocentric, SRM.SRF_Celestiodetic, SRM.SRF_Celestiomagnetic, SRM.SRF_EquatorialInertial, SRM.SRF_EquidistantCylindrical, SRM.SRF_HeliosphericAriesEcliptic, SRM.SRF_HeliosphericEarthEcliptic, SRM.SRF_HeliosphericEarthEquatorial, SRM.SRF_LambertConformalConic, SRM.SRF_LocalSpaceRectangular3D, SRM.SRF_LocalTangentSpaceAzimuthalSpherical, SRM.SRF_LocalTangentSpaceCylindrical, SRM.SRF_LocalTangentSpaceEuclidean, SRM.SRF_Mercator, SRM.SRF_ObliqueMercatorSpherical, SRM.SRF_Planetodetic, SRM.SRF_PolarStereographic, SRM.SRF_SolarEcliptic, SRM.SRF_SolarEquatorial, SRM.SRF_SolarMagneticDipole, SRM.SRF_SolarMagneticEcliptic, and SRM.SRF_TransverseMercator.

abstract Coord3D SRM.BaseSRF_3D.createCoordinate3D  )  [pure virtual]
 

Creates a 3D coordinate object.

Returns:
a 3D coordinate object The initial coordinate value is defaulted to [ Double.NaN, Double.NaN, Double.NaN ].

Implemented in SRM.SRF_Celestiocentric, SRM.SRF_Celestiodetic, SRM.SRF_Celestiomagnetic, SRM.SRF_EquatorialInertial, SRM.SRF_EquidistantCylindrical, SRM.SRF_HeliosphericAriesEcliptic, SRM.SRF_HeliosphericEarthEcliptic, SRM.SRF_HeliosphericEarthEquatorial, SRM.SRF_LambertConformalConic, SRM.SRF_LocalSpaceRectangular3D, SRM.SRF_LocalTangentSpaceAzimuthalSpherical, SRM.SRF_LocalTangentSpaceCylindrical, SRM.SRF_LocalTangentSpaceEuclidean, SRM.SRF_Mercator, SRM.SRF_ObliqueMercatorSpherical, SRM.SRF_Planetodetic, SRM.SRF_PolarStereographic, SRM.SRF_SolarEcliptic, SRM.SRF_SolarEquatorial, SRM.SRF_SolarMagneticDipole, SRM.SRF_SolarMagneticEcliptic, and SRM.SRF_TransverseMercator.

Direction SRM.BaseSRF_3D.createDirection  )  throws SrmException
 

Creates a direction object with reference location and vector components as Double.NaN.

Returns:
a direction object
Note:
This method is mainly intended for facilitating the creation of Direction objects that will be used as the target Direction for the changeDirectionSRF() method.

Direction SRM.BaseSRF_3D.createDirection Coord3D  ref_coord,
double  vec[]
throws SrmException
 

Creates a direction object.

Parameters:
ref_coord in: the 3D reference coordinate in this SRF.
vec[] in: the array of size 3 containing the vector component values. It can be changed after the direction is created.
Returns:
a direction object
Note:
The input reference coordinate must have been created using this SRF.

The reference coordinate cannot be changed after the direction is instantiated.

A sample code to instantiate a Direction object is as follows:
    import SRM.*;
    ...
    
        try {

       // first instantiate a SRF, say CD SRF in WGS 1984
           SRF_Celestiodetic CdSrf = new SRF_Celestiodetic(SRM_ORM_Code.ORM_WGS_1984,
                                                       SRM_HSR_Code.HSR_WGS_1984_IDENTITY);

           // then instantiate a 3D CD coordinate as the reference coordinate
           Coord3D_Celestiodetic CdCoord = 
        (Coord3D_Celestiodetic)CdSrf.createCoordinate3D(Math.toRadians(10.0),
                                Math.toRadians(20.0),
                                100.0);
    
       // then instantiate the Direction object by invoking the createDirection method
       Direction dir = CdSrf.createDirection( CdCoord, { 1.0, 2.0, 3.0 } );

        } catch (SrmException ex)
        ...

        // Note: The input reference coordinate is immutable.

Orientation SRM.BaseSRF_3D.createOrientation  )  throws SrmException
 

Creates an Orientation object with a reference location and matrix components as Double.NaN.

Returns:
an Orientation object
Note:
This method is mainly intended for facilitating the creation of Orientation objects that will be used as the target Orientation for the changeOrientationSRF() method.

Orientation SRM.BaseSRF_3D.createOrientation Coord3D  ref_coord,
Direction  dir1,
Direction  dir2,
Direction  dir3
throws SrmException
 

Creates an Orientation object with a reference location and three Direction objects as the 3x3 Orientation matrix.

Returns:
an Orientation object
Note:
The input reference coordinate must have been created using this SRF.

The input Direction objects must have use the same reference location as the input reference location.

Orientation SRM.BaseSRF_3D.createOrientation Coord3D  ref_coord,
double  mtx[][]
throws SrmException
 

Creates an orientation object.

Parameters:
ref_coord in: the 3D reference coordinate in this SRF
mtx[][] in: the 3x3 matrix containing the three vector component values
Returns:
an orientation object
Note:
The input reference coordinate must have been created using this SRF.
A sample code to instantiate an Orientation object is as follows:
    import SRM.*;
    ...
    
        try {

       // first instantiate a SRF, say CD SRF in WGS 1984
           SRF_Celestiodetic CdSrf = new SRF_Celestiodetic(SRM_ORM_Code.ORM_WGS_1984,
                                                       SRM_HSR_Code.HSR_WGS_1984_IDENTITY);

           // then Instantiate a 3D CD coordinate as the reference coordinate
           Coord3D_Celestiodetic CdCoord = 
        (Coord3D_Celestiodetic)CdSrf.createCoordinate3D(Math.toRadians(10.0),
                                Math.toRadians(20.0),
                                100.0);
       // then allocate a 3x3 matrix
       double[][] matrix = new double[][]{ {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0} };
    
       // then instantiate the Orientation object by invoking the createOrientation method
       Orientation ori = CdSrf.createOrientation( CdCoord, matrix );

        } catch (SrmException ex)
        ...

        // Note: The input reference coordinate is immutable.

double [] SRM.BaseSRF_3D.getCoordinate3DValues Coord3D  coord  )  throws SrmException
 

Retrieves the 3D coordinate component values.

Note:
The input coordinate must have been created using this SRF.
Parameters:
coord in: a 3D coordinate
Returns:
an array of size 3 containing the component values for the 3D coordinate

void SRM.BaseSRF_3D.getDirectionValues Direction  direction,
Coord3D  ref_coord,
double  vec[]
throws SrmException
 

Retrieves the direction component values.

Parameters:
direction in: the direction object
ref_coord in/out: the 3D reference coordinate in this SRF
vec[] in/out: the 3D reference coordinate in this SRF
Note:
The input direction must have been created using this SRF.

The input reference coordinate must have been created using this SRF.

BaseSRF_3D SRM.BaseSRF_3D.getNaturalSRFSetMember Coord3D  src_coord,
SRM_ORM_Code  orm_dst,
SRM_HSR_Code  hsr_dst,
SRM_SRFS_Code  tgt_srfs
throws SrmException
 

Returns the natural SRF Set member instance that the 3D coordinate is located in the target SRF Set.

Note:
The input coordinate must have been created using this SRF.
Parameters:
src_coord in : the source 3D coordinate in an SRF
orm_dst in : the ORM for the destination SRF Set
hsr_dst in : the HSR for the destination SRF Set
tgt_srfs in : the destination SRF Set Code
Returns:
the SRF Set Member instance for the destination SRF Set

int SRM.BaseSRF_3D.getNaturalSRFSetMemberCode Coord3D  src_coord,
SRM_ORM_Code  orm_dst,
SRM_HSR_Code  hsr_dst,
SRM_SRFS_Code  tgt_srfs
throws SrmException
 

Computes the natural SRF Set member code (region) where the 3D coordinate is located in the target SRF Set.

Note:
The input coordinate must have been created using this SRF.
Parameters:
src_coord in : the source 3D coordinate in an SRF
orm_dst in : the ORM for the destination SRF Set
hsr_dst in : the HSR for the destination SRF Set
tgt_srfs in : the destination SRF Set Code
Returns:
the SRF Set Member code for the destination SRF Set

void SRM.BaseSRF_3D.getOrientationValues Orientation  orientation,
Coord3D  ref_coord,
double  mtx[][]
throws SrmException
 

Retrieves the orientation component values.

Note:
The input orientation must have been created using this SRF.

The input reference coordinate must have been created using this SRF.

Parameters:
orientation in: the orientaiton object
ref_coord in/out: the 3D reference coordinate in this SRF
mtx[] in/out: the 3D reference coordinate in this SRF

Coord3D SRM.BaseSRF_3D.instanceAbstractSpaceCoordinate Coord3D  src_coord,
Orientation  orientation
throws SrmException
 

Instances a 3D source coordinate and orientation into this SRF.

Parameters:
src_coord in: the source coordinate to be instantiated in this SRF
orientation in: the orientation to be instantiated in this SRF
Returns:
the coordinates in this SRF


The documentation for this class was generated from the following file:
Spatial Reference Model Java API Version 4.0.0 - 29 Jul 2004
Copyright © 2004 SEDRIS Docs by Doxygen 1.3.2