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

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.

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

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

SRM_HSR_Code get_hsr ()
 Returns this SRF's Hsr code.

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.

abstract 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) throws SrmException
 Creates a Standard SRF from its SRF code.

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

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


Protected Member Functions

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

Protected Attributes

SRM_ORM_Code _orm
SRM_HSR_Code _hsr
SRM_SRFT_Code _mySrftCode = SRM_SRFT_Code.SRFT_UNDEFINED
CacheManager _myOpSeq
HashMap _internalSRFs

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

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,
int  set_member,
SRM_ORM_Code  orm,
SRM_HSR_Code  hsr
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
hsr in: the HSR transformation associated with the created SRF
Returns:
a SRF template instance associated with the SRF Set member.
Note:
Use the concrete SRF classes to create SRFs that are not standard, which require specific constructor parameters.

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

The range of the set member code is defined for each SRF Set as follows:

  1. Alabama SPCS [ 1 (West), 2 (East) ]
  2. Global Coordinate System (GTRS) [ 1, 49896 ] cell id
  3. Lambert NTF [ 1 (Zone I), 4 (Zone IV) ]
  4. Japan Plane System [ 1, 19 ]
  5. Universal Polar Stereographic [ 1 (Northern Pole), 2 (Southern Pole)]
  6. Universal Transverse Mercator [ 1 (Northern zone 1), 60 (Northern zone 60) ], [ 61 (Southern zone 1), 120 (Southern zone 60) ]
  7. Wisconsin SPCS [ 1 (South zone), 2 (Central zone), 3 (North zone) ]

The member code is of type "int". There are no member code predefined for GTRS in the SRM_SSM_Code enumeration type due to its wide range.

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
    //   HSR              => WGS 1984 IDENTITY transformation
    try {
       BaseSRF utmSrf = BaseSRF.createSRFSetMember( SRM_SRFS_Code.SRFS_UNIVERSAL_TRANSVERSE_MERCATOR,
                                                        SRF_SSR_Code._SSM_UTM_ZONE_12_SOUTHERN_HEMISPHERE,
                                                        SRM_ORM_Code.ORM_WGS_1984,
                                                        SRM_HSR_Code.HSR_WGS_1984_IDENTITY );
        } catch (SrmException ex)
        ...

        // Note1: The returned object is of class SRF_TransverseMercator.
    // Note2: All other Transverse Mercator SRF parameters are fixed for a given Set member.

BaseSRF SRM.BaseSRF.createStandardSRF SRM_SRF_Code  srf_code  )  throws SrmException [static]
 

Creates a Standard SRF from its SRF code.

Parameters:
srf_code in: the code for a standard SRF to create
Returns:
a SRF template instance associated with the "Standard" SRF.
Note:
Use the concrete SRF classes to create SRFs that are not "standard", which require specific 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 (BNG) SRF is a follows:
    import SRM.*;
    ...
    
    // call createStandardSRF with:
    //   SRF code     => SRF_BRITISH_NATIONAL_GRID
    try {
       BaseSRF bngSrf = BaseSRF.createStandardSRF( SRM_SRF_Code.SRF_BRITISH_NATIONAL_GRID );
        } catch (SrmException ex)
        ...

        // Note1: The returned object is of class SRF_TransverseMercator.
        // Note2: All the Mercator SRF parameters are pre-defined for the BNG SRF.

SRM_HSR_Code SRM.BaseSRF.get_hsr  ) 
 

Returns this SRF's Hsr code.

Returns:
an HSR code of this SRF

SRM_ORM_Code SRM.BaseSRF.get_orm  ) 
 

Returns this SRF's Object Reference Model code.

Returns:
an ORM code of this SRF

SRM_SRF_Code SRM.BaseSRF.getSRFCode  ) 
 

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

Returns:
a pre-defined SRF code of this SRF This method will return "SRF_UNDEFINED" 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:
an SRF Set code of this SRF This method will return "SRFS_UNDEFINED" if the SRF Set was not originally created with the createSRFSetMember method.
See also:
createSRFSetMember()

int SRM.BaseSRF.getSRFSetMemberCode  ) 
 

Returns this SRF's Set member code.

Returns:
an SRF Set member code of this SRF This method will return 0 (which means "UNDEFINED") 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:
an 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

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.


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