Public Types | Public Member Functions | Static Public Member Functions | List of all members
BaseGCS Class Referenceabstract

Geographic Coordinate System class. More...

#include <BaseGeoCoord.h>

Inheritance diagram for BaseGCS:
RefCountedBase RefCounted< IRefCounted > IRefCounted DgnGCS

Public Types

enum  WktFlavor {
  wktFlavorOGC = 1, wktFlavorGeoTiff = 2, wktFlavorESRI = 3, wktFlavorOracle = 4,
  wktFlavorGeoTools = 5, wktFlavorEPSG = 6, wktFlavorOracle9 = 7, wktFlavorAutodesk = 8,
  wktFlavorUnknown = 9, wktFlavorAppAlt = 10, wktFlavorLclAlt = 11
}
 
enum  RangeTestResult { RangeTestOk = 0, RangeTestOutsideRange = 1, RangeTestOutsideMathDomain = 2 }
 
enum  ProjectionCodeValue {
  pcvInvalid = 0, pcvUnity = 1, pcvTransverseMercator = 3, pcvAlbersEqualArea = 4,
  pcvHotineObliqueMercator = 5, pcvMercator = 6, pcvLambertEquidistantAzimuthal = 7, pcvLambertTangential = 8,
  pcvAmericanPolyconic = 9, pcvModifiedPolyconic = 10, pcvLambertEqualAreaAzimuthal = 11, pcvEquidistantConic = 12,
  pcvMillerCylindrical = 13, pcvModifiedStereographic = 15, pcvNewZealandNationalGrid = 16, pcvSinusoidal = 17,
  pcvOrthographic = 18, pcvGnomonic = 19, pcvEquidistantCylindrical = 20, pcvVanderGrinten = 21,
  pcvCassini = 22, pcvRobinsonCylindrical = 23, pcvBonne = 24, pcvEckertIV = 25,
  pcvEckertVI = 26, pcvMollweide = 27, pcvGoodeHomolosine = 28, pcvEqualAreaAuthalicNormal = 29,
  pcvEqualAreaAuthalicTransverse = 30, pcvBipolarObliqueConformalConic = 31, pcvObliqueCylindricalSwiss = 32, pcvPolarStereographic = 33,
  pcvObliqueStereographic = 34, pcvSnyderObliqueStereographic = 35, pcvLambertConformalConicOneParallel = 36, pcvLambertConformalConicTwoParallel = 37,
  pcvLambertConformalConicBelgian = 38, pcvLambertConformalConicWisconsin = 39, pcvTransverseMercatorWisconsin = 40, pcvLambertConformalConicMinnesota = 41,
  pcvTransverseMercatorMinnesota = 42, pcvSouthOrientedTransverseMercator = 43, pcvUniversalTransverseMercator = 44, pcvSnyderTransverseMercator = 45,
  pcvGaussKrugerTranverseMercator = 46, pcvCzechKrovak = 47, pcvCzechKrovakObsolete = 48, pcvMercatorScaleReduction = 49,
  pcvObliqueConformalConic = 50, pcvCzechKrovak95 = 51, pcvCzechKrovak95Obsolete = 52, pcvPolarStereographicStandardLatitude = 53,
  pcvTransverseMercatorAffinePostProcess = 54, pcvNonEarth = 55, pcvObliqueCylindricalHungary = 56, pcvTransverseMercatorDenmarkSys34 = 57,
  pcvTransverseMercatorOstn97 = 58, pcvAzimuthalEquidistantElevatedEllipsoid = 59, pcvTransverseMercatorOstn02 = 60, pcvTransverseMercatorDenmarkSys3499 = 61,
  pcvTransverseMercatorKruger = 62, pcvWinkelTripel = 63, pcvNonEarthScaleRotation = 64, pcvLambertConformalConicAffinePostProcess = 65,
  pcvTransverseMercatorDenmarkSys3401 = 66, pcvEquidistantCylindricalEllipsoid = 67, pcvPlateCarree = 68, pcvPopularVisualizationPseudoMercator = 69,
  pcvLambertMichigan = 70, pcvHotineObliqueMercator1UV = (pcvHotineObliqueMercator * 256) + 1, pcvHotineObliqueMercator1XY = (pcvHotineObliqueMercator * 256) + 2, pcvHotineObliqueMercator2UV = (pcvHotineObliqueMercator * 256) + 3,
  pcvHotineObliqueMercator2XY = (pcvHotineObliqueMercator * 256) + 4, pcvRectifiedSkewOrthomorphic = (pcvHotineObliqueMercator * 256) + 5, pcvRectifiedSkewOrthomorphicCentered = (pcvHotineObliqueMercator * 256) + 6, pcvRectifiedSkewOrthomorphicOrigin = (pcvHotineObliqueMercator * 256) + 7,
  pcvTotalUniversalTransverseMercator = 490, pcvTotalTransverseMercatorBF = 491, pcvObliqueMercatorMinnesota = 492
}
 

Public Member Functions

StatusInt InitAzimuthalEqualArea (WStringP errorMsg, WCharCP datumName, WCharCP unitName, double originLongitude, double originLatitude, double azimuthAngle, double scale, double falseEasting, double falseNorthing, int quadrant)
 Used in conjunction with the no-argument contructor to set the BaseGCS to an Azimuthal Equal Area projection. More...
 
StatusInt InitLatLong (WStringP errorMsg, WCharCP datumName, WCharCP ellipsoidName, WCharCP unitName, double originLongitude, double originLatitude)
 Used in conjunction with the no-argument contructor to set the BaseGCS to give cartesian angular values. More...
 
StatusInt InitFromWellKnownText (StatusInt *warning, WStringP warningErrorMsg, WktFlavor wktFlavor, WCharCP wellKnownText)
 Used in conjunction with the CreateGCS factory method to set the BaseGCS from a "well known text" string. More...
 
StatusInt InitFromEPSGCode (StatusInt *warning, WStringP warningErrorMsg, int epsgCode)
 Used in conjunction with the CreateGCS factory method to set the BaseGCS from an EPSG coordinate system code. More...
 
StatusInt GetWellKnownText (WStringR wellKnownText, WktFlavor wktFlavor) const
 Gets the Well Known Text string from a coordinate system definition. More...
 
StatusInt GetCompoundCSWellKnownText (WStringR wellKnownText, WktFlavor wktFlavor) const
 Gets the COMPD_CS Well Known Text string from a coordinate system definition. More...
 
StatusInt InitFromGeoTiffKeys (StatusInt *warning, WStringP warningErrorMsg,::IGeoTiffKeysList *geoTiffKeys)
 Used in conjunction with the CreateGCS factory method to set the BaseGCS from a set of GeoTiff Keys. More...
 
StatusInt SetGeoTiffKeys (::IGeoTiffKeysList *geoTiffKeys) const
 Saves the coordinate system to GeoTiffKeys, if possible. More...
 
bool CanSaveToGeoTiffKeys () const
 Reveals whether the coordinate system can be saved to GeoTiffKeys. More...
 
bool IsValid () const
 Returns whether the Coordinate System is valid or not. More...
 
int GetError () const
 Gets the error code associated with constructor failure if IsValid is false. More...
 
WCharCP GetErrorMessage (WStringR errorMsg) const
 Gets the error message associated with constructor failure if IsValid is false. More...
 
bool Validate (T_WStringVector &errorList) const
 Tests the coordinate system definition for validity. More...
 
bool IsStandard () const
 Returns whether the Coordinate System is a standard coordinate system or not. More...
 
WCharCP GetName () const
 Gets the name of the Coordinate System. More...
 
StatusInt SetName (WCharCP name)
 Sets the name of the Coordinate System. More...
 
WCharCP GetDescription () const
 Gets the description of the Coordinate System. More...
 
StatusInt SetDescription (WCharCP description)
 Sets the description of the Coordinate System. More...
 
WCharCP GetProjection () const
 Gets the name of the projection used by the Coordinate System. More...
 
ProjectionCodeValue GetProjectionCode () const
 Gets CS_Map projection code of the Coordinate System. More...
 
StatusInt SetProjectionCode (ProjectionCodeValue projectionCode)
 Sets CS_Map projection code of the Coordinate System. More...
 
WCharCP GetSource (WStringR source) const
 Gets the source of the Coordinate System. More...
 
StatusInt SetSource (WCharCP source)
 Sets the source of the Coordinate System. More...
 
WCharCP GetUnits (WStringR units) const
 Gets the name of the Coordinate System units. More...
 
int GetUnitCode () const
 Gets the internal index for the Coordinate System units. More...
 
int GetEPSGUnitCode () const
 Finds the EPSG code for the unit used by this coordinate system. More...
 
StatusInt SetUnitCode (int code)
 Sets the Units to those indicated by the unit code. More...
 
WCharCP GetDatumName () const
 Gets the name of the Coordinate System Datum. More...
 
int GetDatumCode () const
 Gets the internal index of the Coordinate System Datum. More...
 
StatusInt SetDatumCode (int datumCode)
 Sets the internal index of the Datum for the Coordinate System Datum. More...
 
WCharCP GetDatumDescription () const
 Gets the description of the Coordinate System Datum. More...
 
WCharCP GetDatumSource (WStringR datumSource) const
 Gets the Coordinate System Datum source citation. More...
 
WGS84ConvertCode GetDatumConvertMethod () const
 Gets the method used to convert longitude/latitude from the Datum of this GCS to the WGS84 datum. More...
 
void GetDatumDelta (DPoint3dR delta) const
 Gets the vector from the geocenter of the WGS84 Datum to the geocenter of the Datum of this GCS. More...
 
void GetDatumRotation (DPoint3dR rotation) const
 Gets the angles from the WGS84 x, y, and z axes to those of the Datum of this GCS. More...
 
double GetDatumScale () const
 Gets the datum transformation scaling in parts per million of the Datum of this GCS, if known. More...
 
bool DatumParametersValid (bool &deltaValid, bool &rotationValid, bool &scaleValid) const
 Returns whether the delta, rotation, and scale parameters are valid for the Datum of this GCS. More...
 
WCharCP GetVerticalDatumName () const
 Gets the name of the Coordinate System Vertical Datum. More...
 
VertDatumCode GetVerticalDatumCode () const
 Gets the Vertical Datum Code. More...
 
StatusInt SetVerticalDatumCode (VertDatumCode)
 Sets the Vertical Datum Code. More...
 
WCharCP GetEllipsoidName () const
 Gets the name of the Coordinate System Ellipsoid. More...
 
int GetEllipsoidCode () const
 Gets the internal index of the Coordinate System Ellipsoid. More...
 
StatusInt SetEllipsoidCode (int ellipsoidCode)
 Sets the internal index of the Coordinate System Ellipsoid. More...
 
WCharCP GetEllipsoidDescription () const
 Gets the description of the Coordinate System Ellipsoid. More...
 
WCharCP GetEllipsoidSource (WStringR ellipsoidSource) const
 Gets the Coordinate System Ellipsoid source citation. More...
 
double GetOriginLatitude () const
 Gets the origin latitude of the Coordinate System. More...
 
StatusInt SetOriginLatitude (double value)
 Sets the origin latitude of the Coordinate System. More...
 
double GetOriginLongitude () const
 Gets the origin longitude of the Coordinate System. More...
 
StatusInt SetOriginLongitude (double value)
 Sets the origin longitude of the Coordinate System. More...
 
double GetFalseEasting () const
 Gets the false easting of the Coordinate System. More...
 
StatusInt SetFalseEasting (double value)
 Sets the false easting of the Coordinate System. More...
 
double GetFalseNorthing () const
 Gets the false northing of the Coordinate System. More...
 
StatusInt SetFalseNorthing (double value)
 Sets the false northing of the Coordinate System. More...
 
double GetScaleReduction () const
 Gets the scale reduction of the Coordinate System. More...
 
StatusInt SetScaleReduction (double value)
 Sets the Scale Reduction of the Coordinate System. More...
 
double GetEllipsoidPolarRadius () const
 Gets the polar radius of the Coordinate System. More...
 
double GetEllipsoidEquatorialRadius () const
 Gets the equatorial radius of the Ellipsoid. More...
 
double GetEllipsoidEccentricity () const
 Gets the eccentricity value for the Ellipsoid. More...
 
double GetMinimumLongitude () const
 Gets the minimum longitude for the Geographic Coordinate System. More...
 
StatusInt SetMinimumLongitude (double value)
 Sets the minimum longitude for the Geographic Coordinate System. More...
 
double GetMaximumLongitude () const
 Gets the maximum longitude for the Geographic Coordinate System. More...
 
StatusInt SetMaximumLongitude (double value)
 Sets the maximum longitude for the Geographic Coordinate System. More...
 
double GetMinimumLatitude () const
 Gets the minimum latitude for the Geographic Coordinate System. More...
 
StatusInt SetMinimumLatitude (double value)
 Sets the minimum latitude for the Geographic Coordinate System. More...
 
double GetMaximumLatitude () const
 Gets the maximum latitude for the Geographic Coordinate System. More...
 
StatusInt SetMaximumLatitude (double value)
 Sets the maximum latitude for the Geographic Coordinate System. More...
 
double GetMinimumUsefulLongitude () const
 Gets the minimum useful longitude for the Geographic Coordinate System. More...
 
double GetMaximumUsefulLongitude () const
 Gets the maximum useful longitude for the Geographic Coordinate System. More...
 
double GetMinimumUsefulLatitude () const
 Gets the minimum useful latitude for the Geographic Coordinate System. More...
 
double GetMaximumUsefulLatitude () const
 Gets the maximum useful latitude for the Geographic coordinate system. More...
 
double GetStandardParallel1 () const
 Gets the first standard parallel for Projections that have one. More...
 
StatusInt SetStandardParallel1 (double value)
 Sets the first standard parallel for Projections that have one. More...
 
double GetStandardParallel2 () const
 Gets the first standard parallel for Projections that have one. More...
 
StatusInt SetStandardParallel2 (double value)
 Sets the second standard parallel for Projections that have one. More...
 
double GetAzimuth () const
 Gets the azimuth angle for Projections that have one. More...
 
StatusInt SetAzimuth (double value)
 Sets the azimuth angle for Projections that have one. More...
 
double GetCentralMeridian () const
 Gets the central meridian (in degrees) for Projections that have one. More...
 
StatusInt SetCentralMeridian (double value)
 Sets the central meridian (in degrees) for Projections that have one. More...
 
double GetEasternMeridian () const
 Gets the eastern meridian (in degrees) for Projections that have one. More...
 
StatusInt SetEasternMeridian (double value)
 Sets the central meridian (in degrees) for Projections that have one. More...
 
double GetCentralPointLongitude () const
 Gets the central point longitude (in degrees) for Projections that have one. More...
 
StatusInt SetCentralPointLongitude (double value)
 Sets the central point longitude (in degrees) for Projections that have one. More...
 
double GetCentralPointLatitude () const
 Gets the central point latitude (in degrees) for Projections that have one. More...
 
StatusInt SetCentralPointLatitude (double value)
 Sets the central point latitude (in degrees) for Projections that have one. More...
 
double GetPoint1Longitude () const
 Gets the longitude of the first point of the central geodesic (in degrees) for Projections that have one. More...
 
StatusInt SetPoint1Longitude (double value)
 Sets the longitude of the first point of the central geodesic (in degrees) for Projections that have one. More...
 
double GetPoint1Latitude () const
 Gets the latitude of the first point of the central geodesic (in degrees) for Projections that have one. More...
 
StatusInt SetPoint1Latitude (double value)
 Sets the latitude of the first point of the central geodesic (in degrees) for Projections that have one. More...
 
double GetPoint2Longitude () const
 Gets the longitude of the second point of the central geodesic (in degrees) for Projections that have one. More...
 
StatusInt SetPoint2Longitude (double value)
 Sets the longitude of the second point of the central geodesic (in degrees) for Projections that have one. More...
 
double GetPoint2Latitude () const
 Gets the latitude of the second point of the central geodesic (in degrees) for Projections that have one. More...
 
StatusInt SetPoint2Latitude (double value)
 Sets the latitude of the second point of the central geodesic (in degrees) for Projections that have one. More...
 
double GetGeoidSeparation () const
 Gets the geoid separation, in CS units, for Projections that use that parameter. More...
 
StatusInt SetGeoidSeparation (double value)
 Sets the geoid separation, in CS units, for Projections that have one. More...
 
double GetElevationAboveGeoid () const
 Gets the elevation above the geoid, in CS units, for Projections that use that parameter. More...
 
StatusInt SetElevationAboveGeoid (double value)
 Sets the elevation above the geoid, in CS units, for Projections that have one. More...
 
double GetEllipsoidScaleFactor () const
 Gets the ellipsoid scale factor, used by Lambert Conformal Conic Michigan variation. More...
 
StatusInt SetEllipsoidScaleFactor (double value)
 Sets the ellisoid scale factor for a Lambert Conformal Conic Michigan variation. More...
 
int GetUTMZone () const
 Gets the UTM Zone number (1-60) for the Univeral Transverse Mercator projection. More...
 
StatusInt SetUTMZone (int value)
 Sets the UTM Zone number (1-60) for the Universal Transverse Mercator projections. More...
 
int GetHemisphere () const
 Gets the Hemisphere (1 for north or -1 for south) for the Univeral Transverse Mercator projection. More...
 
StatusInt SetHemisphere (int value)
 Sets the Hemisphere (1 for north or -1 for south) for the Univeral Transverse Mercator projection. More...
 
int GetQuadrant () const
 Gets the Quadrant for Projections that use that parameter. More...
 
StatusInt SetQuadrant (short value)
 Sets the Quadrant for Projections that use that parameter. More...
 
int GetDanishSys34Region () const
 Gets the Danish System 34 Region for Danish Sys 34 Projections. More...
 
StatusInt SetDanishSys34Region (int value)
 Sets the Danish System 34 Region for Danish Sys 34 Projections. More...
 
double GetAffineA0 () const
 Gets the A0 Affine post-processing parameter for Projections that have one. More...
 
StatusInt SetAffineA0 (double value)
 Sets the A0 Affine post-processing parameter for Projections that have one. More...
 
double GetAffineA1 () const
 Gets the A1 Affine post-processing parameter for Projections that have one. More...
 
StatusInt SetAffineA1 (double value)
 Sets the A1 Affine post-processing parameter for Projections that have one. More...
 
double GetAffineA2 () const
 Gets the A2 Affine post-processing parameter for Projections that have one. More...
 
StatusInt SetAffineA2 (double value)
 Sets the A2 Affine post-processing parameter for Projections that have one. More...
 
double GetAffineB0 () const
 Gets the B0 Affine post-processing parameter for Projections that have one. More...
 
StatusInt SetAffineB0 (double value)
 Sets the B0 Affine post-processing parameter for Projections that have one. More...
 
double GetAffineB1 () const
 Gets the B1 Affine post-processing parameter for Projections that have one. More...
 
StatusInt SetAffineB1 (double value)
 Sets the B1 Affine post-processing parameter for Projections that have one. More...
 
double GetAffineB2 () const
 Gets the B2 Affine post-processing parameter for Projections that have one. More...
 
StatusInt SetAffineB2 (double value)
 Sets the B2 Affine post-processing parameter for Projections that have one. More...
 
void GetAffineParameters (double *A0, double *A1, double *A2, double *B0, double *B1, double *B2) const
 Gets the affine parameters for the affine post-processing portion of Transverse Mercator with post affine or Lambert Conformal Conic with post affine projections. More...
 
StatusInt SetAffineParameters (double A0, double A1, double A2, double B0, double B1, double B2)
 Sets the affine parameters for the affine post-processing portion of Transverse Mercator with post affine or Lambert Conformal Conic with post affine projections. More...
 
StatusInt DefinitionComplete ()
 Signals that the caller has finished setting the coordinate system parameters, and that the coordinate system internal definition should be initialized with the current parameter set. More...
 
double GetScaleAlongMeridian (GeoPointCR point) const
 Gets the grid scale along a meridian of the coordinate system at the specified longitude/latitude. More...
 
double GetScaleAlongParallel (GeoPointCR point) const
 Gets the grid scale along a parallel of the coordinate system at the specified longitude/latitude. More...
 
double GetGridScale (GeoPointCR point) const
 Gets the grid scale of the coordinate system at the specified longitude/latitude. More...
 
double GetConvergenceAngle (GeoPointCR point) const
 Gets the convergence angle, in degrees, of the coordinate system at the specified longitude/latitude. More...
 
StatusInt GetDistance (double *distance, double *azimuth, GeoPointCR startPoint, GeoPointCR endPoint) const
 Computes distance (in the units of this GCS) and starting azimuthal angle (in degrees) from one geographic point to another. More...
 
StatusInt GetCenterPoint (GeoPointR centerPoint) const
 Gets the latitude and longitude of a "center" point in the coordinate system. More...
 
bool IsEquivalent (BaseGCSCR compareTo) const
 Compares this coordinate system with the argument and returns true if they have equivalent projection, parameters, datum, ellipsoid, and modifiers. More...
 
bool Compare (BaseGCSCR compareTo, bool &datumDifferent, bool &csDifferent, bool &verticalDatumDifferent, bool &localTransformDifferent, bool stopFirstDifference) const
 Compares this coordinate system with the argument and returns true if they have equivalent projection, parameters, datum, and ellipsoid. More...
 
bool HasEquivalentDatum (BaseGCSCR compareTo) const
 Compares the Datum of this coordinate system with the argument and returns true if they have equivalent datum (including ellipsoid). More...
 
int GetEPSGCode (bool noSearch=false) const
 Finds the EPSG code for this coordinate system. More...
 
int GetEPSGDatumCode (bool noSearch=false) const
 Finds the EPSG code for the datum used by this coordinate system. More...
 
int GetEPSGEllipsoidCode (bool noSearch=false) const
 Finds the EPSG code for the ellipsoid used by this coordinate system. More...
 
ReprojectStatus CartesianFromLatLong (DPoint3dR outCartesian, GeoPointCR inLatLong) const
 Calculates the cartesian coordinates of the input Longitude/Latitude/Elevation point. More...
 
ReprojectStatus CartesianFromLatLong2D (DPoint2dR outCartesian, GeoPoint2dCR inLatLong) const
 Calculates the cartesian x and y of the input Longitude/Latitude point. More...
 
ReprojectStatus LatLongFromCartesian (GeoPointR outLatLong, DPoint3dCR inCartesian) const
 Calculates the longitude, latitude, and elevation from cartesian x,y, and z. More...
 
ReprojectStatus LatLongFromCartesian2D (GeoPoint2dR outLatLong, DPoint2dCR inCartesian) const
 Calculates the longitude and latitude from cartesian x and y. More...
 
double UnitsFromMeters () const
 Returns the scale factor needed to convert to the units of the coordinate system from meters by multiplication. More...
 
RangeTestResult CheckGeoPointRange (GeoPointCR points, int numPoints) const
 Determines whether the input GeoPoints are within the useful range of the coordinate system. More...
 
RangeTestResult CheckCartesianRange (DPoint3dCR points, int numPoints) const
 Determines whether the input GeoPoints are within the useful range of the coordinate system. More...
 
bool SetReprojectElevation (bool value)
 Sets whether reprojections from this coordinate system sadjust elevations. More...
 
bool GetReprojectElevation () const
 Gets whether reprojections from this coordinate system adjust elevations. More...
 
ReprojectStatus LatLongFromLatLong (GeoPointR outLatLong, GeoPointCR inLatLong, BaseGCSCR destGCS) const
 Calculates the longitude and latitude in the destination GCS, applying the appropriate datum shift. More...
 
ReprojectStatus LatLongFromLatLong2D (GeoPoint2dR outLatLong, GeoPoint2dCR inLatLong, BaseGCSCR destGCS) const
 Calculates the longitude and latitude in the destination GCS, applying the appropriate datum shift. More...
 
ReprojectStatus LatLongFromXYZ (GeoPointR outLatLong, DPoint3dCR inXYZ) const
 Calculates the longitude and latitude from ECEF coordinate. More...
 
ReprojectStatus XYZFromLatLong (DPoint3dR outXYZ, GeoPointCR inLatLong) const
 Calculates the XYZ (ECEF) coordinates from the longitude, latitude and elevation. More...
 
- Public Member Functions inherited from RefCounted< IRefCounted >
void * operator new (size_t size)
 
void operator delete (void *rawMemory, size_t size)
 
UInt32 AddRef () const
 
UInt32 Release () const
 
 RefCounted ()
 
 RefCounted (RefCounted const &rhs)
 
RefCountedoperator= (RefCounted const &rhs)
 
UInt32 GetRefCount () const
 

Static Public Member Functions

static BaseGCSPtr CreateGCS ()
 Returns an empty BaseGCSPtr. More...
 
static BaseGCSPtr CreateGCS (WCharCP coordinateSystemKeyName)
 Initializes a BaseGCS by looking for the specified key name in the Coordinate System Library. More...
 
static BaseGCSPtr CreateGCS (BaseGCSCR baseGcs)
 Returns a copy of the object. More...
 
static WCharCP GetErrorMessage (WStringR errorMsg, StatusInt errorCode)
 Gets the error message associated with the error code. More...
 
static T_WStringVectorGetLinearUnitNames ()
 Gets the available Linear Units. More...
 
static T_WStringVectorGetUnitNames ()
 Gets all available Units, linear and degree-based. More...
 
static T_WStringVectorGetDatumNames ()
 Gets the available Datum Names. More...
 
static T_WStringVectorGetEllipsoidNames ()
 Gets the available Ellipsoid Names. More...
 
static double RadiansFromDegrees (double inDegrees)
 Converts from Degrees to Radians. More...
 
static double DegreesFromRadians (double inRadians)
 Converts from Radians to Degrees. More...
 

Additional Inherited Members

- Protected Member Functions inherited from RefCounted< IRefCounted >
virtual ~RefCounted ()
 
- Protected Member Functions inherited from IRefCounted
virtual ~IRefCounted ()
 
void * operator new (size_t size)
 
void operator delete (void *rawMemory, size_t size)
 

Detailed Description

Geographic Coordinate System class.

The BaseGCS class allows the conversion of Coordinates in Geographic Latitude/Longitude/Elevation to and from a Cartesian coordinate system in x, y, and z. The units of the Cartesian coordinates are determined by the units of the projection. Those units are usually a linear measure, but can be Degrees if the coordinate system is a "Unity" coordinate system in CSMap terms.

This class is reference counted. Users should use the usual reference counting semantics - if a pointer is retained, call the AddRef() method. When the reference is no longer needed, call the Release() method. Application code should never call the "delete" operator on an instance of BaseGCS. The BaseGCSPtr type is a smart pointer that makes following those rules easy.

The BaseGCS class provides methods for converting from Longitude/Latitude/Elevation to x, y, and z in the units of the coordinate system. When an input point is in latitude/longitude/elevation, the longitude in decimal degrees is the x component of the DPoint3d, the latitude is the y component, and the elevation is the z component.

There is also a method for converting from Longitude/Latitude/Elevation in one BaseGCS to Long/Latitude/Elevation in a destination coordinate system. This does the datum conversion that is necessary when the two GCS's utilize different datum.

Member Enumeration Documentation

Enumerator
pcvInvalid 
pcvUnity 
pcvTransverseMercator 
pcvAlbersEqualArea 
pcvHotineObliqueMercator 
pcvMercator 
pcvLambertEquidistantAzimuthal 
pcvLambertTangential 
pcvAmericanPolyconic 
pcvModifiedPolyconic 
pcvLambertEqualAreaAzimuthal 
pcvEquidistantConic 
pcvMillerCylindrical 
pcvModifiedStereographic 
pcvNewZealandNationalGrid 
pcvSinusoidal 
pcvOrthographic 
pcvGnomonic 
pcvEquidistantCylindrical 
pcvVanderGrinten 
pcvCassini 
pcvRobinsonCylindrical 
pcvBonne 
pcvEckertIV 
pcvEckertVI 
pcvMollweide 
pcvGoodeHomolosine 
pcvEqualAreaAuthalicNormal 
pcvEqualAreaAuthalicTransverse 
pcvBipolarObliqueConformalConic 
pcvObliqueCylindricalSwiss 
pcvPolarStereographic 
pcvObliqueStereographic 
pcvSnyderObliqueStereographic 
pcvLambertConformalConicOneParallel 
pcvLambertConformalConicTwoParallel 
pcvLambertConformalConicBelgian 
pcvLambertConformalConicWisconsin 
pcvTransverseMercatorWisconsin 
pcvLambertConformalConicMinnesota 
pcvTransverseMercatorMinnesota 
pcvSouthOrientedTransverseMercator 
pcvUniversalTransverseMercator 
pcvSnyderTransverseMercator 
pcvGaussKrugerTranverseMercator 
pcvCzechKrovak 
pcvCzechKrovakObsolete 
pcvMercatorScaleReduction 
pcvObliqueConformalConic 
pcvCzechKrovak95 
pcvCzechKrovak95Obsolete 
pcvPolarStereographicStandardLatitude 
pcvTransverseMercatorAffinePostProcess 
pcvNonEarth 
pcvObliqueCylindricalHungary 
pcvTransverseMercatorDenmarkSys34 
pcvTransverseMercatorOstn97 
pcvAzimuthalEquidistantElevatedEllipsoid 
pcvTransverseMercatorOstn02 
pcvTransverseMercatorDenmarkSys3499 
pcvTransverseMercatorKruger 
pcvWinkelTripel 
pcvNonEarthScaleRotation 
pcvLambertConformalConicAffinePostProcess 
pcvTransverseMercatorDenmarkSys3401 
pcvEquidistantCylindricalEllipsoid 
pcvPlateCarree 
pcvPopularVisualizationPseudoMercator 
pcvLambertMichigan 
pcvHotineObliqueMercator1UV 
pcvHotineObliqueMercator1XY 
pcvHotineObliqueMercator2UV 
pcvHotineObliqueMercator2XY 
pcvRectifiedSkewOrthomorphic 
pcvRectifiedSkewOrthomorphicCentered 
pcvRectifiedSkewOrthomorphicOrigin 
pcvTotalUniversalTransverseMercator 
pcvTotalTransverseMercatorBF 
pcvObliqueMercatorMinnesota 
Enumerator
RangeTestOk 
RangeTestOutsideRange 
RangeTestOutsideMathDomain 
enum WktFlavor
Enumerator
wktFlavorOGC 
wktFlavorGeoTiff 
wktFlavorESRI 
wktFlavorOracle 
wktFlavorGeoTools 
wktFlavorEPSG 
wktFlavorOracle9 
wktFlavorAutodesk 
wktFlavorUnknown 
wktFlavorAppAlt 
wktFlavorLclAlt 

Member Function Documentation

bool CanSaveToGeoTiffKeys ( ) const

Reveals whether the coordinate system can be saved to GeoTiffKeys.

Returns
true if the coordinate system can be saved to GeoTiffKeys, false if not.
ReprojectStatus CartesianFromLatLong ( DPoint3dR  outCartesian,
GeoPointCR  inLatLong 
) const

Calculates the cartesian coordinates of the input Longitude/Latitude/Elevation point.

Parameters
outCartesianOUT The calculated cartesian coordinates.
inLatLongIN The longitude,latitude,elevation in the datum of this GCS.
ReprojectStatus CartesianFromLatLong2D ( DPoint2dR  outCartesian,
GeoPoint2dCR  inLatLong 
) const

Calculates the cartesian x and y of the input Longitude/Latitude point.

The input elevation is ignored.

Parameters
outCartesianOUT The calculated cartesian coordinates.
inLatLongIN The longitude,latitude,elevation in the datum of this GCS.
RangeTestResult CheckCartesianRange ( DPoint3dCR  points,
int  numPoints 
) const

Determines whether the input GeoPoints are within the useful range of the coordinate system.

Parameters
pointsIN The points to test.
numPointsIN Number of points to test.
Remarks
The input points must be in the cartesian units of the coordinate system.
RangeTestResult CheckGeoPointRange ( GeoPointCR  points,
int  numPoints 
) const

Determines whether the input GeoPoints are within the useful range of the coordinate system.

Parameters
pointsIN The points to test.
numPointsIN Number of points to test.
bool Compare ( BaseGCSCR  compareTo,
bool &  datumDifferent,
bool &  csDifferent,
bool &  verticalDatumDifferent,
bool &  localTransformDifferent,
bool  stopFirstDifference 
) const

Compares this coordinate system with the argument and returns true if they have equivalent projection, parameters, datum, and ellipsoid.

Parameters
[in]compareToThe BaseGCS to compare to.
[out]datumDifferenttrue if the datum is different.
[out]csDifferenttrue if the coordinate system projection is different.
[out]verticalDatumDifferenttrue if the vertical datum is different.
[out]localTransformDifferenttrue if the local transform is different.
[in]stopFirstDifferenceIf true, the comparison stops when the first difference is encountered. Only one of datumDifferent, csDifferent, and modifiersDifferent will be set.
Returns
True if the coordinate systems are identical, false otherwise.
static BaseGCSPtr CreateGCS ( )
static

Returns an empty BaseGCSPtr.

This factory method is designed to be used in conjunction with the initialization methods such as the InitAzimuthalEqualArea method.

static BaseGCSPtr CreateGCS ( WCharCP  coordinateSystemKeyName)
static

Initializes a BaseGCS by looking for the specified key name in the Coordinate System Library.

If the coordinate system specified is found, then the IsValid method returns true. Otherwise the GetError method returns the CS_MAP error code.

Parameters
coordinateSystemKeyNameIN The key name of the coordinate system.
static BaseGCSPtr CreateGCS ( BaseGCSCR  baseGcs)
static

Returns a copy of the object.

bool DatumParametersValid ( bool &  deltaValid,
bool &  rotationValid,
bool &  scaleValid 
) const

Returns whether the delta, rotation, and scale parameters are valid for the Datum of this GCS.

Parameters
deltaValidOUT Returns true if the datum is valid and its WGS84ConvertCode indicates that the delta parameters are used.
rotationValidOUT Returns true if the datum is valid and its WGS84ConvertCode indicates that the rotation parameters are used.
scaleValidOUT Returns true if the datum is valid and its WGS84ConvertCode indicates that the scale parameter is used.
Returns
true if any of the output valid flags are true.
StatusInt DefinitionComplete ( )

Signals that the caller has finished setting the coordinate system parameters, and that the coordinate system internal definition should be initialized with the current parameter set.

Returns
SUCCESS or a CS_MAP error code.
static double DegreesFromRadians ( double  inRadians)
static

Converts from Radians to Degrees.

Parameters
inRadiansIN Angular value in radians.
Returns
Angular value in degrees
double GetAffineA0 ( ) const

Gets the A0 Affine post-processing parameter for Projections that have one.

Returns
The A0 Affine post-processing parameter for Projections that have one.
double GetAffineA1 ( ) const

Gets the A1 Affine post-processing parameter for Projections that have one.

Returns
The A1 Affine post-processing parameter for Projections that have one.
double GetAffineA2 ( ) const

Gets the A2 Affine post-processing parameter for Projections that have one.

Returns
The A2 Affine post-processing parameter for Projections that have one.
double GetAffineB0 ( ) const

Gets the B0 Affine post-processing parameter for Projections that have one.

Returns
The B0 Affine post-processing parameter for Projections that have one.
double GetAffineB1 ( ) const

Gets the B1 Affine post-processing parameter for Projections that have one.

Returns
The B1 Affine post-processing parameter for Projections that have one.
double GetAffineB2 ( ) const

Gets the B2 Affine post-processing parameter for Projections that have one.

Returns
The B2 Affine post-processing parameter for Projections that have one.
void GetAffineParameters ( double *  A0,
double *  A1,
double *  A2,
double *  B0,
double *  B1,
double *  B2 
) const

Gets the affine parameters for the affine post-processing portion of Transverse Mercator with post affine or Lambert Conformal Conic with post affine projections.

Parameters
A0OUT The X translation of the affine transformation
A1OUT The A1 parameter of the rotation/scale/shearing portion of the affine.
A2OUT The A2 parameter of the rotation/scale/shearing portion of the affine.
B0OUT The Y translation of the affine transformation
B1OUT The B1 parameter of the rotation/scale/shearing portion of the affine.
B2OUT The B2 parameter of the rotation/scale/shearing portion of the affine.
double GetAzimuth ( ) const

Gets the azimuth angle for Projections that have one.

Returns
The azimuth angle for Projections that have one.
StatusInt GetCenterPoint ( GeoPointR  centerPoint) const

Gets the latitude and longitude of a "center" point in the coordinate system.

This might be the origin of longitude/origin of latitude, or perhaps the central meridian and latitude of latitude, depending on the projection in use.

Parameters
centerPointOUT The center point.
double GetCentralMeridian ( ) const

Gets the central meridian (in degrees) for Projections that have one.

Returns
The central meridian longitude for Projections that have one.
double GetCentralPointLatitude ( ) const

Gets the central point latitude (in degrees) for Projections that have one.

Returns
The central point latitude for Projections that have one.
double GetCentralPointLongitude ( ) const

Gets the central point longitude (in degrees) for Projections that have one.

Returns
The central point longitude for Projections that have one.
StatusInt GetCompoundCSWellKnownText ( WStringR  wellKnownText,
WktFlavor  wktFlavor 
) const

Gets the COMPD_CS Well Known Text string from a coordinate system definition.

This compound coordinate system is composed of a PROJCS or GEOCS section followed by a VERT_CS section that contains the definition of the vertical datum used.

Returns
SUCCESS or a CS_MAP error code.
Parameters
wellKnownTextOut The Well Known Text specifying the coordinate system.
wktFlavorIN The WKT Flavor desired. If not known, use wktFlavorUnknown
double GetConvergenceAngle ( GeoPointCR  point) const

Gets the convergence angle, in degrees, of the coordinate system at the specified longitude/latitude.

Parameters
pointIN The point at which the convergence angle is to be computed.
See also
GetScaleAlongMeridian, GetScaleAlongParallel
int GetDanishSys34Region ( ) const

Gets the Danish System 34 Region for Danish Sys 34 Projections.

Returns
The Region.
int GetDatumCode ( ) const

Gets the internal index of the Coordinate System Datum.

Returns
Index of the Coordinate System Datum.
WGS84ConvertCode GetDatumConvertMethod ( ) const

Gets the method used to convert longitude/latitude from the Datum of this GCS to the WGS84 datum.

Returns
The convert method.
Note
: If this GCS does not have a Datum, ConvertType_NONE is returned.
void GetDatumDelta ( DPoint3dR  delta) const

Gets the vector from the geocenter of the WGS84 Datum to the geocenter of the Datum of this GCS.

Parameters
deltaOUT The vector from the geocenter of the WGS84 Datum to the geocenter of this Datum.
WCharCP GetDatumDescription ( ) const

Gets the description of the Coordinate System Datum.

Returns
Description of the Coordinate System Datum.
WCharCP GetDatumName ( ) const

Gets the name of the Coordinate System Datum.

Returns
Name of the Coordinate System Datum.
static T_WStringVector* GetDatumNames ( )
static

Gets the available Datum Names.

Returns
vector of strings of datum names.
void GetDatumRotation ( DPoint3dR  rotation) const

Gets the angles from the WGS84 x, y, and z axes to those of the Datum of this GCS.

Parameters
rotationOUT The rotation angles.
double GetDatumScale ( ) const

Gets the datum transformation scaling in parts per million of the Datum of this GCS, if known.

Returns
The datum transformation scale in ppm.
WCharCP GetDatumSource ( WStringR  datumSource) const

Gets the Coordinate System Datum source citation.

Returns
Source citation of the Coordinate System Datum.
WCharCP GetDescription ( ) const

Gets the description of the Coordinate System.

Returns
The description of the Coordinate System.
StatusInt GetDistance ( double *  distance,
double *  azimuth,
GeoPointCR  startPoint,
GeoPointCR  endPoint 
) const

Computes distance (in the units of this GCS) and starting azimuthal angle (in degrees) from one geographic point to another.

Parameters
distanceOUT The distance, in units of this GCS, from startPoint to endPoint.
azimuthOUT The initial azimuth, in degrees clockwise from true north, needed to get from startPoint to endPoint.
startPointIN The starting point.
endPointIN The end point.
Remarks
If either distance or azimuth is not needed, pass NULL.
double GetEasternMeridian ( ) const

Gets the eastern meridian (in degrees) for Projections that have one.

Returns
The eastern meridian longitude for Projections that have one.
double GetElevationAboveGeoid ( ) const

Gets the elevation above the geoid, in CS units, for Projections that use that parameter.

Returns
The elevation above the geoid, in CS Units for Projections that use that parameter.
int GetEllipsoidCode ( ) const

Gets the internal index of the Coordinate System Ellipsoid.

Returns
Index of the Coordinate System Ellipsoid.
WCharCP GetEllipsoidDescription ( ) const

Gets the description of the Coordinate System Ellipsoid.

Returns
The description of the Coordinate System Ellipsoid.
double GetEllipsoidEccentricity ( ) const

Gets the eccentricity value for the Ellipsoid.

Returns
The eccentricity value for the Ellipsoid.
double GetEllipsoidEquatorialRadius ( ) const

Gets the equatorial radius of the Ellipsoid.

Returns
The equatorial radius of the Ellipsoid.
WCharCP GetEllipsoidName ( ) const

Gets the name of the Coordinate System Ellipsoid.

Returns
Name of the Coordinate System Ellipsoid.
static T_WStringVector* GetEllipsoidNames ( )
static

Gets the available Ellipsoid Names.

Returns
vector of strings of datum names.
double GetEllipsoidPolarRadius ( ) const

Gets the polar radius of the Coordinate System.

Returns
The polar radius of the Ellipsoid.
double GetEllipsoidScaleFactor ( ) const

Gets the ellipsoid scale factor, used by Lambert Conformal Conic Michigan variation.

Returns
The ellipsoid scale factor.
WCharCP GetEllipsoidSource ( WStringR  ellipsoidSource) const

Gets the Coordinate System Ellipsoid source citation.

Returns
Source citation of the Coordinate System Ellipsoid.
int GetEPSGCode ( bool  noSearch = false) const

Finds the EPSG code for this coordinate system.

Remarks
Sometimes a search through the coordinate system library to find a matching EPSG coordinate system is required. This can be time consuming. To prevent the search, pass true for the "noSearch" argument.
Returns
The EPSG code, or 0 if this coordinate system does not match any EPSG CS known to the system.
int GetEPSGDatumCode ( bool  noSearch = false) const

Finds the EPSG code for the datum used by this coordinate system.

Remarks
Sometimes a search through the datum library to find a matching EPSG datum is required. This can be time consuming. To prevent the search, pass true for the "noSearch" argument.
Returns
The EPSG code, or 0 if this coordinate system does not match any EPSG CS known to the system.
int GetEPSGEllipsoidCode ( bool  noSearch = false) const

Finds the EPSG code for the ellipsoid used by this coordinate system.

Remarks
Sometimes a search through the ellipsoid library to find a matching EPSG ellipsoid is required. Since there are a limited number of ellipsoids, this is not very time consuming. The "noSearch" argument is included for symmetry with GetEPSGCode and GetEPSGDatumCode.
Returns
The EPSG code, or 0 if this coordinate system does not match any EPSG CS known to the system.
int GetEPSGUnitCode ( ) const

Finds the EPSG code for the unit used by this coordinate system.

Returns
The EPSG code, or 0 if the unit cannot be found in the CS Map table or the there is no EPSG code corresponding to the unit used.
int GetError ( ) const

Gets the error code associated with constructor failure if IsValid is false.

Returns
The CSMap error code.
See also
GetErrorMessage
WCharCP GetErrorMessage ( WStringR  errorMsg) const

Gets the error message associated with constructor failure if IsValid is false.

Returns
The CSMap error message.
See also
GetError
static WCharCP GetErrorMessage ( WStringR  errorMsg,
StatusInt  errorCode 
)
static

Gets the error message associated with the error code.

double GetFalseEasting ( ) const

Gets the false easting of the Coordinate System.

Returns
The value added to all x cartesian coordinates.
double GetFalseNorthing ( ) const

Gets the false northing of the Coordinate System.

Returns
The value added to all y cartesian coordinates.
double GetGeoidSeparation ( ) const

Gets the geoid separation, in CS units, for Projections that use that parameter.

Returns
The geoid separation, in CS Units for Projections that use that parameter.
double GetGridScale ( GeoPointCR  point) const

Gets the grid scale of the coordinate system at the specified longitude/latitude.

Parameters
pointIN The point at which the grid scale is to be computed.
Returns
The grid scale at the position specified.
Remarks
Non-conformal projections have two different grid scale factors: the scale along a meridian and the scale along a parallel. In the case of azimuthal projections, the two scale factors are along a radial line from the origin and normal to such radial lines, respectively. In these cases, GetGridScale will return the more interesting of the two. For example, in the American Polyconic, the grid scale factor along all parallels is always 1.0; therefore GetGridScale returns the grid scale factor along a meridian for this projection.
See also
GetScaleAlongMeridian, GetScaleAlongParallel
int GetHemisphere ( ) const

Gets the Hemisphere (1 for north or -1 for south) for the Univeral Transverse Mercator projection.

Returns
The UTM Zone number for Projections that use that parameter.
static T_WStringVector* GetLinearUnitNames ( )
static

Gets the available Linear Units.

Returns
vector of strings of unit names.
double GetMaximumLatitude ( ) const

Gets the maximum latitude for the Geographic Coordinate System.

Returns
The maximum latitude for Geographic (Longitude/Latitude) coordinate systems.
double GetMaximumLongitude ( ) const

Gets the maximum longitude for the Geographic Coordinate System.

Returns
The maximum longitude for Geographic (Longitude/Latitude) coordinate systems.
double GetMaximumUsefulLatitude ( ) const

Gets the maximum useful latitude for the Geographic coordinate system.

Returns
The maximum useful latitude for Geographic (Longitude/Latitude) coordinate systems.
Remarks
If the value of MaximumLatitude is not specified in the coordinate system library, a maximum latitude is calculated.
double GetMaximumUsefulLongitude ( ) const

Gets the maximum useful longitude for the Geographic Coordinate System.

Returns
The maximum useful longitude for Geographic (Longitude/Latitude) coordinate systems.
Remarks
If the value of MaximumLongitude is not specified in the coordinate system library, a maximum longitude is calculated.
double GetMinimumLatitude ( ) const

Gets the minimum latitude for the Geographic Coordinate System.

Returns
The minimum latitude for Geographic (Longitude/Latitude) coordinate systems.
double GetMinimumLongitude ( ) const

Gets the minimum longitude for the Geographic Coordinate System.

Returns
The minimum longitude for Geographic (Longitude/Latitude) coordinate systems.
double GetMinimumUsefulLatitude ( ) const

Gets the minimum useful latitude for the Geographic Coordinate System.

Returns
The minimum useful latitude for Geographic (Longitude/Latitude) coordinate systems.
Remarks
If the value of MinimumLatitude is not specified in the coordinate system library, a minimum latitude is calculated.
double GetMinimumUsefulLongitude ( ) const

Gets the minimum useful longitude for the Geographic Coordinate System.

Returns
The minimum useful longitude for Geographic (Longitude/Latitude) coordinate systems.
Remarks
If the value of MinimumLongitude is not specified in the coordinate system library, a minimum longitude is calculated.
WCharCP GetName ( ) const

Gets the name of the Coordinate System.

Returns
The name of the Coordinate System.
double GetOriginLatitude ( ) const

Gets the origin latitude of the Coordinate System.

Returns
The origin latitude of the Coordinate System.
double GetOriginLongitude ( ) const

Gets the origin longitude of the Coordinate System.

Returns
The origin longitude of the Coordinate System.
double GetPoint1Latitude ( ) const

Gets the latitude of the first point of the central geodesic (in degrees) for Projections that have one.

Returns
The latitude of the first point of the central geodesic for Projections that have one.
double GetPoint1Longitude ( ) const

Gets the longitude of the first point of the central geodesic (in degrees) for Projections that have one.

Returns
The longitude of the first point of the central geodesic for Projections that have one.
double GetPoint2Latitude ( ) const

Gets the latitude of the second point of the central geodesic (in degrees) for Projections that have one.

Returns
The latitude of the second point of the central geodesic for Projections that have one.
double GetPoint2Longitude ( ) const

Gets the longitude of the second point of the central geodesic (in degrees) for Projections that have one.

Returns
The longitude of the second point of the central geodesic for Projections that have one.
WCharCP GetProjection ( ) const

Gets the name of the projection used by the Coordinate System.

Returns
The name of the projection used by the Coordinate System.
ProjectionCodeValue GetProjectionCode ( ) const

Gets CS_Map projection code of the Coordinate System.

Returns
The CS_Map projection code of the Coordinate System.
int GetQuadrant ( ) const

Gets the Quadrant for Projections that use that parameter.

Returns
The Quadrant for Projections that use that parameter.
bool GetReprojectElevation ( ) const

Gets whether reprojections from this coordinate system adjust elevations.

Returns
The ReprojectElevation setting.
Remarks
The ReprojectElevation setting affects coordinate reprojections performed by the LatLongFromLatLong method. If ReprojectElevation is false, the elevation value is unchanged.
The default value is false.
double GetScaleAlongMeridian ( GeoPointCR  point) const

Gets the grid scale along a meridian of the coordinate system at the specified longitude/latitude.

Parameters
pointIN The point at which the grid scale is to be computed.
Returns
The grid scale along the meridian at the position specified.
Remarks
This is sometimes called the 'h' scale in geo coordinate system literature.
The scale along a meridian is equal to the scale along a parallel for conformal projections.
See also
GetScaleAlongParallel, GetGridScale
double GetScaleAlongParallel ( GeoPointCR  point) const

Gets the grid scale along a parallel of the coordinate system at the specified longitude/latitude.

Parameters
pointIN The point at which the grid scale is to be computed.
Returns
The grid scale along the parallel at the position specified.
Remarks
This is sometimes called the 'k' scale in geo coordinate system literature.
The scale along a parallel is equal to the scale along a meridian for conformal projections.
See also
GetScaleAlongMeridian, GetGridScale
double GetScaleReduction ( ) const

Gets the scale reduction of the Coordinate System.

Returns
The scale reduction for the Coordinate System.
WCharCP GetSource ( WStringR  source) const

Gets the source of the Coordinate System.

Returns
The source of the Coordinate System.
double GetStandardParallel1 ( ) const

Gets the first standard parallel for Projections that have one.

Returns
The first standard parallel for Projections that have one.
double GetStandardParallel2 ( ) const

Gets the first standard parallel for Projections that have one.

Returns
The first standard parallel for Projections that have one.
int GetUnitCode ( ) const

Gets the internal index for the Coordinate System units.

Returns
index into internal table of unit names.
static T_WStringVector* GetUnitNames ( )
static

Gets all available Units, linear and degree-based.

Returns
vector of strings of unit names.
WCharCP GetUnits ( WStringR  units) const

Gets the name of the Coordinate System units.

Returns
Name of source of the Coordinate System units.
int GetUTMZone ( ) const

Gets the UTM Zone number (1-60) for the Univeral Transverse Mercator projection.

Returns
The UTM Zone number for Projections that use that parameter.
VertDatumCode GetVerticalDatumCode ( ) const

Gets the Vertical Datum Code.

In only a few instances, the Vertical Datum can be set separately from the Datum. Currently, when the Datum of this GCS is either NAD83 or NAD27, the Vertical Datum can be set to either NAVD88 or NGVD29 independently of the Datum.

Returns
Member of the VerticalDatum enum indicating Vertical Datum.
WCharCP GetVerticalDatumName ( ) const

Gets the name of the Coordinate System Vertical Datum.

In only a few instances, the Vertical Datum can be set separately from the Datum. Currently, when the Datum of this GCS is either NAD83 or NAD27, the Vertical Datum can be set to either NAVD88 or NGVD29 independently of the Datum. If the Datum of this GCS is not NAD83 or NAD27, then this method returns the same thing as GetDatumName.

Returns
Name of the Coordinate System Vertical Datum.
StatusInt GetWellKnownText ( WStringR  wellKnownText,
WktFlavor  wktFlavor 
) const

Gets the Well Known Text string from a coordinate system definition.

Returns
SUCCESS or a CS_MAP error code.
Parameters
wellKnownTextOut The Well Known Text specifying the coordinate system.
wktFlavorIN The WKT Flavor desired. If not known, use wktFlavorUnknown
bool HasEquivalentDatum ( BaseGCSCR  compareTo) const

Compares the Datum of this coordinate system with the argument and returns true if they have equivalent datum (including ellipsoid).

Parameters
compareToIN The BaseGCS to compare to.
StatusInt InitAzimuthalEqualArea ( WStringP  errorMsg,
WCharCP  datumName,
WCharCP  unitName,
double  originLongitude,
double  originLatitude,
double  azimuthAngle,
double  scale,
double  falseEasting,
double  falseNorthing,
int  quadrant 
)

Used in conjunction with the no-argument contructor to set the BaseGCS to an Azimuthal Equal Area projection.

Such a projection is the mathematical equivalent of placing a flat sheet of paper on the surface of the area at originLongitude, originLatitude, projecting the earth's surface onto that paper, and then adding the "falseEasting", "falseNorthing" values to yield cartesian coordinates.

Returns
SUCCESS or a CS_MAP error code.
Parameters
errorMsgOUT if non-NULL, the WString is filled in with the CS_MAP error message when an error occurs.
datumNameIN The name of the datum used in the GCS, such as "WGS84".
unitNameIN The name of the linear unit for the Cartesian coordinates, such as "METER".
originLongitudeIN The longitude of the tangency point.
originLatitudeIN The latitude of the tangency point.
azimuthAngleIN The angle, clockwise from true north in decimal degrees, of the rotation to be applied.
scaleIN This argument is ignored. The scale is always 1.0.
falseEastingIN The value to add to each Cartesian X value.
falseNorthingIN The value to add to each Cartesian Y value.
quadrantIN Quadrant for the cartesian coordinate system. If north is up and east is right, pass 0.
StatusInt InitFromEPSGCode ( StatusInt warning,
WStringP  warningErrorMsg,
int  epsgCode 
)

Used in conjunction with the CreateGCS factory method to set the BaseGCS from an EPSG coordinate system code.

The valid EPSG code ranges are from 20000 through 32767 for projected coordinate systems and 4000 through 4199 for geographic (Lat/long) coordinate systems.

Returns
SUCCESS or a CS_MAP error code.
Parameters
warningOUT if non-NULL, this might reveal a warning even if the return value is SUCCESS.
warningErrorMsgOUT if non-NULL, the WString is filled in with the CS_MAP warning or error message.
epsgCodeIN The EPSG code for the desired coordinate system.
Remarks
Only those EPSG coordinate systems that are in our library will be successfully created. The method first looks for a coordinate system named EPSGnnnnn, where nnnnn is the EPSG code. If that fails, it looks in CS-Map's lookup table to see if the EPSG code appears there. If that fails, it returns an error code and the IsValid method of the coordinate system will return false.
StatusInt InitFromGeoTiffKeys ( StatusInt warning,
WStringP  warningErrorMsg,
::IGeoTiffKeysList *  geoTiffKeys 
)

Used in conjunction with the CreateGCS factory method to set the BaseGCS from a set of GeoTiff Keys.

Returns
SUCCESS, a CS_MAP error code, or a GeoCoord error code.
Parameters
warningOUT if non-NULL, this might reveal a warning even if the return value is SUCCESS.
warningErrorMsgOUT if non-NULL, the WString is filled in with the CS_MAP warning or error message.
geoTiffKeysIN an object implementing the IGeoTiffKeysList interface.
StatusInt InitFromWellKnownText ( StatusInt warning,
WStringP  warningErrorMsg,
WktFlavor  wktFlavor,
WCharCP  wellKnownText 
)

Used in conjunction with the CreateGCS factory method to set the BaseGCS from a "well known text" string.

Returns
SUCCESS or a CS_MAP error code.
Parameters
warningOUT if non-NULL, this might reveal a warning even if the return value is SUCCESS.
warningErrorMsgOUT if non-NULL, the WString is filled in with the CS_MAP warning or error message.
wktFlavorIN The WKT Flavor. If not known, use wktFlavorUnknown.
wellKnownTextIN The Well Known Text specifying the coordinate system.
StatusInt InitLatLong ( WStringP  errorMsg,
WCharCP  datumName,
WCharCP  ellipsoidName,
WCharCP  unitName,
double  originLongitude,
double  originLatitude 
)

Used in conjunction with the no-argument contructor to set the BaseGCS to give cartesian angular values.

This is often useful for applying datum shifts when you have Longitude Latitude values in one datum and you need then in a different datum.

Returns
SUCCESS or a CS_MAP error code.
Parameters
errorMsgOUT if non-NULL, the WString is filled in with the CS_MAP error message when an error occurs.
datumNameIN The name of the datum used in the GCS, such as "WGS84".
ellipsoidNameIN The name of the ellipsoid used in the GCS, such as "WGS84". This is used only if the datumName is NULL.
unitNameIN The name of the linear unit for the Cartesian coordinates, such as "METER".
originLongitudeIN Allows displacement of the longitude values if a different origin is desired - usually 0.0.
originLatitudeIN Allows displacement of the latitude values if a different origin is desired - usually 0.0.
bool IsEquivalent ( BaseGCSCR  compareTo) const

Compares this coordinate system with the argument and returns true if they have equivalent projection, parameters, datum, ellipsoid, and modifiers.

Parameters
compareToIN The BaseGCS to compare to.
bool IsStandard ( ) const

Returns whether the Coordinate System is a standard coordinate system or not.

Returns
True if the Coordinate System originated from the coordinate system library, False otherwise.
bool IsValid ( ) const

Returns whether the Coordinate System is valid or not.

Returns
True if the Coordinate System is valid, False otherwise.
See also
GetError
Remarks
If the coordinate system is constructed using the coordinate system keyname constructor, and the specified name does not correspond to a coordinate system in the coordinate system library, IsValid is false, and GetError and GetErrorMessage can be used to obtain more details.
ReprojectStatus LatLongFromCartesian ( GeoPointR  outLatLong,
DPoint3dCR  inCartesian 
) const

Calculates the longitude, latitude, and elevation from cartesian x,y, and z.

Parameters
outLatLongOUT The calculated longitude,latitude,elevation in the datum of this GCS.
inCartesianIN The input cartesian coordinates.
ReprojectStatus LatLongFromCartesian2D ( GeoPoint2dR  outLatLong,
DPoint2dCR  inCartesian 
) const

Calculates the longitude and latitude from cartesian x and y.

Elevation is unchanged.

Parameters
outLatLongOUT The calculated longitude and latitude in the datum of this GCS.
inCartesianIN The input cartesian coordinates.
ReprojectStatus LatLongFromLatLong ( GeoPointR  outLatLong,
GeoPointCR  inLatLong,
BaseGCSCR  destGCS 
) const

Calculates the longitude and latitude in the destination GCS, applying the appropriate datum shift.

Parameters
outLatLongOUT The calculated longitude,latitude,elevation in the datum of destGCS.
inLatLongIN The longitude,latitude,elevation in the datum of this GCS.
destGCSIN The Coordinate System corresponding to outLatLong.
ReprojectStatus LatLongFromLatLong2D ( GeoPoint2dR  outLatLong,
GeoPoint2dCR  inLatLong,
BaseGCSCR  destGCS 
) const

Calculates the longitude and latitude in the destination GCS, applying the appropriate datum shift.

Parameters
outLatLongOUT The calculated longitude,latitude in the datum of destGCS.
inLatLongIN The longitude,latitude in the datum of this GCS.
destGCSIN The Coordinate System corresponding to outLatLong.
ReprojectStatus LatLongFromXYZ ( GeoPointR  outLatLong,
DPoint3dCR  inXYZ 
) const

Calculates the longitude and latitude from ECEF coordinate.

Parameters
outLatLongOUT The calculated longitude,latitude,elevation.
inXYZIN The XYZ (ECEF) coordinates of this GCS.
static double RadiansFromDegrees ( double  inDegrees)
static

Converts from Degrees to Radians.

Parameters
inDegreesIN Angular value in degrees.
Returns
Angular value in radians
StatusInt SetAffineA0 ( double  value)

Sets the A0 Affine post-processing parameter for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetAffineA1 ( double  value)

Sets the A1 Affine post-processing parameter for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetAffineA2 ( double  value)

Sets the A2 Affine post-processing parameter for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetAffineB0 ( double  value)

Sets the B0 Affine post-processing parameter for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetAffineB1 ( double  value)

Sets the B1 Affine post-processing parameter for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetAffineB2 ( double  value)

Sets the B2 Affine post-processing parameter for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetAffineParameters ( double  A0,
double  A1,
double  A2,
double  B0,
double  B1,
double  B2 
)

Sets the affine parameters for the affine post-processing portion of Transverse Mercator with post affine or Lambert Conformal Conic with post affine projections.

The transformation must be valid. In order to be valid, the determinant of the matrix formed by parameters A1 A2 and B1 B2 must be different than 0.0. To express no rotation, scale nor shearing, set A1 and B2 equal to 1.0 and A2 and B1 equal to 0.0.

Parameters
A0IN The X translation of the affine transformation
A1IN The A1 parameter of the rotation/scale/shearing portion of the affine.
A2IN The A2 parameter of the rotation/scale/shearing portion of the affine.
B0IN The Y translation of the affine transformation
B1IN The B1 parameter of the rotation/scale/shearing portion of the affine.
B2IN The B2 parameter of the rotation/scale/shearing portion of the affine.
Returns
SUCCESS or error code
StatusInt SetAzimuth ( double  value)

Sets the azimuth angle for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetCentralMeridian ( double  value)

Sets the central meridian (in degrees) for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetCentralPointLatitude ( double  value)

Sets the central point latitude (in degrees) for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetCentralPointLongitude ( double  value)

Sets the central point longitude (in degrees) for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetDanishSys34Region ( int  value)

Sets the Danish System 34 Region for Danish Sys 34 Projections.

Returns
The Region.
StatusInt SetDatumCode ( int  datumCode)

Sets the internal index of the Datum for the Coordinate System Datum.

Must be an index into the array returned by the GetDatumNames static method.

Returns
SUCCESS or an error code.
StatusInt SetDescription ( WCharCP  description)

Sets the description of the Coordinate System.

Returns
SUCCESS or an error code.
StatusInt SetEasternMeridian ( double  value)

Sets the central meridian (in degrees) for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetElevationAboveGeoid ( double  value)

Sets the elevation above the geoid, in CS units, for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetEllipsoidCode ( int  ellipsoidCode)

Sets the internal index of the Coordinate System Ellipsoid.

Must be an index into the array returned by the GetEllipsoidNames static method.

Remarks
The Ellipsoid can only be set if the Datum Code is -1 (none). Otherwise, the Datum determines the Ellipsoid.
Returns
SUCCESS or an error code.
StatusInt SetEllipsoidScaleFactor ( double  value)

Sets the ellisoid scale factor for a Lambert Conformal Conic Michigan variation.

The value given must be reasonnably close to 1.0.

Returns
SUCCESS or error code
StatusInt SetFalseEasting ( double  value)

Sets the false easting of the Coordinate System.

Returns
SUCCESS or an error code.
StatusInt SetFalseNorthing ( double  value)

Sets the false northing of the Coordinate System.

Returns
SUCCESS or an error code.
StatusInt SetGeoidSeparation ( double  value)

Sets the geoid separation, in CS units, for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetGeoTiffKeys ( ::IGeoTiffKeysList *  geoTiffKeys) const

Saves the coordinate system to GeoTiffKeys, if possible.

set of GeoTiff Keys.

Returns
SUCCESS, a CS_MAP error code, or a GeoCoord error code.
Parameters
geoTiffKeysIN an object implementing the IGeoTiffKeysList interface.
StatusInt SetHemisphere ( int  value)

Sets the Hemisphere (1 for north or -1 for south) for the Univeral Transverse Mercator projection.

Returns
SUCCESS or error code
StatusInt SetMaximumLatitude ( double  value)

Sets the maximum latitude for the Geographic Coordinate System.

Returns
SUCCESS or error code
StatusInt SetMaximumLongitude ( double  value)

Sets the maximum longitude for the Geographic Coordinate System.

Returns
SUCCESS or error code
StatusInt SetMinimumLatitude ( double  value)

Sets the minimum latitude for the Geographic Coordinate System.

Returns
SUCCESS or error code
StatusInt SetMinimumLongitude ( double  value)

Sets the minimum longitude for the Geographic Coordinate System.

Returns
SUCCESS or error code
StatusInt SetName ( WCharCP  name)

Sets the name of the Coordinate System.

Returns
SUCCESS or an error code.
StatusInt SetOriginLatitude ( double  value)

Sets the origin latitude of the Coordinate System.

Returns
SUCCESS or an error code.
StatusInt SetOriginLongitude ( double  value)

Sets the origin longitude of the Coordinate System.

Returns
SUCCESS or an error code.
StatusInt SetPoint1Latitude ( double  value)

Sets the latitude of the first point of the central geodesic (in degrees) for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetPoint1Longitude ( double  value)

Sets the longitude of the first point of the central geodesic (in degrees) for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetPoint2Latitude ( double  value)

Sets the latitude of the second point of the central geodesic (in degrees) for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetPoint2Longitude ( double  value)

Sets the longitude of the second point of the central geodesic (in degrees) for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetProjectionCode ( ProjectionCodeValue  projectionCode)

Sets CS_Map projection code of the Coordinate System.

Returns
SUCCESS or an error code.
StatusInt SetQuadrant ( short  value)

Sets the Quadrant for Projections that use that parameter.

Returns
The Quadrant for Projections that use that parameter.
bool SetReprojectElevation ( bool  value)

Sets whether reprojections from this coordinate system sadjust elevations.

Returns
The previous ReprojectElevation setting.
Remarks
The ReprojectElevation setting affects coordinate reprojections performed by the LatLongFromLatLong method. If ReprojectElevation is false, the elevation value is unchanged.
The default value is false.
StatusInt SetScaleReduction ( double  value)

Sets the Scale Reduction of the Coordinate System.

Returns
SUCCESS or an error code.
StatusInt SetSource ( WCharCP  source)

Sets the source of the Coordinate System.

Returns
SUCCESS or an error code.
StatusInt SetStandardParallel1 ( double  value)

Sets the first standard parallel for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetStandardParallel2 ( double  value)

Sets the second standard parallel for Projections that have one.

Returns
SUCCESS or error code
StatusInt SetUnitCode ( int  code)

Sets the Units to those indicated by the unit code.

The unit code must come from either GetUnitCode or an index into the array returned by GetUnitNames.

Returns
SUCCESS or an error code.
StatusInt SetUTMZone ( int  value)

Sets the UTM Zone number (1-60) for the Universal Transverse Mercator projections.

Returns
SUCCESS or error code
StatusInt SetVerticalDatumCode ( VertDatumCode  )

Sets the Vertical Datum Code.

In only a few instances, the Vertical Datum can be set separately from the Datum. Currently, when the Datum of this GCS is either NAD83 or NAD27, the Vertical Datum can be set to either NAVD88 or NGVD29 independently of the Datum.

Returns
SUCCESS or an error code.
double UnitsFromMeters ( ) const

Returns the scale factor needed to convert to the units of the coordinate system from meters by multiplication.

bool Validate ( T_WStringVector errorList) const

Tests the coordinate system definition for validity.

Returns
True if the Coordinate System parameters are valid, false if not.
Parameters
errorListOUT A list of validation errors generated by CSMap.
ReprojectStatus XYZFromLatLong ( DPoint3dR  outXYZ,
GeoPointCR  inLatLong 
) const

Calculates the XYZ (ECEF) coordinates from the longitude, latitude and elevation.

Parameters
outXYZOUT The calculated XYZ (ECEF) coordinates.
inLatLongIN The latitude, longitude and elevation to convert

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

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.