Interface ICoordinateSystemCatalog
Defines a coordinate system catalog
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public interface ICoordinateSystemCatalog
Examples
This example uses the ICoordinateSystemCatalog
to create a simple coordinate system transformation to transform points.
IServerConnection conn;
...
ICoordinateSystemCatalog csCatalog = conn.CoordinateSystemCatalog;
//Find the source and target coordinate system definitions
CoordinateSystemDefinitionBase srcCs = csCatalog.FindCoordSys("LL84");
CoordinateSystemDefinitionBase dstCs = csCatalog.FindCoordSys("WGS84.PseudoMercator");
//Create the transform using the WKTs of the source and target coordinate system definitions
ISimpleTransform trans = csCatalog.CreateTransform(srcCs.WKT, dstCs.WKT);
double x = -71.061342;
double y = 42.355892;
double tx;
double ty;
trans.Transform(x, y, out tx, out ty);
//tx and ty will contain the transformed coordinates
Properties
|
Improve this Doc
View Source
Categories
Gets an array of coordinate system categories
Declaration
CoordinateSystemCategory[] Categories { get; }
Property Value
|
Improve this Doc
View Source
Coordsys
Gets an array of all coordinate systems in this catalog
Declaration
CoordinateSystemDefinitionBase[] Coordsys { get; }
Property Value
|
Improve this Doc
View Source
IsLoaded
Gets whether the coordinate system catalog has been loaded
Declaration
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
LibraryName
Gets the name of the coordinate system library
Declaration
string LibraryName { get; }
Property Value
Type |
Description |
System.String |
|
Methods
|
Improve this Doc
View Source
ConvertCoordinateSystemCodeToWkt(String)
Convers the specified coordinate system code to WKT
Declaration
string ConvertCoordinateSystemCodeToWkt(string coordcode)
Parameters
Type |
Name |
Description |
System.String |
coordcode |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ConvertEpsgCodeToWkt(String)
Converts the specified epsg code to WKT
Declaration
string ConvertEpsgCodeToWkt(string epsg)
Parameters
Type |
Name |
Description |
System.String |
epsg |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ConvertWktToCoordinateSystemCode(String)
Converts the specified WKT into a coordinate system code
Declaration
string ConvertWktToCoordinateSystemCode(string wkt)
Parameters
Type |
Name |
Description |
System.String |
wkt |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ConvertWktToEpsgCode(String)
Converts the specified WKT into an EPSG code
Declaration
string ConvertWktToEpsgCode(string wkt)
Parameters
Type |
Name |
Description |
System.String |
wkt |
|
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
CreateCoordinateSystem(String)
Creates a coordiante system from the given WKT
Declaration
ICoordinateSystemRef CreateCoordinateSystem(string wkt)
Parameters
Type |
Name |
Description |
System.String |
wkt |
|
Returns
|
Improve this Doc
View Source
CreateEmptyCoordinateSystem()
Gets an empty coordinate system
Declaration
CoordinateSystemDefinitionBase CreateEmptyCoordinateSystem()
Returns
|
Improve this Doc
View Source
Creates a simple coordinate system transformation from the source and target WKT strings
Declaration
ISimpleTransform CreateTransform(string sourceWkt, string targetWkt)
Parameters
Type |
Name |
Description |
System.String |
sourceWkt |
|
System.String |
targetWkt |
|
Returns
|
Improve this Doc
View Source
EnumerateCoordinateSystems(String)
Gets an array of all coordinate systems in the specified category
Declaration
CoordinateSystemDefinitionBase[] EnumerateCoordinateSystems(string category)
Parameters
Type |
Name |
Description |
System.String |
category |
|
Returns
|
Improve this Doc
View Source
FindCoordSys(String)
Gets the coordinate system that matches the specified code
Declaration
CoordinateSystemDefinitionBase FindCoordSys(string coordcode)
Parameters
Type |
Name |
Description |
System.String |
coordcode |
|
Returns
|
Improve this Doc
View Source
IsValid(String)
Checks if the specified WKT is valid
Declaration
Parameters
Type |
Name |
Description |
System.String |
wkt |
|
Returns
Type |
Description |
System.Boolean |
|