Main Page | Packages | Class Hierarchy | Alphabetical List | Compound List | Namespace Members | Compound Members | Related Pages

SRM.BaseSRF Class Reference

The BaseSRF abstract class is the base class for all SRFs. More...

Inheritance diagram for SRM.BaseSRF:

Inheritance graph
[legend]
List of all members.

Public Member Functions

SRM_SRF_Code getSRFCode ()
 Returns this pre-defined ("standard") SRF code.

SRM_SRFT_Code getSRFTemplateCode ()
 Returns this SRF's Template code.

SRM_SRFS_Code getSRFSetCode ()
 Returns this SRF's Set code.

SRM_SRFSM_Code getSRFSetMemberCode ()
 Returns this SRF's Set member code.

SRM_CS_Code getCSCode ()
 Returns this SRF's CS Code.

SRM_ORM_Code get_orm ()
 Returns this SRF's Object Reference Model code.

SRM_ORM_Code getOrm ()
 Returns this SRF's Object Reference Model code.

SRM_RT_Code get_rt ()
 Returns this SRF's RT code.

SRM_RT_Code getRt ()
 Returns this SRF's RT code.

double getA ()
 Returns this SRF's major semi-axis value (A).

double getF ()
 Returns this SRF's flattening value (F).

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

SRM_Coordinate_Valid_Region_Code checkCoordinate (Coord src) throws SrmException
 Check a coordinate in this SRF for valid region.

String toString ()
 Returns a string representation of this SRF.

abstract boolean isEqual (BaseSRF srf)
BaseSRF makeClone () throws SrmException
 Returns the shallow copy of this object instance.


Static Public Member Functions

BaseSRF createStandardSRF (SRM_SRF_Code srf_code, SRM_RT_Code rt_code) throws SrmException
 Creates a Standard SRF from its SRF code.

BaseSRF createSRFSetMember (SRM_SRFS_Code srf_set, SRM_SRFSM_Code set_member, SRM_ORM_Code orm, SRM_RT_Code rt) throws SrmException
 Creates an SRF from a SRF set code, a set member code specific to that set, and an ORM code.

boolean querySRFTSupport (SRM_SRFT_Code srft_code)
 Queries for the SRFT support by the implementation.

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

String getImplVerInfo ()
 Returns the string for this version of SRM Java implementation.


Protected Member Functions

void setSrfCode (SRM_SRF_Code srfCode)
void setSrfSetCode (SRM_SRFS_Code srfSetCode)
void setSrfSetMemberCode (SRM_SRFSM_Code srfSetMemberCode)

Static Protected Member Functions

double[] interimConv (Coord src_coord, SRM_SRFT_Code tgt_srft) throws SrmException

Protected Attributes

SRM_ORM_Code _orm
SRM_RT_Code _rt
SRM_SRFT_Code _mySrftCode = SRM_SRFT_Code.SRFTCOD_UNSPECIFIED
SRM_CS_Code _myCsCode = SRM_CS_Code.CSCOD_UNSPECIFIED
CacheManager _myOpSeq
HashMap< String, BaseSRF_internalSRFs

Static Package Functions

boolean queryORMSupport (SRM_ORM_Code orm_code, SRM_RT_Code rt_code)
 Queries for the ORM/RT pair support by the implementation.


Detailed Description

The BaseSRF abstract class is the base class for all SRFs.

Author:
David Shen
See also:
BaseSRF_2D, BaseSRF_3D


Member Function Documentation

double SRM.BaseSRF.calculateEuclideanDistance Coord  coord1,
Coord  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 coordinates (in meters).
Note:
The input coordinates do not need to be from the same SRF, but must have the same dimensionality, i.e., both 2D, 3D, or Surface.

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.changeCoordinateSRF Coord  src,
Coord  tgt
throws SrmException
 

Changes a coordinate's values to this SRF.

Parameters:
src in: the source coordinate in some other SRF
tgt in out: the target coordinate in this SRF
Returns:
the Valid Region of the target coordinate
Note:
The source and target coordinates must be of same the dimension (2D or 3D).

SRM_Coordinate_Valid_Region_Code SRM.BaseSRF.checkCoordinate Coord  src  )  throws SrmException
 

Check a coordinate in this SRF for valid region.

Parameters:
src in: the source coordinate in some other SRF
Returns:
the coordinate valid region code in the coordinate's SRF
Note:
The input coordinate must have been created using this SRF.

This case is where the validity boundaries for an SRF are in a different SRF from the SRF itself

this is the easy case where the boundaries are in the same srf

BaseSRF SRM.BaseSRF.createSRFSetMember SRM_SRFS_Code  srf_set,
SRM_SRFSM_Code  set_member,
SRM_ORM_Code  orm,
SRM_RT_Code  rt
throws SrmException [static]
 

Creates an SRF from a SRF set code, a set member code specific to that set, and an ORM code.

Parameters:
srf_set in: the code for an SRF set
set_member in: the code for an SRF set member.
orm in: the ORM code associated with the created SRF
rt in: the RT transformation associated with the created SRF
Returns:
a SRF template instance associated with the SRF Set member.
Note:
All SRFs are intrinsically created from a template, hence the appropriate template instance will always be returned.

There is a specific sub-class of SRM_SRFSM_Code class associated with each SRF set for specifying its member code as follows:.

The SRFS member code "UNSPECIFIED" is not allowed when specifying a SRF set member.

  1. Alabama SPCS => SRM_SRFSM_Alabama_SPCS_Code
  2. Global Coordinate System (GTRS) => SRM_SRFSM_GTRS_GCS_Code
  3. Lambert NTF => SRM_SRFSM_Lambert_NTF_Code
  4. Japan Plane System => SRM_SRFSM_Japan_Rectangular_Plane_CS_Code
  5. Universal Polar Stereographic => SRM_SRFSM_UPS_Code
  6. Universal Transverse Mercator => SRM_SRFSM_UTM_Code
  7. Wisconsin SPCS => SRM_SRFSM_Wisconsin_SPCS_Code
See also:
createSRFSetMember(), SRM_SRFS_Code, SRM_SSM_Code
A sample code to create a UTM SRF corresponding to Zone 12 Southern hemisphere based on WGS 1984 with Identity transformation is as follows:
        import SRM.*;
        ...

        // call createSRFSetMember with:
        //   SRF Set code     => UTM
        //   Set Member code  => Zone 12 southern hemisphere
        //   ORM              => WGS 1984
        //   RT               => WGS 1984 IDENTITY transformation
        try
        {
            BaseSRF utmSrf = BaseSRF.createSRFSetMember(SRM_SRFS_Code.SRFSCOD_UNIVERSAL_TRANSVERSE_MERCATOR,
                                                        SRFSM_UTM_Code.SRFMSUTM_ZONE_12_SOUTHERN_HEMISPHERE,
                                                        SRM_ORM_Code.ORMCOD_WGS_1984,
                                                        SRM_RT_Code.RTCOD_WGS_1984_IDENTITY);
        }
        catch (SrmException ex)
        ...

        // Note1: In this example, the returned object is of class SRF_TransverseMercator with its parameters pre-defined.
        // Note2: The SRFS member code (SRFSM_UTM_Code) must be compatible with the SRFS code (SRFSCOD_UNIVERSAL_TRANSVERSE_MERCATOR).

BaseSRF SRM.BaseSRF.createStandardSRF SRM_SRF_Code  srf_code,
SRM_RT_Code  rt_code
throws SrmException [static]
 

Creates a Standard SRF from its SRF code.

Parameters:
srf_code in: the code for a standard SRF to create
rt_code in: the RT code to use in the created SRF
Returns:
a SRF template instance associated with the "Standard" SRF.
Exceptions:
This method throws SrmException
Note:
Use the concrete SRF classes to create "standard" SRFs, which use pre-defined SRF template constructor parameters.

All SRFs are intrinsically created from a template, hence the appropriate template instance will always be returned.

See also:
createStandardSRF(), SRM_SRF_Code
A sample code to create a British National Grid Airy SRF is as follows:
        import SRM.*;
        ...

        // call createStandardSRF with:
        //   SRF code     => SRFCOD_BRITISH_NATIONAL_GRID_AIRY
        try
        {
            BaseSRF bngSrf = BaseSRF.createStandardSRF(SRM_SRF_Code.SRFCOD_BRITISH_NATIONAL_GRID_AIRY,
                                                       SRM_RT_Code.RTCOD_OSGB_1936_3_MEAN_SOLUTION);
        }
        catch (SrmException ex)
        ...

        // Note1: In this example, the returned object is of class SRF_TransverseMercator with its pre-defined parameters.
        // Note2: The RT parameter must be compatible with ORMCOD_OSGB_1936. (See Users' Guide for the
                  pre-assigned ORMs associated with each standard SRF.

SRM_ORM_Code SRM.BaseSRF.get_orm  ) 
 

Returns this SRF's Object Reference Model code.

Returns:
an ORM code of this SRF
Deprecated:
As of SRM 4.1.2, replaced by getOrm()
See also:
getOrm()

SRM_RT_Code SRM.BaseSRF.get_rt  ) 
 

Returns this SRF's RT code.

Returns:
an RT code of this SRF
Deprecated:
As of SRM 4.1.2, replaced by getRt()
See also:
getRt()

double SRM.BaseSRF.getA  ) 
 

Returns this SRF's major semi-axis value (A).

Returns:
a major semi-axis value

SRM_CS_Code SRM.BaseSRF.getCSCode  ) 
 

Returns this SRF's CS Code.

Returns:
the SRF CS code of this SRF

double SRM.BaseSRF.getF  ) 
 

Returns this SRF's flattening value (F).

Returns:
a flattening value

String SRM.BaseSRF.getImplVerInfo  )  [static]
 

Returns the string for this version of SRM Java implementation.

Returns:
This SRM Java implementation version.

SRM_ORM_Code SRM.BaseSRF.getOrm  ) 
 

Returns this SRF's Object Reference Model code.

Returns:
an ORM code of this SRF

SRM_RT_Code SRM.BaseSRF.getRt  ) 
 

Returns this SRF's RT code.

Returns:
an RT code of this SRF

SRM_SRF_Code SRM.BaseSRF.getSRFCode  ) 
 

Returns this pre-defined ("standard") SRF code.

Returns:
the pre-defined SRF code of this SRF
Note:
This method will return "SRFCOD_UNSPECIFIED" if the SRF was not originally created with the createStandardSRF method.
See also:
createStandardSRF()

SRM_SRFS_Code SRM.BaseSRF.getSRFSetCode  ) 
 

Returns this SRF's Set code.

Returns:
the SRF Set code of this SRF
Note:
This method will return "SRFSCOD_UNSPECIFIED" if the SRF Set was not originally created with the createSRFSetMember method.
See also:
createSRFSetMember()

SRM_SRFSM_Code SRM.BaseSRF.getSRFSetMemberCode  ) 
 

Returns this SRF's Set member code.

Returns:
the SRF Set member code of this SRF
Note:
This method will return 0 (which means "UNSPECIFIED") if the SRF Set was not originally created with the createSRFSetMember method.
See also:
createSRFSetMember()

SRM_SRFT_Code SRM.BaseSRF.getSRFTemplateCode  ) 
 

Returns this SRF's Template code.

Returns:
the SRF Template code of this SRF
See also:
createStandardSRF()

abstract boolean SRM.BaseSRF.isEqual BaseSRF  srf  )  [pure virtual]
 

Returns:
TRUE if the SRF parameters are equal.
Note:
This method returns FALSE if the input srf is null

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_LocalSpaceAzimuthal, SRM.SRF_LocalSpacePolar, SRM.SRF_LocalSpaceRectangular2D, SRM.SRF_LocalSpaceRectangular3D, SRM.SRF_LocalTangentSpaceAzimuthalSpherical, SRM.SRF_LocalTangentSpaceCylindrical, SRM.SRF_LocalTangentSpaceEuclidean, SRM.SRF_LococentricEuclidean3D, SRM.SRF_Mercator, SRM.SRF_ObliqueMercatorSpherical, SRM.SRF_PolarStereographic, SRM.SRF_SolarEcliptic, and SRM.SRF_SolarEquatorial.

BaseSRF SRM.BaseSRF.makeClone  )  throws SrmException
 

Returns the shallow copy of this object instance.

Note:
The cloned object will reference the same object as the original object.

boolean SRM.BaseSRF.queryORMSupport SRM_ORM_Code  orm_code,
SRM_RT_Code  rt_code
[static, package]
 

Queries for the ORM/RT pair support by the implementation.

Parameters:
orm_code in: the object reference model code.
rt_code in: the reference transformation code.
Returns:
true if the ORM/RT pair is supported by this implementation.
Note:
Not all the supported SRFTs is compatible with all the supported ORM/RT pairs.

boolean SRM.BaseSRF.querySRFTSupport SRM_SRFT_Code  srft_code  )  [static]
 

Queries for the SRFT support by the implementation.

Returns:
true if the SRFT is supported by this implementation.


The documentation for this class was generated from the following file:
Spatial Reference Model Java API Version 4.4.0 - January 21, 2010
Copyright © 2010 SEDRIS Docs by Doxygen 1.3.2