BCoordSys Class Reference

#include <BCoordSys.h>

List of all members.


Detailed Description

Definition for a coordinate system.

Public Member Functions

 BCoordSys (const GeoCalc::CS::CCoordSys *pgcCS)
 Constructs a BCoordSys from a GeoCalcCore coordinate system object.
 BCoordSys (const BCoordSys &cs)
 Copy constructor.
 BCoordSys ()
 Default constructor.
bool ComputeRadiusAtLatitude (const double &latitude, double &radiusInMeters) const
 Sets the BUnit that describes the unit of measurement used in this BCoordSys.
bool ConvertFromGeodetic (double &x, double &y) const
 Converts a geodetic coordinate in the geodetic base of this coordinate system to this coordinate system.
BPoint ConvertFromGeodetic (const BPoint &inPt) const
 Converts a geodetic coordinate in the geodetic base of this coordinate system to this coordinate system.
bool ConvertToGeodetic (double &x, double &y) const
 Converts a point currently in this coordinate system to the geodetic base of this coordinate system.
BPoint ConvertToGeodetic (const BPoint &inPt) const
 Converts a point currently in this coordinate system to the geodetic base of this coordinate system.
const double & GetCentralMeridian () const
 Gets the central meridian of this coordinate system.
BClipPtr GetClip () const
 Gets a BClip that gives the boundary for the extents of the world in this coordinate system.
BCoordSysGetCoordSys (const BIdentifier &identifier)
 Gets a coordinate system from the data source based on a BIdentifier.
BString GetDescription (void) const
 Gets a description of this BCoordsys.
int GetDimensions () const
 Returns the number of dimensions in this coordinate system.
const
GeoCalc::CS::CCoordSys * 
GetGCCoordSys () const
 Returns the GeoCalcCore CCoordSys object that underlies this BCoordSys.
GeoCalc::CS::CCoordSys * GetGCCoordSys ()
 Returns the GeoCalcCore CCoordSys object that underlies this BCoordSys.
virtual bool GetIdentifier (const BString &issuer, BIdentifier &identifier) const
 Gets the BIdentifier with the specified issuer for this BCoordSys.
BString GetName (void) const
 Gets the name of this BCoordSys.
double GetToMeterFactor (const double &pCentralLatitude) const
 Gets the factor used to convert between the measurement units used in this coordinate system and meters.
double GetToMeterFactor (const BRect &area) const
 Gets the factor used to convert between the measurement units used in this coordinate system and meters.
virtual ECoordSysType GetType (void) const
 Gets the type of this BCoordSys.
BUnitPtr GetUnits (void) const
 Gets the BUnit that describes the unit of measurement used in this BCoordSys.
bool IsNearlyEqual (const BCoordSys &cs)
 Tests to see if the specified BCoordSys is equivalent to the this one.
virtual bool IsValid () const
 Indicates whether or not this BCoordSys contains a valid coordinate system definition.
bool operator!= (const BCoordSys &cs) const
 Inequality operator.
BCoordSysoperator= (const BCoordSys &cs)
 Assignment operator.
bool operator== (const BCoordSys &cs) const
 Equality operator.
BString ToEPSGCode () const
 Returns the EPSG code that identifies the coordinate system defined in this BCoordSys.
bool ToFile (const BString &csFile)
 Writes the coordinate system defined in this BCoordSys to a file (WKT, PRJ, MAP, TAB, etc).
BString ToWKT () const
 Creates a WKT definition for the coordinate system defined in this BCoordSys.
virtual ~BCoordSys ()
 Destructor.

Static Public Member Functions

static BCoordSysFromEPSGCode (const BString &epsgCode)
 Initializes a BCoordSys from an EPSG code.
static BCoordSysFromESRIString (const BString &esriString)
 Initializes a BCoordSys from an Esri-specific WKT string.
static BCoordSysFromFile (const BString &coordSysFile)
 Creates a BCoordSys from a file (WKT, PRJ, MAP, TAB, etc).
static BCoordSysFromWKT (const BString &wkt)
 Creates a BCoordSys from a Well-Known Text (WKT) string.

Protected Member Functions

void ClearGeoCalcInfo (void)
 Frees the internal GeoCalcCore objects.
bool IsInitialized (void) const
 Indicates if this BCoordSys has been fully initialized.

Protected Attributes

CCoordSysPtr m_pgcCoordSys
 The GeoCalcCore CCoordSys object that underlies this BCoordSys.

Friends

class BCoordSysRepository
class BCoordTransform

Constructor & Destructor Documentation

BCoordSys (  ) 

Default constructor.

The resulting BCoordSys will not be a valid coordinate system.

BCoordSys ( const BCoordSys cs  ) 

Copy constructor.

Parameters:
cs The BCoordSys object to copy.

BCoordSys ( const GeoCalc::CS::CCoordSys *  pgcCS  ) 

Constructs a BCoordSys from a GeoCalcCore coordinate system object.

Parameters:
pgcCS The GeoCalcCore CCoordSys object. The BCoordSys object will clone this CCoordSys and will be responsible for deleting the cloned copy.

virtual ~BCoordSys (  )  [virtual]

Destructor.


Member Function Documentation

void ClearGeoCalcInfo ( void   )  [protected]

Frees the internal GeoCalcCore objects.

bool ComputeRadiusAtLatitude ( const double &  latitude,
double &  radiusInMeters 
) const

Sets the BUnit that describes the unit of measurement used in this BCoordSys.

Parameters:
pUnits The BUnit that shall be used with this BCoordSys. Computes the radius in meters of the ellipsoid used by this coordinate system at the specified latitude.
latitude The latitude at which the radius shall be computed, in degrees.
radiusInMeters The calculated radius value.
Returns:
True if this method is successful and false otherwise.

bool ConvertFromGeodetic ( double &  x,
double &  y 
) const

Converts a geodetic coordinate in the geodetic base of this coordinate system to this coordinate system.

Parameters:
x The input x-coordinate (longitude). If this method succeeds, then this parameter will hold the output x-coordinate.
y The input y-coordinate (latitude). If this method succeeds, then this parameter will hold the output y-coordinate.
Returns:
True if this method is successful and false otherwise.
Exceptions:
BGeoCalcException This exception will be thrown if this BCoordSys has not be fully initialized.

BPoint ConvertFromGeodetic ( const BPoint inPt  )  const

Converts a geodetic coordinate in the geodetic base of this coordinate system to this coordinate system.

Parameters:
inPt A point in the geodetic base of this coordinate system.
Returns:
A point in this coordinate system.
Exceptions:
BGeoCalcException This exception will be thrown if this BCoordSys has not be fully initialized.

bool ConvertToGeodetic ( double &  x,
double &  y 
) const

Converts a point currently in this coordinate system to the geodetic base of this coordinate system.

Parameters:
x The input x-coordinate. If this method succeeds, then this parameter will hold the output x-coordinate (longitude).
y The input y-coordinate. If this method succeeds, then this parameter will hold the output y-coordinate (latitude).
Returns:
True if this method is successful and false otherwise.
Exceptions:
BGeoCalcException This exception will be thrown if this BCoordSys has not be fully initialized.

BPoint ConvertToGeodetic ( const BPoint inPt  )  const

Converts a point currently in this coordinate system to the geodetic base of this coordinate system.

Parameters:
inPt A point in this coordinate system.
Returns:
A point in the geodetic base of this coordinate system.
Exceptions:
BGeoCalcException This exception will be thrown if this BCoordSys has not be fully initialized.

static BCoordSys* FromEPSGCode ( const BString epsgCode  )  [static]

Initializes a BCoordSys from an EPSG code.

Parameters:
epsgCode An EPSG code that identifies a coordinate system.
Returns:
A BCoordSys that represents the coordinate system identified by the EPSG code.
Exceptions:
BCoordSysRepositoryException This exception will be thrown if the BCoordSysRepository has not been initialized.
BGeoCalcException This exception will be thrown if GeoCalc encounters an error when creating the coordinate system.

static BCoordSys* FromESRIString ( const BString esriString  )  [static]

Initializes a BCoordSys from an Esri-specific WKT string.

Parameters:
esriString An Esri-specific WKT string.
Returns:
A BCoordSys that defines the coordinate system described in the Esri- specific WKT string.
Exceptions:
BCoordSysRepositoryException This exception will be thrown if the BCoordSysRepository has not been initialized.
BGeoCalcException This exception will be thrown if GeoCalc encounters an error when parsing the WKT string.

static BCoordSys* FromFile ( const BString coordSysFile  )  [static]

Creates a BCoordSys from a file (WKT, PRJ, MAP, TAB, etc).

Parameters:
coordSysFile The path and file name containing the coordinate system definition.
Returns:
A BCoordSys object that represents the coordinate system defined in the file. It is the responsibility of the caller to delete this object.
Exceptions:
BCoordSysRepositoryException This exception will be thrown if the BCoordSysRepository has not been initialized.
BGeoCalcException This exception will be thrown if GeoCalc encounters an error when parsing the input file.

static BCoordSys* FromWKT ( const BString wkt  )  [static]

Creates a BCoordSys from a Well-Known Text (WKT) string.

Parameters:
wkt A WKT string that defines a coordinate system.
Returns:
A BCoordSys object that represents the coordinate system defined in the WKT string. It is the responsibility of the caller to delete this object.
Exceptions:
BCoordSysRepositoryException This exception will be thrown if the BCoordSysRepository has not been initialized.
BGeoCalcException This exception will be thrown if GeoCalc encounters an error when parsing the WKT string.

const double& GetCentralMeridian (  )  const [inline]

Gets the central meridian of this coordinate system.

Returns:
double The central meridian, in degrees. If this is a geodetic coordinate system, then this value will be 0.

BClipPtr GetClip (  )  const

Gets a BClip that gives the boundary for the extents of the world in this coordinate system.

Returns:
BClipPtr The clipping polygon that expresses the extents of the world.

BCoordSys* GetCoordSys ( const BIdentifier identifier  ) 

Gets a coordinate system from the data source based on a BIdentifier.

Parameters:
identifier A BIdentifier that identifies a BCoordSys in the data source.
Returns:
A BCoordSys object with the specified BIdentifier. It is the responsibility of the caller to delete this object. The return value will be NULL if there does not exist a coordinate system with the specified identifier.
Exceptions:
BCoordSysRepositoryException This exception will be thrown if the BCoordSysRepository has not been initialized.

BString GetDescription ( void   )  const

Gets a description of this BCoordsys.

Returns:
A description of this coordinate system.

int GetDimensions (  )  const

Returns the number of dimensions in this coordinate system.

Returns:
The number of dimensions in this coordinate system (either 2 or 3).

const GeoCalc::CS::CCoordSys* GetGCCoordSys (  )  const

Returns the GeoCalcCore CCoordSys object that underlies this BCoordSys.

Returns:
The GeoCalcCore CCoordSys object.

GeoCalc::CS::CCoordSys* GetGCCoordSys (  ) 

Returns the GeoCalcCore CCoordSys object that underlies this BCoordSys.

Returns:
The GeoCalcCore CCoordSys object.

virtual bool GetIdentifier ( const BString issuer,
BIdentifier identifier 
) const [virtual]

Gets the BIdentifier with the specified issuer for this BCoordSys.

Parameters:
issuer The issuer of the desired BIdentifier.
identifier The identifier for this BUnit with the specified issuer.
Returns:
bool True if there exists a BIdentifier with the specified issuer and false otherwise.

BString GetName ( void   )  const

Gets the name of this BCoordSys.

Returns:
The name of this coordinate system.

double GetToMeterFactor ( const double &  pCentralLatitude  )  const

Gets the factor used to convert between the measurement units used in this coordinate system and meters.

Parameters:
pCentralLatitude The central latitude in degrees (only needed for geodetic coordinate systems).
Returns:
The to-meter factor.

double GetToMeterFactor ( const BRect area  )  const

Gets the factor used to convert between the measurement units used in this coordinate system and meters.

Parameters:
area The area in which the factor is needed (only needed for geodetic coordinate systems).
Returns:
The to-meter factor.

virtual ECoordSysType GetType ( void   )  const [virtual]

Gets the type of this BCoordSys.

Returns:
The type of this coordinate system.

BUnitPtr GetUnits ( void   )  const

Gets the BUnit that describes the unit of measurement used in this BCoordSys.

Returns:
The unit of measurement used in this BCoordSys.

bool IsInitialized ( void   )  const [protected]

Indicates if this BCoordSys has been fully initialized.

Returns:
True if this BCoordSys has been initialized and false otherwise.

bool IsNearlyEqual ( const BCoordSys cs  ) 

Tests to see if the specified BCoordSys is equivalent to the this one.

Parameters:
cs The BCoordSys to compare to this one.
Returns:
True if the two systems are equivalent and false otherwise.

virtual bool IsValid (  )  const [virtual]

Indicates whether or not this BCoordSys contains a valid coordinate system definition.

Returns:
True if this BCoordSys is valid and false otherwise.

bool operator!= ( const BCoordSys cs  )  const [inline]

Inequality operator.

Parameters:
cs The BCoordSys to compare to this one.
Returns:
True if the specified BCoordSys does not have the same value as this one and false otherwise.

BCoordSys& operator= ( const BCoordSys cs  ) 

Assignment operator.

Parameters:
cs The BCoordSys whose value will be copied into this one.
Returns:
A reference to this BCoordSys.

bool operator== ( const BCoordSys cs  )  const

Equality operator.

Parameters:
cs The BCoordSys to compare to this one.
Returns:
True if the specified BCoordSys has the same value as this one and false otherwise.

BString ToEPSGCode (  )  const

Returns the EPSG code that identifies the coordinate system defined in this BCoordSys.

Returns:
The EPSG code that identifies this coordinate system.
Exceptions:
BGeoCalcException This exception will be thrown if GeoCalc encounters an error while determining the EPSG code for the system.

bool ToFile ( const BString csFile  ) 

Writes the coordinate system defined in this BCoordSys to a file (WKT, PRJ, MAP, TAB, etc).

Parameters:
csFile The file to which the coordinate system will be written.
Returns:
True if the coordinate system was written successfully and false otherwise.
Exceptions:
BCoordSysRepositoryException This exception will be thrown if the BCoordSysRepository has not been initialized.
BGeoCalcException This exception will be thrown if GeoCalc encounters an error when writing the coordinate system to the file.

BString ToWKT (  )  const

Creates a WKT definition for the coordinate system defined in this BCoordSys.

Returns:
A WKT representation for this coordinate system.
Exceptions:
BCoordSysRepositoryException This exception will be thrown if the BCoordSysRepository has not been initialized.
BGeoCalcException This exception will be thrown if GeoCalc encounters an error when creating the WKT string.


Friends And Related Function Documentation

friend class BCoordSysRepository [friend]

friend class BCoordTransform [friend]


Member Data Documentation

CCoordSysPtr m_pgcCoordSys [protected]

The GeoCalcCore CCoordSys object that underlies this BCoordSys.


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

GeoTranslate 5.0 From Blue Marble Geographics