ICoordinateSystem80
This interface gives access to layer and MPT coordinate system information and to methods which enable conversion from one coordinate system to another. Each coordinate system is associated with its Well-Known Text (WKT) description, a simple structured, text-based format that is easy to store and share between systems.
|
Properties |
|
|
Gets the multiplication factor to convert coordinate units to meters. |
|
|
Gets a nicely formatted WKT string for display to a person. |
|
|
Gets and sets the Well-Known Text representation for the selected coordinate system. |
|
|
Gets the description part of the WKT string. |
|
|
Methods |
|
|
Returns the metric conversion factor for the specified unit. |
|
|
Initializes a projection definition based on the four string keys used to represent a coordinate system in an older TerraExplorer version. |
|
|
Initializes a projection definition based on a numeric EPSG projected coordinate system definition. |
|
|
Initializes a Geographic Lat-Long, WGS coordinate system. |
|
|
Returns TRUE if the coordinate system includes a vertical datum. |
|
|
Returns TRUE if the coordinate system is geocentric. |
|
|
Returns TRUE if the coordinate system is planar. |
|
|
Returns TRUE if the selected coordinate system is the same as the specified one. |
|
|
Returns TRUE if the coordinate system’s WKT is valid. |
|
|
Writes the Well-Known Text representation for the selected coordinate system to a specified file. |
FactorToMeter
Gets the multiplication factor to convert coordinate units to meters.
JavaScript |
|
FactorToMeter |
C# |
|
double FactorToMeter { get; } |
C++ |
|
HRESULT FactorToMeter([out, retval] double* pVal) |
PrettyWkt
Gets a nicely formatted WKT string for display to a person.
JavaScript |
|
PrettyWkt |
C# |
|
string PrettyWkt { get; } |
C++ |
|
HRESULT PrettyWkt([out, retval] BSTR* pVal) |
WellKnownText
Gets and sets the Well-Known Text representation for the selected coordinate system.
JavaScript |
|
WellKnownText |
C# |
|
string WellKnownText { get; set; } |
C++ |
|
HRESULT WellKnownText([out, retval] BSTR* pVal) HRESULT WellKnownText([in] BSTR pVal) |
WktDescription
Gets the description part of the WKT string.
JavaScript |
|
WktDescription |
C# |
|
string WktDescription { get; } |
C++ |
|
HRESULT WktDescription([out, retval] BSTR* pVal) |
GetFactorToMeterEx
This method returns the metric conversion factor for the specified unit.
JavaScript |
|
GetFactorToMeterEx( Y) |
C# |
|
double GetFactorToMeterEx( double Y) |
C++ |
|
HRESULT GetFactorToMeterEx( double Y, double* pVal) |
Parameters
Y
The unit to be converted.
Return Value
pVal
The metric conversion factor.
Exceptions
HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following value:
TE_E_COORDSYS_UNIT_FACTOR Error getting linear unit factor.
InitFromBMG
Initializes a projection definition based on the four string keys used to represent a coordinate system in an older TerraExplorer version.
JavaScript |
|
InitFromBMG( Group, Sys, Datum, Unit) |
C# |
|
void InitFromBMG( string Group, string Sys, string Datum, string Unit) |
C++ |
|
HRESULT InitFromBMG( BSTR Group, BSTR Sys, BSTR Datum, BSTR Unit) |
Parameters
Group
The unique string of the coordinate system group.
Sys
The unique string of the coordinate system.
Datum
The unique string of the coordinate system datum.
Unit
The unique string of the coordinate system units.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
InitFromEPSG
Initializes a projection definition based on a numeric EPSG projected coordinate system definition.
JavaScript |
|
InitFromEPSG( EPSG) |
C# |
|
void InitFromEPSG( int EPSG) |
C++ |
|
HRESULT InitFromEPSG( long EPSG) |
Parameters
EPSG
A numeric EPSG projected coordinate system definition.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
InitLatLong
Initializes a Geographic Lat-Long, WGS coordinate system.
JavaScript |
|
InitLatLong |
C# |
|
void InitLatLong() |
C++ |
|
HRESULT InitLatLong() |
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
IsCompound
This method returns TRUE if the coordinate system includes a vertical datum.
JavaScript |
|
IsCompound () |
C# |
|
bool IsCompound () |
C++ |
|
HRESULT IsCompound ( VARIANT_BOOL* pVal) |
IsGeocentric
This method returns TRUE if the coordinate system is geocentric and FALSE otherwise.
JavaScript |
|
IsGeocentric() |
C# |
|
bool IsGeocentric () |
C++ |
|
HRESULT IsGeocentric ( VARIANT_BOOL* pVal) |
IsPlanar
This method returns TRUE if the coordinate system is planar and FALSE otherwise.
JavaScript |
|
IsPlanar() |
C# |
|
bool IsPlanar() |
C++ |
|
HRESULT IsPlanar( VARIANT_BOOL* pVal) |
Return Value
pVal
Returns TRUE if the coordinate system is planar.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
IsSame
This method returns TRUE if the selected coordinate system is the same as the specified one.
JavaScript |
|
IsSame( pCoordinateSystem) |
C# |
|
bool IsSame( ICoordinateSystem80 pCoordinateSystem) |
C++ |
|
HRESULT IsSame( ICoordinateSystem80* pCoordinateSystem, VARIANT_BOOL* pVal) |
Parameters
pCoordinateSystem
An ICoordinateSystem80 representing the coordinate system to which the selected one is being compared.
Return Value
pVal
A Boolean indicating whether the two coordinate systems are the same.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
IsWktValid
Returns TRUE if the coordinate system’s WKT is valid.
JavaScript |
|
IsWktValid() |
C# |
|
bool IsWktValid() |
C++ |
|
HRESULT IsWktValid( VARIANT_BOOL* pVal) |
Return Value
pVal
A Boolean indicating whether the WKT is valid.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
WriteWellKnownTextToFile
Writes the Well-Known Text representation of the selected coordinate system to a specified file.
JavaScript |
|
WriteWellKnownTextToFile () |
C# |
|
string WriteWellKnownTextToFile ( string FileName) |
C++ |
|
HRESULT WriteWellKnownTextToFile ( BSTR FileName, BSTR* pVal) |
Parameters
FileName
Name of file to which to write the Well Known Text (WKT).
Return Value
pVal
Full path to file, including file's name, which now contains the coordinate system information in Well Known Text (WKT) format, e.g., %AppData%\CS_WKT\WKT.txt. For security considerations, the file is saved to a predefined “CS_WKT” folder in the “Application Data” space of the current user. You can use %APPDATA% in Windows Explorer to locate the path on your computer.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.