Factory class with members to assist in creating and transforming between Coordinate Reference Systems (CRS)

Namespace:  EGIS.Projections
Assembly:  EGIS.Projections (in EGIS.Projections.dll)

Syntax

Visual Basic
Public Class CoordinateReferenceSystemFactory _
	Implements ICRSFactory
C#
public class CoordinateReferenceSystemFactory : ICRSFactory
Visual C++
public ref class CoordinateReferenceSystemFactory : ICRSFactory
JavaScript
EGIS.Projections.CoordinateReferenceSystemFactory = function();

Type.createClass(
	'EGIS.Projections.CoordinateReferenceSystemFactory',
	null,
	EGIS.Projections.ICRSFactory);

Remarks

To access the factory class use the EGIS.Projections.CoordinateReferenceSystemFactory.Default member

To create a CRS from Well Known Text (as stored in a shapefile .prj file) use:
EGIS.Projections.CoordinateReferenceSystemFactory.Default.CreateCRSFromWKT(wktString);
To create a CRS from a EPGS code use:
EGIS.Projections.CoordinateReferenceSystemFactory.Default.GetCRSById(code);

To transform coordinates from one CRS to another CRS create a ITransformation object: EGIS.Projections.CoordinateReferenceSystemFactory.Default.CreateCoordinateTrasformation(sourceCRS, targetCRS);
or
EGIS.Projections.CoordinateReferenceSystemFactory.Default.CreateCoordinateTrasformation(sourceWKT, targetWKT);

Internally EGIS uses Proj6 to support CRS operations.
To use EGIS.Projections in your own projects make sure that the "Proj6" directory and all of its contents is copied to the output directory of your project.

Inheritance Hierarchy

System..::..Object
  EGIS.Projections..::..CoordinateReferenceSystemFactory

See Also