MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLCoordinateSystem Class Reference

Detailed Description

Map Transform class.

A TSLCoordinateSystem object encapsulates the transforms used to create the map. It combines a datum, map projection and linear transform.

A TSLCoordinateSystem component obtained from a TSLMapDataLayer is only valid as long as no new map has been loaded into the layer since last obtaining the component.

If you wish to modify the settings on a standard TSLCoordinateSystem then you should clone the coordinate system first.

A TSLCoordinateSystem should only be shared between threads if the object is not modified (Do not change TMC per MU, offsets etc while the object is in use in multiple threads).

Iterating over, adding, creating or querying the TSLCoordinateSystems which are stored in the internal registries is not thread safe.

Transverse Mercator Notes

EPSG have changed the formula used for Transverse Mercator while retaining the EPSG IDs for the affected Coordinate Systems that use Transverse Mercator.

The original formula "USGS Snyder" and "JHS" formulas produce similar results in a ±4 degree band around the central longitude. Outside this band the results diverge. The JHS algorithm is more accurate out to ±40 degrees.

EPSG recommend that the two formulas are not mixed.

To address this change, a number of changes have been made to tsltransforms.dat that may affect an application. The changes are outlined below:

  • IDs is in the range [-5000..-9900] use the Transverse Mercator JHS projection algorithm.
    • The 'EPSG ID' has not been changed. The EPSG database reused the 'EPSG ID' when changing the Transverse Mercator formula.
    • You can compute the corresponding Snyder version of the Coordinate System by adding '-5000' to the ID.
  • IDs in the range [-1..-4900] use the original USGS Snyder Transverse Mercator projection algorithm.
  • The NAME has been updated to contain ' (Snyder)' or ' (JHS)' to distinguish the algorithm used.
  • In the above:
  • The functionality of the findByName() method has changed slightly.

    When looking up a Coordinate System that uses Transverse Mercator projection the method expects one of two forms to be used:

    "UTM (WGS84) Zone 1 North (Snyder)"
    "UTM (WGS84) Zone 1 North (JHS)"
    

    For backwards compatibility the findByName() will return the original Coordinate System if "(Snyder)" or "(JHS)" is missing from the name being searched for. In this case a warning will be placed on the TSLThreadedErrorStack.

    TSLCoordinateConvertor calls will also need to be updated to specify which formula to use.

NOTE: The Snyder formula is the formula used in MapLink 7.5 and older.

Public Types

enum  TSLTransverseMercatorFormula { TSLTransverseMercatorFormulaUSGS , TSLTransverseMercatorFormulaJHS }
 

Public Member Functions

void clearDatumTransform ()
 
void clearLinearTransform ()
 
TSLCoordinateSystemclone (int id) const
 
int datumID () const
 
const char * datumName () const
 
void destroy ()
 
double ellipsoidEccentricity () const
 
double ellipsoidMajorRadius () const
 
double ellipsoidMinorRadius () const
 
const char * ellipsoidName () const
 
int epsgID () const
 
bool isPolar () const
 
bool erase ()
 
const TSLTransformTraitsgetAllLinearParameters () const
 
bool getDatumSource (TSLSimpleString &source) const
 
bool getEllipsoidSource (TSLSimpleString &source) const
 
void getLinearPostTranslation (double *dx, double *dy) const
 
void getLinearPreTranslation (double *dx, double *dy) const
 
double getLinearRotation () const
 
void getLinearScaling (double *scaleX, double *scaleY) const
 
void getMapOffsets (double *xOffset, double *yOffset) const
 
const TSLTransformTraitsgetMapProjectionParameters () const
 
double getProjectionFalseEasting () const
 
double getProjectionFalseNorthing () const
 
void getProjectionOrigin (double &latitude, double &longitude) const
 
bool getProjectionSource (TSLSimpleString &source) const
 
bool getReferenceDatumSource (TSLSimpleString &source) const
 
bool getSource (TSLSimpleString &source) const
 
double getTMCperMU () const
 
int id () const
 
bool latLongToMU (double latitude, double longitude, double *xMU, double *yMU, bool wrtReference=false) const
 
bool latLongToMU (int N, double *const latitudes, double *const longitudes, double *xMUs, double *yMUs, bool wrtReference=false) const
 
bool latLongToTMC (double latitude, double longitude, TSLTMC *xTMC, TSLTMC *yTMC, bool wrtReference=false) const
 
bool latLongToTMC (int N, double *const latitudes, double *const longitudes, TSLTMC *xTMCs, TSLTMC *yTMCs, bool wrtReference=false) const
 
bool MUToLatLong (double xMU, double yMU, double *latitude, double *longitude, bool wrtReference=false, bool boundCheck=true) const
 
bool MUToLatLong (int N, double *const xMUs, double *const yMUs, double *latitudes, double *longitudes, bool wrtReference=false, bool boundCheck=true) const
 
bool MUToTMC (double xMU, double yMU, TSLTMC *xTMC, TSLTMC *yTMC) const
 
bool MUToTMC (int N, double *const xMUs, double *const yMUs, TSLTMC *xTMCs, TSLTMC *yTMCs) const
 
const char * name () const
 
double projectionCentralLatitude () const
 
double projectionCentralMeridian () const
 
const char * projectionClassName () const
 
const char * projectionName () const
 
int referenceDatumID () const
 
const char * referenceDatumName () const
 
bool save (bool overwrite=false)
 
bool setDatumTransformCoordinateFrameRotation (double dX, double dY, double dZ, double rX, double rY, double rZ, double scaleFactor)
 
bool setDatumTransformGeocentricTranslation (double dX, double dY, double dZ)
 
bool setDatumTransformGeodeticOffset (double latitudeOffset, double longitudeOffset)
 
bool setDatumTransformPositionVector (double dX, double dY, double dZ, double rX, double rY, double rZ, double scaleFactor)
 
bool setLinearClientTransform (TSLClientLinearTransform *client)
 
bool setLinearPostTranslationTransform (double dx, double dy)
 
bool setLinearPreTranslationTransform (double dx, double dy)
 
bool setLinearRotationTransform (double rotation)
 
bool setLinearScalingTransform (double scaleX, double scaleY)
 
void setMapOffsets (double xOffset, double yOffset)
 
bool setProjectionAlbersEqualAreaConic (double phiS1, double phiS2, double latitude, double longitude)
 
bool setProjectionAzimuthalEquidistant (double latitude, double longitude)
 
bool setProjectionBonne (double phiS, double longitude)
 
bool setProjectionCassini (double latitude, double longitude)
 
bool setProjectionCylindricalEqualArea (double phiS, double longitude)
 
bool setProjectionEckertIV (double longitude)
 
bool setProjectionEckertVI (double longitude)
 
bool setProjectionEquidistantConic (double phiS1, double phiS2, double latitude, double longitude)
 
bool setProjectionEquidistantCylindrical (double phiS, double longitude)
 
bool setProjectionDynamicARC (double longitude)
 
void setProjectionFalseEasting (double falseEasting)
 
void setProjectionFalseNorthing (double falseNorthing)
 
bool setProjectionGnomonic (double latitude, double longitude)
 
bool setProjectionLambertAzimuthalEqualArea (double latitude, double longitude)
 
bool setProjectionLambertConformalConic (double phiS1, double phiS2, double latitude, double longitude)
 
bool setProjectionMercator (double longitude, double phiS=0.0)
 
bool setProjectionMiller (double longitude)
 
bool setProjectionMollweide (double longitude)
 
bool setProjectionObliqueCylindricalEqualArea_CentralLine (double latitudePt1, double longitudePt1, double latitudePt2, double longitudePt2, double scale)
 
bool setProjectionObliqueCylindricalEqualArea_CentralPoint (double latitude, double longitude, double azimuth, double scale)
 
bool setProjectionObliqueMercator_CentralLine (double latitudePt1, double longitudePt1, double latitudePt2, double longitudePt2, double latitude, double scale)
 
bool setProjectionObliqueMercator_CentralPoint (double latitude, double longitude, double azimuth, double scale, double rectifiedToSkewAngle)
 
bool setProjectionObliqueMercator_Hotine (double latitude, double longitude, double azimuth, double scale, double rectifiedToSkewAngle)
 
void setProjectionOrigin (double latitude, double longitude)
 
bool setProjectionOrthographic (double latitude, double longitude)
 
bool setProjectionPolyconic (double latitude, double longitude)
 
bool setProjectionSinusoidal (double longitude)
 
bool setProjectionStereographic (double latitude, double longitude, double scale=1.0)
 
bool setProjectionTransverseCylindricalEqualArea (double latitude, double longitude, double scale)
 
bool setProjectionTransverseMercator (double latitude, double longitude, double scale, TSLTransverseMercatorFormula formula)
 
bool setProjectionVanDerGrintenI (double longitude)
 
bool setReferenceDatumByID (int referenceDatumID)
 
bool setReferenceDatumByName (const char *referenceDatumName)
 
void setTMCperMU (double TMCperMU)
 
TSLSimpleString toWellKnownText () const
 
bool TMCToLatLong (TSLTMC xTMC, TSLTMC yTMC, double *latitude, double *longitude, bool wrtReference=false, bool boundCheck=true) const
 
bool TMCToLatLong (int N, TSLTMC *const xTMCs, TSLTMC *const yTMCs, double *latitudes, double *longitudes, bool wrtReference=false, bool boundCheck=true) const
 
bool TMCToMU (TSLTMC xTMC, TSLTMC yTMC, double *xMU, double *yMU) const
 
bool TMCToMU (int N, TSLTMC *const xTMCs, TSLTMC *const yTMCs, double *xMUs, double *yMUs) const
 
const TSLTransformTraitsgetLinearPostTranslationParameters () const
 
const TSLTransformTraitsgetLinearPreTranslationParameters () const
 
const TSLTransformTraitsgetLinearRotationParameters () const
 
const TSLTransformTraitsgetLinearScaleParameters () const
 
bool isLatLon () const
 
bool operator== (const TSLCoordinateSystem &otherCS) const
 

Static Public Member Functions

static TSLCoordinateSystemIterator begin ()
 
static TSLCoordinateSystemcreate (int id, const char *name, double semiMajorRadius, double eccentricity)
 
static TSLCoordinateSystemcreateByDatumID (int id, const char *name, int datumID)
 
static TSLCoordinateSystemcreateByDatumName (int id, const char *name, const char *datumName)
 
static TSLCoordinateSystemcreateFromWellKnownText (const char *wkt)
 
static double eccentricity (double inverseFlattening)
 
static TSLCoordinateSystemIterator end ()
 
static const TSLCoordinateSystemfindByEPSG (int id)
 
static int findByEPSG (int id, const TSLCoordinateSystem **coordinateSystems, int sizeOfCoordinateSystemArray)
 
static const TSLCoordinateSystemfindByID (int id)
 
static const TSLCoordinateSystemfindByName (const char *name)
 
static double inverseFlattening (double eccentricity)
 
static bool loadCoordinateSystems (const char *csysFile=0)
 
static int numberOfCoordinateSystems ()
 
static bool saveCoordinateSystems (const char *csysFile)
 

Member Enumeration Documentation

◆ TSLTransverseMercatorFormula

This enum represents the valid Transverse Mercator formulas.

  • USGS (Implemented)
  • JHS formulas (Implemented)

The Snyder and JHS formulas are satisfactory within ±4° east or west of the longitude of origin.

The JHS formula is more robust and is satisfactory over ±40° of the longitude of origin.

The increasing distortions in distance, area and angle which are inherent in the Transverse Mercator projection as you move away from the origin cannot be avoided.

Outside the ±4° of longitude east or west of the projection longitude of origin, the Snyder and JHS formulas produce different results.

Enumerator
TSLTransverseMercatorFormulaUSGS 

USGS Snyder.

TSLTransverseMercatorFormulaJHS 

JHS.

Member Function Documentation

◆ begin()

static TSLCoordinateSystemIterator TSLCoordinateSystem::begin ( )
static

Query method for loaded/created coordinate systems.

Returns an iterator to the beginning of the collection of coordinate systems.

◆ clearDatumTransform()

void TSLCoordinateSystem::clearDatumTransform ( )

Removes the datum transform from this coordinate system.

◆ clearLinearTransform()

void TSLCoordinateSystem::clearLinearTransform ( )

Removes the linear transform from this coordinate system.

◆ clone()

TSLCoordinateSystem * TSLCoordinateSystem::clone ( int id) const

Creates a writeable copy of a coordinate system.

Parameters
idThe id of the cloned system. This MUST be positive.

◆ create()

static TSLCoordinateSystem * TSLCoordinateSystem::create ( int id,
const char * name,
double semiMajorRadius,
double eccentricity )
static

Creates a user-defined coordinate system.

Parameters
idThe id of the coordinate system.
nameThe name of the coordinate system.
semiMajorRadiusThe semi-major radius of the ellipsoid.
eccentricityThe eccentricity of the ellipsoid.
Note
This method does not automatically add the coordinate system to the internal collection of all coordinate systems. To do this, call the 'save' method.

◆ createByDatumID()

static TSLCoordinateSystem * TSLCoordinateSystem::createByDatumID ( int id,
const char * name,
int datumID )
static

Creates a user-defined coordinate system based on a pre-loaded datum id.

Parameters
idThe id of the coordinate system.
nameThe name of the coordinate system.
datumIDThe id of the pre-loaded datum.
Note
  • This method does not automatically add the coordinate system to the internal collection of all coordinate systems. To do this, call the 'save' method.
  • Before using this method, make sure that 'loadCoordinateSystems' has been called.

◆ createByDatumName()

static TSLCoordinateSystem * TSLCoordinateSystem::createByDatumName ( int id,
const char * name,
const char * datumName )
static

Creates a user-defined coordinate system based on a pre-loaded named datum.

Parameters
idThe id of the coordinate system.
nameThe name of the coordinate system.
datumNameThe name of the pre-loaded datum.
Returns
the created TSLCoordinateSystem or NULL if an error occurred.
Note
  • This method does not automatically add the coordinate system to the internal collection of all coordinate systems. To do this, call the 'save' method.
  • Before using this method, make sure that 'loadCoordinateSystems' has been called.

◆ createFromWellKnownText()

static TSLCoordinateSystem * TSLCoordinateSystem::createFromWellKnownText ( const char * wkt)
static

Creates a new coordinate system object based on the Well Known Text coordinate definition provided.

Notes: Items created via this method cannot be added to the internal collection of all coordinate systems.

◆ datumID()

int TSLCoordinateSystem::datumID ( ) const

Returns the id of the datum associated with this coordinate system.

◆ datumName()

const char * TSLCoordinateSystem::datumName ( ) const

Returns the name of the datum associated with this coordinate system.

◆ destroy()

void TSLCoordinateSystem::destroy ( )

Deletes the coordinate system object. This method does not remove the coordinate system from the collection of all coordinate systems. To do that, use the 'erase' method.

◆ eccentricity()

static double TSLCoordinateSystem::eccentricity ( double inverseFlattening)
static

Returns the eccentricity of an ellipsoid given its inverse flattening.

Parameters
inverseFlatteningThe ellipsoid's inverse flattening.

◆ ellipsoidEccentricity()

double TSLCoordinateSystem::ellipsoidEccentricity ( ) const

Returns the eccentricity of the ellipsoid associated with this coordinate system.

◆ ellipsoidMajorRadius()

double TSLCoordinateSystem::ellipsoidMajorRadius ( ) const

Returns the major radius of the ellipsoid associated with this coordinate system.

◆ ellipsoidMinorRadius()

double TSLCoordinateSystem::ellipsoidMinorRadius ( ) const

Returns the minor radius of the ellipsoid associated with this coordinate system.

◆ ellipsoidName()

const char * TSLCoordinateSystem::ellipsoidName ( ) const

Returns the name of the ellipsoid associated with this coordinate system.

◆ end()

static TSLCoordinateSystemIterator TSLCoordinateSystem::end ( )
static

Query method for loaded/created coordinate systems.

Returns an iterator to one past the end of the collection of coordinate systems.

◆ epsgID()

int TSLCoordinateSystem::epsgID ( ) const

Returns the EPSG id of the coordinate system.

◆ erase()

bool TSLCoordinateSystem::erase ( )

Removes the coordinate system object from the collection of all coordinate systems. This method does not delete the object - use the 'destroy' method.

Returns true if successfully removed, false otherwise.

◆ findByEPSG() [1/2]

static const TSLCoordinateSystem * TSLCoordinateSystem::findByEPSG ( int id)
static

Searches all loaded coordinate systems for the requested TSLCoordinateSystem with the specified EPSG id.

This method returns the first EPSG ID match.

Note: The introduction of alternative formulas for Transverse Mercator complicates the lookup of Coordinate Systems. Please see the class documentation.

Parameters
idThe EPSG id of the coordinate system.
Returns
a read-only coordinate system that matches the supplied EPSG id. NULL may be returned if a match could not be found.

◆ findByEPSG() [2/2]

static int TSLCoordinateSystem::findByEPSG ( int id,
const TSLCoordinateSystem ** coordinateSystems,
int sizeOfCoordinateSystemArray )
static

Searches all loaded coordinate systems for all the requested TSLCoordinateSystem with the specified EPSG id.

The method returns the TSLCoordinateSystems found in the array provided by the caller. If the array is too small the array is filled in the order that the matching TSLCoordinateSystem are found. If the array is too large the trailing entries are ignored.

The number of matching TSLCoordinateSystems is returned. This could be larger than the specified array.

Note: The introduction of alternative formulas for Transverse Mercator complicates the lookup of Coordinate Systems. Please see the class documentation.

Parameters
idThe EPSG id of the coordinate system.
coordinateSystemsPointer to a user allocated array of pointers to TSLCoordinateSystem that is large enough to hold the requested matches.
sizeOfCoordinateSystemArraySpecifies the size of the array of pointers.
Returns
the number of matching TSLCoordinateSystems found.

◆ findByID()

static const TSLCoordinateSystem * TSLCoordinateSystem::findByID ( int id)
static

Searches all loaded coordinate systems for the requested object.

Note: The introduction of alternative formulas for Transverse Mercator complicates the lookup of Coordinate Systems. Please see the class documentation.

Parameters
idThe id of the coordinate system.
Returns
a read-only coordinate system that matches the supplied id.

◆ findByName()

static const TSLCoordinateSystem * TSLCoordinateSystem::findByName ( const char * name)
static

Searches all loaded coordinate systems for the requested object.

Note: The introduction of alternative formulas for Transverse Mercator complicates the lookup of Coordinate Systems. Please see the class documentation.

Parameters
nameThe name of the coordinate system.
Returns
a read-only coordinate system that matches the supplied name.

◆ getAllLinearParameters()

const TSLTransformTraits * TSLCoordinateSystem::getAllLinearParameters ( ) const

Returns a pointer to the map's total linear transformation parameter set.

Returns 0 if there is no associated linear transformation.

◆ getDatumSource()

bool TSLCoordinateSystem::getDatumSource ( TSLSimpleString & source) const

Returns the source for the Datum. The source may be a URN or a string which describes the origination of the Datum.

Parameters
sourceStorage for the Datum Source URN/string.
Returns
true if a source exists or false if one does not exist.

◆ getEllipsoidSource()

bool TSLCoordinateSystem::getEllipsoidSource ( TSLSimpleString & source) const

Returns the source for the Ellipsoid. The source may be a URN or a string which describes the origination of the Ellipsoid.

Parameters
sourceStorage for the Ellipsoid Source URN/string.
Returns
true if a source exists or false if one does not exist.

◆ getLinearPostTranslation()

void TSLCoordinateSystem::getLinearPostTranslation ( double * dx,
double * dy ) const

Query method for the linear post-translation parameters.

Parameters
dxA pointer to the post-translation along X (map units).
dyA pointer to the post-translation along Y (map units).

◆ getLinearPostTranslationParameters()

const TSLTransformTraits * TSLCoordinateSystem::getLinearPostTranslationParameters ( ) const

Returns a pointer to the map's post-translation transform parameter set.

Returns 0 if there is no associated post-translation transform.

NOTE: if the map only has a pre-translation, this is equivalent to a post-translation. In this case, the associated parameter set is returned by this method rather than by the 'preTranslationParameters' method.

◆ getLinearPreTranslation()

void TSLCoordinateSystem::getLinearPreTranslation ( double * dx,
double * dy ) const

Query method for the linear pre-translation parameters.

Parameters
dxA pointer to the post-translation along X (map units).
dyA pointer to the post-translation along Y (map units).

◆ getLinearPreTranslationParameters()

const TSLTransformTraits * TSLCoordinateSystem::getLinearPreTranslationParameters ( ) const

Returns a pointer to the map's pre-translation transform parameter set.

Returns 0 if there is no associated pre-translation transform.

NOTE: if the map only has a pre-translation, this is equivalent to a post-translation. In this case, this method returns 0 but the parameter set will be returned by the 'postTranslationParameters' method.

◆ getLinearRotation()

double TSLCoordinateSystem::getLinearRotation ( ) const

Query method for the linear rotation parameter.

Returns the rotation angle in degrees.

◆ getLinearRotationParameters()

const TSLTransformTraits * TSLCoordinateSystem::getLinearRotationParameters ( ) const

Returns a pointer to the map's rotation transform parameter set.

Returns 0 if there is no associated rotation transform.

◆ getLinearScaleParameters()

const TSLTransformTraits * TSLCoordinateSystem::getLinearScaleParameters ( ) const

Returns a pointer to the map's scale transform parameter set.

Returns 0 if there is no associated scale transform.

◆ getLinearScaling()

void TSLCoordinateSystem::getLinearScaling ( double * scaleX,
double * scaleY ) const

Query method for the linear scaling parameters.

Parameters
scaleXA pointer to the scale factor in the X direction.
scaleYA pointer to the scale factor in the Y direction.

◆ getMapOffsets()

void TSLCoordinateSystem::getMapOffsets ( double * xOffset,
double * yOffset ) const

Returns the origin of the MapLink TMC coordinate space wrt the projected map coordinate space (map units).

Parameters
xOffsetPointer to the x offset.
yOffsetPointer to the y offset.

◆ getMapProjectionParameters()

const TSLTransformTraits * TSLCoordinateSystem::getMapProjectionParameters ( ) const

Returns a pointer to the map projection's parameter set.

If there is no associated map projection, returns 0.

◆ getProjectionFalseEasting()

double TSLCoordinateSystem::getProjectionFalseEasting ( ) const

Returns the value of the false easting (map units) of this coordinate system's map projection.

◆ getProjectionFalseNorthing()

double TSLCoordinateSystem::getProjectionFalseNorthing ( ) const

Returns the value of the false northing (map units) of this coordinate system's map projection.

◆ getProjectionOrigin()

void TSLCoordinateSystem::getProjectionOrigin ( double & latitude,
double & longitude ) const

Query the projection origin.

Parameters
latitudeof the projection origin (degrees)
longitudeof the projection origin (degrees)

◆ getProjectionSource()

bool TSLCoordinateSystem::getProjectionSource ( TSLSimpleString & source) const

Returns the source for the projection. The source may be a URN or a string which describes the origination of the projection.

Parameters
sourceStorage for the Projection Source URN/string.
Returns
true if a source exists or false if one does not exist.

◆ getReferenceDatumSource()

bool TSLCoordinateSystem::getReferenceDatumSource ( TSLSimpleString & source) const

Returns the source for the Reference Datum. The source may be a URN or a string which describes the origination of the Datum.

Parameters
sourceStorage for the Reference Datum Source URN/string.
Returns
true if a source exists or false if one does not exist.

◆ getSource()

bool TSLCoordinateSystem::getSource ( TSLSimpleString & source) const

Returns the source for the coordinate system. The source may be a URN or a string which describes the origination of the coordinate system.

Parameters
sourceStorage for the Projection Source URN/string.
Returns
true if a source exists or false if one does not exist.

◆ getTMCperMU()

double TSLCoordinateSystem::getTMCperMU ( ) const

Returns the number of TMC units per map unit.

◆ id()

int TSLCoordinateSystem::id ( ) const

Returns the id of the coordinate system.

◆ inverseFlattening()

static double TSLCoordinateSystem::inverseFlattening ( double eccentricity)
static

Returns the inverseFlattening an ellipsoid given its eccentricity.

Parameters
eccentricityThe ellipsoid's eccentricity.

◆ isLatLon()

bool TSLCoordinateSystem::isLatLon ( ) const

Query whether this coordinate transform is lat/long compatible i.e 1 MU == 1 degree

This method will return true for at least:

  • EPSG 4326
  • Dynamic ARC
  • Default Map Coordinate System

If this method returns false the coordinate system does not use degrees. It is safe to assume the coordinate system is in Meters if this method returns false however this is not guaranteed.

If the coordinate system has a linear transform or scaling it is ignored by this method. This may result in a situation where the coordinate system uses degrees but 1 MU is not equal to 1 Degree.

Returns
true if this coordinate system uses degrees, false otherwise.

◆ isPolar()

bool TSLCoordinateSystem::isPolar ( ) const

Returns whether coordinate system has the polar flag set

◆ latLongToMU() [1/2]

bool TSLCoordinateSystem::latLongToMU ( double latitude,
double longitude,
double * xMU,
double * yMU,
bool wrtReference = false ) const

Projects the supplied geodetic latitude and longitude into the map coordinate space.

Parameters
latitudeThe latitude.
longitudeThe longitude.
xMUPointer to the projected x-coordinate.
yMUPointer to the projected y-coordinate.
wrtReferenceif true, then the latitude and longitude are given wrt the reference datum (default WGS 1984); if false (default), then the latitude and longitude are given wrt the coordinate system's local datum.
Returns
true if the projection succeeded, false otherwise.

◆ latLongToMU() [2/2]

bool TSLCoordinateSystem::latLongToMU ( int N,
double *const latitudes,
double *const longitudes,
double * xMUs,
double * yMUs,
bool wrtReference = false ) const

Projects the supplied array of geodetic latitude and longitude points into the map coordinate space.

Parameters
Nthe number of points in each array.
latitudesPointer to the array of latitudes.
longitudesPointer to the array of longitudes.
xMUsPointer to the array of projected x-coordinates.
yMUsPointer to the array of projected y-coordinates.
wrtReferenceif true, then the latitude and longitude are given wrt the reference datum (default WGS 1984); if false (default), then the latitude and longitude are given wrt the coordinate system's local datum.
Returns
true if the projection succeeded, false otherwise.

◆ latLongToTMC() [1/2]

bool TSLCoordinateSystem::latLongToTMC ( double latitude,
double longitude,
TSLTMC * xTMC,
TSLTMC * yTMC,
bool wrtReference = false ) const

Projects the supplied geodetic latitude and longitude into the MapLink coordinate space.

Parameters
latitudeThe latitude.
longitudeThe longitude.
xTMCPointer to the TMC x-coordinate.
yTMCPointer to the TMC y-coordinate.
wrtReferenceif true, then the latitude and longitude are given wrt the reference datum (default WGS 1984); if false (default), then the latitude and longitude are given wrt the coordinate system's local datum.
Returns
true if the projection succeeded, false otherwise.

◆ latLongToTMC() [2/2]

bool TSLCoordinateSystem::latLongToTMC ( int N,
double *const latitudes,
double *const longitudes,
TSLTMC * xTMCs,
TSLTMC * yTMCs,
bool wrtReference = false ) const

Projects the supplied array of geodetic latitude and longitude points into the MapLink coordinate space.

Parameters
Nthe number of points in each array.
latitudesPointer to the array of latitudes.
longitudesPointer to the array of longitudes.
xTMCsPointer to the array of TMC x-coordinates.
yTMCsPointer to the array of TMC y-coordinates.
wrtReferenceif true, then the latitude and longitude are given wrt the reference datum (default WGS 1984); if false (default), then the latitude and longitude are given wrt the coordinate system's local datum.
Returns
true if the projection succeeded, false otherwise.

◆ loadCoordinateSystems()

static bool TSLCoordinateSystem::loadCoordinateSystems ( const char * csysFile = 0)
static

Loads the coordinate systems that are supplied as part of the Maplink distribution.

If MapLink is installed on the system running the application calling this method, then it is valid to not pass a csysFile parameter. If MapLink is not installed however, the csysFile parameter should be provided. It should contain the path to the coordinate systems definition file; for instance the 'tsltransforms.dat' contained in the config directory of a MapLink installation.

Parameters
csysFileA pointer to the name of the file containing the definitions of the coordinate systems. If this is 0, then the standard MapLink home directory will be searched for the definitions file.
Returns
true if loaded successfully, false otherwise.

◆ MUToLatLong() [1/2]

bool TSLCoordinateSystem::MUToLatLong ( double xMU,
double yMU,
double * latitude,
double * longitude,
bool wrtReference = false,
bool boundCheck = true ) const

Projects the supplied map x and y coordinate back into the geodetic coordinate space.

Parameters
xMUThe map x-coordinate.
yMUThe map y-coordinate.
latitudePointer to the latitude.
longitudePointer to the longitude.
wrtReferenceif true, then the latitude and longitude are given wrt the reference datum (default WGS 1984); if false (default), then the latitude and longitude are given wrt the coordinate system's local datum.
boundCheckWhen the initial coordinates are outside of the map extent, the returned latitude/longitude could be invalid. When this flag is true (default), a check for invalid results is performed. This check will double the processing time required by the method, but return a validated status code. If the specified coordinate is guaranteed to be within the map extent, then this flag may be turned off.
Returns
true if the projection succeeded, false otherwise.

◆ MUToLatLong() [2/2]

bool TSLCoordinateSystem::MUToLatLong ( int N,
double *const xMUs,
double *const yMUs,
double * latitudes,
double * longitudes,
bool wrtReference = false,
bool boundCheck = true ) const

Projects the supplied array of map x and y coordinates back into the geodetic coordinate space.

Parameters
Nthe number of points in each array.
xMUsPointer to the array of map x-coordinates.
yMUsPointer to the array of map y-coordinates.
latitudesPointer to the array of latitudes.
longitudesPointer to the array of longitudes.
wrtReferenceif true, then the latitude and longitude are given wrt the reference datum (default WGS 1984); if false (default), then the latitude and longitude are given wrt the coordinate system's local datum.
boundCheckWhen the initial coordinates are outside of the map extent, the returned latitude/longitude could be invalid. When this flag is true (default), a check for invalid results is performed. This check will double the processing time required by the method, but return a validated status code. If the specified coordinate is guaranteed to be within the map extent, then this flag may be turned off.
Returns
true if the projection succeeded, false otherwise.

◆ MUToTMC() [1/2]

bool TSLCoordinateSystem::MUToTMC ( double xMU,
double yMU,
TSLTMC * xTMC,
TSLTMC * yTMC ) const

Converts the supplied map x and y coordinate into the MapLink coordinate space.

Parameters
xMUThe map x-coordinate.
yMUThe map y-coordinate.
xTMCPointer to the TMC x-coordinate.
yTMCPointer to the TMC y-coordinate.
Returns
true if the conversion succeeded, false otherwise.

◆ MUToTMC() [2/2]

bool TSLCoordinateSystem::MUToTMC ( int N,
double *const xMUs,
double *const yMUs,
TSLTMC * xTMCs,
TSLTMC * yTMCs ) const

Converts the supplied array of map x and y coordinates into the MapLink coordinate space.

Parameters
Nthe number of points in each array.
xMUsPointer to the array of map x-coordinates.
yMUsPointer to the array of map y-coordinates.
xTMCsPointer to the array of TMC x-coordinates.
yTMCsPointer to the array of TMC y-coordinates.
Returns
true if the conversion succeeded, false otherwise.

◆ name()

const char * TSLCoordinateSystem::name ( ) const

Returns the name of the coordinate system.

◆ numberOfCoordinateSystems()

static int TSLCoordinateSystem::numberOfCoordinateSystems ( )
static

Returns the number of coordinate systems currently loaded.

◆ operator==()

bool TSLCoordinateSystem::operator== ( const TSLCoordinateSystem & otherCS) const

Equality operator

◆ projectionCentralLatitude()

double TSLCoordinateSystem::projectionCentralLatitude ( ) const

Returns the latitude origin of this coordinate system's map projection.

◆ projectionCentralMeridian()

double TSLCoordinateSystem::projectionCentralMeridian ( ) const

Returns the longitude origin of this coordinate system's map projection.

◆ projectionClassName()

const char * TSLCoordinateSystem::projectionClassName ( ) const

Returns the name of the class of projection associated with this coordinate system (e.g. "Mercator").

◆ projectionName()

const char * TSLCoordinateSystem::projectionName ( ) const

Returns the name of the projection associated with this coordinate system.

◆ referenceDatumID()

int TSLCoordinateSystem::referenceDatumID ( ) const

Returns the id of the reference datum associated with this coordinate system.

◆ referenceDatumName()

const char * TSLCoordinateSystem::referenceDatumName ( ) const

Returns the name of the reference datum associated with this coordinate system.

◆ save()

bool TSLCoordinateSystem::save ( bool overwrite = false)

Saves a user-defined coordinate system to the collection of all coordinate systems. This does not overwrite coordinate systems that already exist with the same id (unless overwrite is set to true). In such cases, use 'erase' first to remove the system from the collection.

Parameters
overwriteIf set to 'true', then will overwrite coordinate systems that already exist with the same id. Default is false.
Returns
true if successfully added to the collection, false if not added (this would be the case if the coordinate system already exists).

◆ saveCoordinateSystems()

static bool TSLCoordinateSystem::saveCoordinateSystems ( const char * csysFile)
static

Saves any coordinate systems that the user has defined.

Parameters
csysFileThe name of the file which will contain the definitions of the coordinate systems.
Returns
true if saved successfully, false otherwise.

◆ setDatumTransformCoordinateFrameRotation()

bool TSLCoordinateSystem::setDatumTransformCoordinateFrameRotation ( double dX,
double dY,
double dZ,
double rX,
double rY,
double rZ,
double scaleFactor )

Assigns a datum transform based on Coordinate Frame Rotation parameters to this coordinate system.

Parameters
dXThe X-shift from local datum to reference datum in XYZ space.
dYThe Y-shift from local datum to reference datum in XYZ space.
dZThe Z-shift from local datum to reference datum in XYZ space.
rXThe X-rotation from local datum to reference datum in XYZ space (arc-seconds).
rYThe Y-rotation from local datum to reference datum in XYZ space (arc-seconds).
rZThe Z-rotation from local datum to reference datum in XYZ space (arc-seconds).
scaleFactorThe scale correction factor (parts-per-million).
Returns
true if succeeded, false otherwise.

◆ setDatumTransformGeocentricTranslation()

bool TSLCoordinateSystem::setDatumTransformGeocentricTranslation ( double dX,
double dY,
double dZ )

Assigns a datum transform based on Geocentric Translation parameters to this coordinate system.

Parameters
dXThe X-shift from local datum to reference datum in XYZ space.
dYThe Y-shift from local datum to reference datum in XYZ space.
dZThe Z-shift from local datum to reference datum in XYZ space.
Returns
true if succeeded, false otherwise.

◆ setDatumTransformGeodeticOffset()

bool TSLCoordinateSystem::setDatumTransformGeodeticOffset ( double latitudeOffset,
double longitudeOffset )

Assigns a datum transform based on Geodetic Offset parameters to this coordinate system.

Parameters
latitudeOffsetThe latitude shift from local datum to reference datum (arc-seconds).
longitudeOffsetThe longitude shift from local datum to reference datum (arc-seconds).
Returns
true if succeeded, false otherwise.

◆ setDatumTransformPositionVector()

bool TSLCoordinateSystem::setDatumTransformPositionVector ( double dX,
double dY,
double dZ,
double rX,
double rY,
double rZ,
double scaleFactor )

Assigns a datum transform based on Position Vector parameters to this coordinate system.

Parameters
dXThe X-shift from local datum to reference datum in XYZ space.
dYThe Y-shift from local datum to reference datum in XYZ space.
dZThe Z-shift from local datum to reference datum in XYZ space.
rXThe X-rotation from local datum to reference datum in XYZ space (arc-seconds).
rYThe Y-rotation from local datum to reference datum in XYZ space (arc-seconds).
rZThe Z-rotation from local datum to reference datum in XYZ space (arc-seconds).
scaleFactorThe scale correction factor (parts-per-million).
Returns
true if succeeded, false otherwise.

◆ setLinearClientTransform()

bool TSLCoordinateSystem::setLinearClientTransform ( TSLClientLinearTransform * client)

Assigns a client linear transform to this coordinate system. The linear transform process chain is: pre-translation, scale, rotate and post-translate followed by the client transform.

Parameters
clientThe client transform.
Returns
true if successful, false otherwise.
Note
  1. This will overwrite any current client transform.

◆ setLinearPostTranslationTransform()

bool TSLCoordinateSystem::setLinearPostTranslationTransform ( double dx,
double dy )

Assigns a pre-translation transform to this coordinate system. The linear transform process chain is: pre-translation, scale, rotate and post-translate.

Parameters
dxThe post-translation along X (map units).
dyThe post-translation along Y (map units).
Returns
true if successfully, false otherwise.
Note
  1. This will overwrite any current post-translation transform.

◆ setLinearPreTranslationTransform()

bool TSLCoordinateSystem::setLinearPreTranslationTransform ( double dx,
double dy )

Assigns a pre-translation transform to this coordinate system. The linear transform process chain is: pre-translation, scale, rotate and post-translate.

Parameters
dxThe pre-translation along X (map units).
dyThe pre-translation along Y (map units).
Returns
true if successfully, false otherwise.
Note
  1. This will overwrite any current pre-translation transform.

◆ setLinearRotationTransform()

bool TSLCoordinateSystem::setLinearRotationTransform ( double rotation)

Assigns a rotation transform to this coordinate system. The linear transform process chain is: pre-translation, scale, rotate and post-translate.

Parameters
rotationThe rotation angle (degrees).
Returns
true if successfully, false otherwise.
Note
  1. This will overwrite any current rotation transform.

◆ setLinearScalingTransform()

bool TSLCoordinateSystem::setLinearScalingTransform ( double scaleX,
double scaleY )

Assigns a scale transform to this coordinate system. The linear transform process chain is: pre-translation, scale, rotate and post-translate.

Parameters
scaleXThe scale factor in the X direction.
scaleYThe scale factor in the Y direction.
Returns
true if successfully, false otherwise.
Note
  1. This will overwrite any current scale transform.

◆ setMapOffsets()

void TSLCoordinateSystem::setMapOffsets ( double xOffset,
double yOffset )

Sets the origin of the MapLink TMC coordinate space wrt the projected map coordinate space (map units).

Parameters
xOffsetThe map x offset (map units).
yOffsetThe map y offset (map units).

◆ setProjectionAlbersEqualAreaConic()

bool TSLCoordinateSystem::setProjectionAlbersEqualAreaConic ( double phiS1,
double phiS2,
double latitude,
double longitude )

Assigns an Albers Equal-Area map projection to this coordinate system.

Parameters
phiS1The first standard parallel (degrees).
phiS2The second standard parallel (degrees).
latitudeThe central latitude of the projection (degrees).
longitudeThe central meridian of the projection (degrees).
Note
The standard parallels must not be equidistant from the equator.
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionAzimuthalEquidistant()

bool TSLCoordinateSystem::setProjectionAzimuthalEquidistant ( double latitude,
double longitude )

Assigns an Azimuthal Equidistant map projection to this coordinate system.

Parameters
latitudeThe central latitude (degrees).
longitudeThe central meridian of the projection (degrees).
Note
for an ellipsoidal datum, only the oblique aspect is currently supported.
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionBonne()

bool TSLCoordinateSystem::setProjectionBonne ( double phiS,
double longitude )

Assigns a Bonne map projection to this coordinate system.

Parameters
phiSThe standard parallel (degrees).
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionCassini()

bool TSLCoordinateSystem::setProjectionCassini ( double latitude,
double longitude )

Assigns a Cassini map projection to this coordinate system.

Parameters
latitudeThe central latitude (degrees).
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionCylindricalEqualArea()

bool TSLCoordinateSystem::setProjectionCylindricalEqualArea ( double phiS,
double longitude )

Assigns a Cylindrical Equal-Area map projection to this coordinate system.

Parameters
phiSThe standard parallel (degrees).
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionDynamicARC()

bool TSLCoordinateSystem::setProjectionDynamicARC ( double longitude)

Assigns a Dynamic ARC map projection to this coordinate system.

Parameters
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionEckertIV()

bool TSLCoordinateSystem::setProjectionEckertIV ( double longitude)

Assigns an Eckert IV map projection to this coordinate system.

Parameters
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionEckertVI()

bool TSLCoordinateSystem::setProjectionEckertVI ( double longitude)

Assigns an Eckert VI map projection to this coordinate system.

Parameters
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionEquidistantConic()

bool TSLCoordinateSystem::setProjectionEquidistantConic ( double phiS1,
double phiS2,
double latitude,
double longitude )

Assigns an Equidistant Conic map projection to this coordinate system.

Parameters
phiS1The first standard parallel (degrees).
phiS2The second standard parallel (degrees).
latitudeThe central latitude of the projection (degrees).
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionEquidistantCylindrical()

bool TSLCoordinateSystem::setProjectionEquidistantCylindrical ( double phiS,
double longitude )

Assigns an Equidistant Cylindrical map projection to this coordinate system.

Parameters
phiSThe standard parallel (degrees).
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionFalseEasting()

void TSLCoordinateSystem::setProjectionFalseEasting ( double falseEasting)

Sets the value of the false easting of this coordinate system's map projection.

NOTE : The main projection parameters need to be configured before this value, otherwise the Map Unit values will be incorrect.

Parameters
falseEastingThe false easting (map units).

◆ setProjectionFalseNorthing()

void TSLCoordinateSystem::setProjectionFalseNorthing ( double falseNorthing)

Sets the value of the false northing of this coordinate system's map projection.

NOTE : The main projection parameters need to be configured before this value, otherwise the Map Unit values will be incorrect.

Parameters
falseNorthingThe false easting (map units).

◆ setProjectionGnomonic()

bool TSLCoordinateSystem::setProjectionGnomonic ( double latitude,
double longitude )

Assigns a Gnomonic map projection to this coordinate system.

Parameters
latitudeThe central latitude of the projection (degrees).
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionLambertAzimuthalEqualArea()

bool TSLCoordinateSystem::setProjectionLambertAzimuthalEqualArea ( double latitude,
double longitude )

Assigns a Lambert Azimuthal Equal-Area map projection to this coordinate system.

Parameters
latitudeThe central latitude of the projection (degrees).
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionLambertConformalConic()

bool TSLCoordinateSystem::setProjectionLambertConformalConic ( double phiS1,
double phiS2,
double latitude,
double longitude )

Assigns a Lambert Conformal Conic map projection to this coordinate system.

Parameters
phiS1The first standard parallel (degrees).
phiS2The second standard parallel (degrees).
latitudeThe central latitude of the projection (degrees).
longitudeThe central meridian of the projection (degrees).
Note
The standard parallels must not be equidistant from the equator.
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionMercator()

bool TSLCoordinateSystem::setProjectionMercator ( double longitude,
double phiS = 0.0 )

Assigns a Mercator map projection to this coordinate system.

Parameters
longitudeThe central meridian of the projection (degrees).
phiSThe standard parallel (degrees) - default = 0.0 (the Equator).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionMiller()

bool TSLCoordinateSystem::setProjectionMiller ( double longitude)

Assigns a Miller map projection to this coordinate system.

Parameters
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionMollweide()

bool TSLCoordinateSystem::setProjectionMollweide ( double longitude)

Assigns a Mollweide map projection to this coordinate system.

Parameters
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionObliqueCylindricalEqualArea_CentralLine()

bool TSLCoordinateSystem::setProjectionObliqueCylindricalEqualArea_CentralLine ( double latitudePt1,
double longitudePt1,
double latitudePt2,
double longitudePt2,
double scale )

Assigns an Oblique Cylindrical Equal-Area map projection (based on a central line) to this coordinate system.

Parameters
latitudePt1The latitude of the first reference point defining the central line of the projection (degrees).
longitudePt1The longitude of the first reference point defining the central line of the projection (degrees).
latitudePt2The latitude of the second reference point defining the central line of the projection (degrees).
longitudePt2The longitude of the second reference point defining the central line of the projection (degrees).
scaleThe scale factor along the central line.
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionObliqueCylindricalEqualArea_CentralPoint()

bool TSLCoordinateSystem::setProjectionObliqueCylindricalEqualArea_CentralPoint ( double latitude,
double longitude,
double azimuth,
double scale )

Assigns an Oblique Cylindrical Equal-Area map projection (based on a central point) to this coordinate system.

Parameters
latitudeThe latitude of the central point of the projection (degrees).
longitudeThe longitude of the central point of the projection (degrees).
azimuthThe azimuth, east of north, of the central line through the central point of the projection (degrees).
scaleThe scale factor along the central line.
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionObliqueMercator_CentralLine()

bool TSLCoordinateSystem::setProjectionObliqueMercator_CentralLine ( double latitudePt1,
double longitudePt1,
double latitudePt2,
double longitudePt2,
double latitude,
double scale )

Assigns an Oblique Mercator map projection (based on a central line) to this coordinate system.

Parameters
latitudePt1The latitude of the first reference point defining the central line of the projection (degrees).
longitudePt1The longitude of the first reference point defining the central line of the projection (degrees).
latitudePt2The latitude of the second reference point defining the central line of the projection (degrees).
longitudePt2The longitude of the second reference point defining the central line of the projection (degrees).
latitudeThe latitude of the centre of the map (degrees).
scaleThe scale factor along the central line.
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionObliqueMercator_CentralPoint()

bool TSLCoordinateSystem::setProjectionObliqueMercator_CentralPoint ( double latitude,
double longitude,
double azimuth,
double scale,
double rectifiedToSkewAngle )

Assigns an Oblique Mercator map projection (based on a central point) to this coordinate system.

Parameters
latitudeThe latitude of the central point of the projection (degrees).
longitudeThe longitude of the central point of the projection (degrees).
azimuthThe azimuth, east of north, of the central line through the central point of the projection (degrees).
scaleThe scale factor along the central line.
rectifiedToSkewAngleThe angle from the rectified grid to the skew (oblique) grid (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionObliqueMercator_Hotine()

bool TSLCoordinateSystem::setProjectionObliqueMercator_Hotine ( double latitude,
double longitude,
double azimuth,
double scale,
double rectifiedToSkewAngle )

Assigns an Oblique Hotine Mercator map projection (based on a central point) to this coordinate system.

Parameters
latitudeThe latitude of the central point of the projection (degrees).
longitudeThe longitude of the central point of the projection (degrees).
azimuthThe azimuth, east of north, of the central line through the central point of the projection (degrees).
scaleThe scale factor along the central line.
rectifiedToSkewAngleThe angle from the rectified grid to the skew (oblique) grid (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionOrigin()

void TSLCoordinateSystem::setProjectionOrigin ( double latitude,
double longitude )

Sets the origin of this coordinate system's map projection.

Parameters
latitudeThe central latitude (degrees).
longitudeThe central meridian (degrees).

◆ setProjectionOrthographic()

bool TSLCoordinateSystem::setProjectionOrthographic ( double latitude,
double longitude )

Assigns an Orthographic map projection to this coordinate system.

Parameters
latitudeThe central latitude of the projection (degrees).
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionPolyconic()

bool TSLCoordinateSystem::setProjectionPolyconic ( double latitude,
double longitude )

Assigns a Polyconic map projection to this coordinate system.

Parameters
latitudeThe central meridian of the projection (degrees).
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionSinusoidal()

bool TSLCoordinateSystem::setProjectionSinusoidal ( double longitude)

Assigns a Sinusoidal map projection to this coordinate system.

Parameters
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionStereographic()

bool TSLCoordinateSystem::setProjectionStereographic ( double latitude,
double longitude,
double scale = 1.0 )

Assigns a Stereographic map projection to this coordinate system.

Parameters
latitudeThe central latitude of the projection (degrees).
longitudeThe central meridian of the projection (degrees).
scaleThe scale factor at the pole (default =1).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionTransverseCylindricalEqualArea()

bool TSLCoordinateSystem::setProjectionTransverseCylindricalEqualArea ( double latitude,
double longitude,
double scale )

Assigns a Transverse Cylindrical Equal-Area map projection to this coordinate system.

Parameters
latitudeThe central latitude of the projection (degrees).
longitudeThe central meridian of the projection (degrees).
scaleThe scale factor on the central meridian.
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionTransverseMercator()

bool TSLCoordinateSystem::setProjectionTransverseMercator ( double latitude,
double longitude,
double scale,
TSLTransverseMercatorFormula formula )

Assigns a Transverse Mercator map projection to this coordinate system.

There are two Transverse Mercator formulas; USGS (Snyder) and JHS formulas.

The Snyder and JHS formulas are satisfactory within ±4° east or west of the longitude of origin.

The JHS formula is more robust and is satisfactory over ±40° of the longitude of origin.

The increasing distortions in distance, area and angle which are inherent in the Transverse Mercator projection as you move away from the origin cannot be avoided.

Note:

  1. Outside the ±4° of longitude east or west of the projection longitude of origin, the Snyder and JHS formulas produce different results.
  2. The introduction of alternative formulas for Transverse Mercator complicates the lookup of Coordinate Systems. Please see the class documentation.
  3. The Snyder formula is the formula used in MapLink 7.5 and older.
Parameters
latitudeThe central latitude of the projection (degrees).
longitudeThe central meridian of the projection (degrees).
scaleThe scale factor on the central meridian.
formulaThe Transverse Mercator algorithm to use.
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setProjectionVanDerGrintenI()

bool TSLCoordinateSystem::setProjectionVanDerGrintenI ( double longitude)

Assigns a van der Grinten map projection to this coordinate system.

Parameters
longitudeThe central meridian of the projection (degrees).
Returns
true if succeeded, false otherwise. The only reason for a failure is if the coordinate system's datum is not supported by the map projection (e.g. the projection is valid only for a sphere but the coordinate system has an ellipsoidal datum).

◆ setReferenceDatumByID()

bool TSLCoordinateSystem::setReferenceDatumByID ( int referenceDatumID)

Assigns a pre-loaded reference datum to this coordinate system and attaches a datum transform between the coordinate system's local datum and the reference datum.

Parameters
referenceDatumIDThe id of the reference datum.
Returns
true if the reference datum exists and a datum transform was found. Returns false if either the reference datum does not exist or a datum transform is not found between the two datums.

◆ setReferenceDatumByName()

bool TSLCoordinateSystem::setReferenceDatumByName ( const char * referenceDatumName)

Assigns a pre-loaded reference datum to this coordinate system and attaches a datum transform between the coordinate system's local datum and the reference datum.

Parameters
referenceDatumNameThe name of the reference datum.
Returns
true if the reference datum exists and a datum transform was found. Returns false if either the reference datum does not exist or a datum transform is not found between the two datums.

◆ setTMCperMU()

void TSLCoordinateSystem::setTMCperMU ( double TMCperMU)

Sets the number of TMC units per map unit.

NOTE : This value is currently ignored when the coordinate system is used for run-time projection. Under those circumstances the TMCperMU is calculated according to the input data extent.

Parameters
TMCperMUThe number of TMC units per map unit.

◆ TMCToLatLong() [1/2]

bool TSLCoordinateSystem::TMCToLatLong ( int N,
TSLTMC *const xTMCs,
TSLTMC *const yTMCs,
double * latitudes,
double * longitudes,
bool wrtReference = false,
bool boundCheck = true ) const

Projects the supplied array of MapLink x and y TMC units back into the geodetic coordinate space.

Parameters
Nthe number of points in each array.
xTMCsPointer to the array of TMC x-coordinates.
yTMCsPointer to the array of TMC y-coordinates.
latitudesPointer to the array of latitudes.
longitudesPointer to the array of longitudes.
wrtReferenceif true, then the latitude and longitude are given wrt the reference datum (default WGS 1984); if false (default), then the latitude and longitude are given wrt the coordinate system's local datum.
boundCheckWhen the initial coordinates are outside of the map extent, the returned latitude/longitude could be invalid. When this flag is true (default), a check for invalid results is performed. This check will double the processing time required by the method, but return a validated status code. If the specified coordinate is guaranteed to be within the map extent, then this flag may be turned off.
Returns
true if the projection succeeded, false otherwise.

◆ TMCToLatLong() [2/2]

bool TSLCoordinateSystem::TMCToLatLong ( TSLTMC xTMC,
TSLTMC yTMC,
double * latitude,
double * longitude,
bool wrtReference = false,
bool boundCheck = true ) const

Projects the supplied MapLink x and y TMC unit back into the geodetic coordinate space.

Parameters
xTMCThe TMC x-coordinate.
yTMCThe TMC y-coordinate.
latitudePointer to the latitude.
longitudePointer to the longitude.
wrtReferenceif true, then the latitude and longitude are given wrt the reference datum (default WGS 1984); if false (default), then the latitude and longitude are given wrt the coordinate system's local datum.
boundCheckWhen the initial coordinates are outside of the map extent, the returned latitude/longitude could be invalid. When this flag is true (default), a check for invalid results is performed. This check will double the processing time required by the method, but return a validated status code. If the specified coordinate is guaranteed to be within the map extent, then this flag may be turned off.
Returns
true if the projection succeeded, false otherwise.

◆ TMCToMU() [1/2]

bool TSLCoordinateSystem::TMCToMU ( int N,
TSLTMC *const xTMCs,
TSLTMC *const yTMCs,
double * xMUs,
double * yMUs ) const

Converts the supplied array of MapLink x ad y TMC units into the map coordinate space.

Parameters
Nthe number of points in each array.
xTMCsPointer to the array of TMC x-coordinates.
yTMCsPointer to the array of TMC y-coordinates.
xMUsPointer to the array of map x-coordinates.
yMUsPointer to the array of map y-coordinates.
Returns
true if the conversion succeeded, false otherwise.

◆ TMCToMU() [2/2]

bool TSLCoordinateSystem::TMCToMU ( TSLTMC xTMC,
TSLTMC yTMC,
double * xMU,
double * yMU ) const

Converts the supplied MapLink x ad y TMC unit into the map coordinate space.

Parameters
xTMCThe TMC x-coordinate.
yTMCThe TMC y-coordinate.
xMUPointer to the map x-coordinate.
yMUPointer to the map y-coordinate.
Returns
true if the conversion succeeded, false otherwise.

◆ toWellKnownText()

TSLSimpleString TSLCoordinateSystem::toWellKnownText ( ) const

Returns this coordinate system object as Well Known Text.