org.jscience.geography.coordinates
Class BaseSRF_3D

java.lang.Object
  extended by org.jscience.geography.coordinates.BaseSRF
      extended by org.jscience.geography.coordinates.BaseSRF_3D
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
BaseSRF_WithEllipsoidalHeight, BaseSRF_WithTangentPlaneSurface, SRF_Celestiocentric, SRF_Celestiomagnetic, SRF_EquatorialInertial, SRF_HeliosphericAriesEcliptic, SRF_HeliosphericEarthEcliptic, SRF_HeliosphericEarthEquatorial, SRF_LocalSpaceRectangular3D, SRF_SolarEcliptic, SRF_SolarEquatorial, SRF_SolarMagneticDipole, SRF_SolarMagneticEcliptic

public abstract class BaseSRF_3D
extends BaseSRF

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

See Also:
BaseSRF, BaseSRF_2D

Field Summary
 
Fields inherited from class org.jscience.geography.coordinates.BaseSRF
_hsr, _internalSRFs, _myOpSeq, _mySrftCode, _orm
 
Constructor Summary
BaseSRF_3D()
           
 
Method Summary
static double calculateEuclideanDistance(Coord3D coord1, Coord3D coord2)
          Returns the euclidean distance between two coordinates.
 SRM_Coordinate_Valid_Region_Code changeCoordinate3DSRF(Coord3D src, Coord3D tgt)
          Changes a coordinate's values to this SRF.
 SRM_Coordinate_Valid_Region_Code changeDirectionSRF(Direction src_dir, Direction tgt_dir)
          Changes a direction's reference coordinate and vector to this SRF.
 SRM_Coordinate_Valid_Region_Code changeOrientationSRF(Orientation src_ori, Orientation tgt_ori)
          Changes an orientation's values to this SRF.
 SRM_Coordinate_Valid_Region_Code checkDirection(Direction direction)
          Check a direction in this SRF.
 SRM_Coordinate_Valid_Region_Code checkOrientation(Orientation orientation)
          Check an orientation in this SRF.
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.
 Direction createDirection()
          Creates a direction object with reference location and vector components as Double.NaN.
 Direction createDirection(Coord3D ref_coord, double[] vec)
          Creates a direction object.
 Orientation createOrientation()
          Creates an Orientation object with a reference location and matrix components as Double.NaN.
 Orientation createOrientation(Coord3D ref_coord, Direction dir1, Direction dir2, Direction dir3)
          Creates an Orientation object with a reference location and three Direction objects as the 3x3 Orientation matrix.
 Orientation createOrientation(Coord3D ref_coord, double[][] mtx)
          Creates an orientation object.
 double[] getCoordinate3DValues(Coord3D coord)
          Retrieves the 3D coordinate component values.
 void getDirectionValues(Direction direction, Coord3D ref_coord, double[] vec)
          Retrieves the direction component values.
protected  int getMemberCode(double[] src_coord, SRM_ORM_Code orm_dst, SRM_HSR_Code hsr_dst, SRM_SRFS_Code tgt_srfs)
           
 BaseSRF_3D getNaturalSRFSetMember(Coord3D src_coord, SRM_ORM_Code orm_dst, SRM_HSR_Code hsr_dst, SRM_SRFS_Code tgt_srfs)
          Returns the natural SRF Set member instance that the 3D coordinate is located in the target SRF Set.
 int getNaturalSRFSetMemberCode(Coord3D src_coord, SRM_ORM_Code orm_dst, SRM_HSR_Code hsr_dst, SRM_SRFS_Code tgt_srfs)
          Computes the natural SRF Set member code (region) where the 3D coordinate is located in the target SRF Set.
 void getOrientationValues(Orientation orientation, Coord3D ref_coord, double[][] mtx)
          Retrieves the orientation component values.
 Coord3D instanceAbstractSpaceCoordinate(Coord3D src_coord, Orientation orientation)
          Instances a 3D source coordinate and orientation into this SRF.
 
Methods inherited from class org.jscience.geography.coordinates.BaseSRF
calculateEuclideanDistance, changeCoordinateSRF, checkCoordinate, createSRFSetMember, createStandardSRF, get_hsr, get_orm, getSRFCode, getSRFSetCode, getSRFSetMemberCode, getSRFTemplateCode, isEqual, makeClone, setSrfCode, setSrfSetCode, setSrfSetMemberCode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseSRF_3D

public BaseSRF_3D()
Method Detail

createCoordinate3D

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

Returns:
a 3D coordinate object

createCoordinate3D

public abstract Coord3D createCoordinate3D(double coord_comp1,
                                           double coord_comp2,
                                           double coord_comp3)
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

getCoordinate3DValues

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

Parameters:
coord - in: a 3D coordinate
Returns:
an array of size 3 containing the component values for the 3D coordinate
Throws:
SrmException

changeCoordinate3DSRF

public SRM_Coordinate_Valid_Region_Code 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
Throws:
SrmException

createDirection

public Direction 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
Throws:
SrmException

createDirection

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

Returns:
a direction object
Throws:
SrmException

getDirectionValues

public void 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
Throws:
SrmException

changeDirectionSRF

public 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.

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

checkDirection

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

Parameters:
direction - in: the direction in this SRF
Returns:
the coordinate valid region code in the direction's SRF
Throws:
SrmException

createOrientation

public Orientation 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
Throws:
SrmException

createOrientation

public 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.

Returns:
an Orientation object
Throws:
SrmException

createOrientation

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

Returns:
an Orientation object
Throws:
SrmException

getOrientationValues

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

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
Throws:
SrmException

checkOrientation

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

Parameters:
orientation - in: the orientation in this SRF
Returns:
the coordinate valid region code in the orientation's SRF
Throws:
SrmException

changeOrientationSRF

public SRM_Coordinate_Valid_Region_Code 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
Throws:
SrmException

instanceAbstractSpaceCoordinate

public Coord3D 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
Throws:
SrmException

calculateEuclideanDistance

public static double calculateEuclideanDistance(Coord3D coord1,
                                                Coord3D coord2)
                                         throws SrmException
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).
Throws:
SrmException

getNaturalSRFSetMemberCode

public 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.

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
Throws:
SrmException

getNaturalSRFSetMember

public 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.

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
Throws:
SrmException

getMemberCode

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